~adam-stokes/ubuntu/quantal/nfs-utils/hang-on-kernel-expire-794112

« back to all changes in this revision

Viewing changes to aclocal/libtool.m4

  • Committer: Steve Langasek
  • Date: 2011-10-29 21:56:45 UTC
  • mfrom: (14.1.15 sid)
  • Revision ID: steve.langasek@canonical.com-20111029215645-ohwji14mw3tamz84
Merge Debian version 1:1.2.5-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
dnl
169
169
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
170
170
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
171
 
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
172
171
m4_require([_LT_CMD_RELOAD])dnl
173
172
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
174
 
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
175
173
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
176
174
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
177
 
m4_require([_LT_WITH_SYSROOT])dnl
178
175
 
179
176
_LT_CONFIG_LIBTOOL_INIT([
180
177
# See if we are running on zsh, and set the options which allow our
751
748
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
752
749
  # text mode, it properly converts lines to CR/LF.  This bash problem
753
750
  # is reportedly fixed, but why not run on old versions too?
754
 
  sed '$q' "$ltmain" >> "$cfgfile" \
755
 
     || (rm -f "$cfgfile"; exit 1)
756
 
 
757
 
  _LT_PROG_REPLACE_SHELLFNS
758
 
 
759
 
   mv -f "$cfgfile" "$ofile" ||
 
751
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
 
752
    || (rm -f "$cfgfile"; exit 1)
 
753
 
 
754
  _LT_PROG_XSI_SHELLFNS
 
755
 
 
756
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
 
757
    || (rm -f "$cfgfile"; exit 1)
 
758
 
 
759
  mv -f "$cfgfile" "$ofile" ||
760
760
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
761
761
  chmod +x "$ofile"
762
762
],
1073
1073
  fi
1074
1074
])
1075
1075
 
1076
 
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1077
 
# ----------------------------------
 
1076
# _LT_SYS_MODULE_PATH_AIX
 
1077
# -----------------------
1078
1078
# Links a minimal program and checks the executable
1079
1079
# for the system default hardcoded library path. In most cases,
1080
1080
# this is /usr/lib:/lib, but when the MPI compilers are used
1081
1081
# the location of the communication and MPI libs are included too.
1082
1082
# If we don't find anything, use the default library path according
1083
1083
# to the aix ld manual.
1084
 
# Store the results from the different compilers for each TAGNAME.
1085
 
# Allow to override them for all tags through lt_cv_aix_libpath.
1086
1084
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1087
1085
[m4_require([_LT_DECL_SED])dnl
1088
 
if test "${lt_cv_aix_libpath+set}" = set; then
1089
 
  aix_libpath=$lt_cv_aix_libpath
1090
 
else
1091
 
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1092
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1093
 
  lt_aix_libpath_sed='[
1094
 
      /Import File Strings/,/^$/ {
1095
 
          /^0/ {
1096
 
              s/^0  *\([^ ]*\) *$/\1/
1097
 
              p
1098
 
          }
1099
 
      }]'
1100
 
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1101
 
  # Check for a 64-bit object if we didn't find anything.
1102
 
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1103
 
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1104
 
  fi],[])
1105
 
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1106
 
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1107
 
  fi
1108
 
  ])
1109
 
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1110
 
fi
 
1086
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
1087
lt_aix_libpath_sed='
 
1088
    /Import File Strings/,/^$/ {
 
1089
        /^0/ {
 
1090
            s/^0  *\(.*\)$/\1/
 
1091
            p
 
1092
        }
 
1093
    }'
 
1094
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1095
# Check for a 64-bit object if we didn't find anything.
 
1096
if test -z "$aix_libpath"; then
 
1097
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1098
fi],[])
 
1099
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1111
1100
])# _LT_SYS_MODULE_PATH_AIX
1112
1101
 
1113
1102
 
1132
1121
 
1133
1122
AC_MSG_CHECKING([how to print strings])
1134
1123
# Test print first, because it will be a builtin if present.
1135
 
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
 
1124
if test "X`print -r -- -n 2>/dev/null`" = X-n && \
1136
1125
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1137
1126
  ECHO='print -r --'
1138
1127
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1176
1165
])# _LT_PROG_ECHO_BACKSLASH
1177
1166
 
1178
1167
 
1179
 
# _LT_WITH_SYSROOT
1180
 
# ----------------
1181
 
AC_DEFUN([_LT_WITH_SYSROOT],
1182
 
[AC_MSG_CHECKING([for sysroot])
1183
 
AC_ARG_WITH([sysroot],
1184
 
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1185
 
                        (or the compiler's sysroot if not specified).],
1186
 
[], [with_sysroot=no])
1187
 
 
1188
 
dnl lt_sysroot will always be passed unquoted.  We quote it here
1189
 
dnl in case the user passed a directory name.
1190
 
lt_sysroot=
1191
 
case ${with_sysroot} in #(
1192
 
 yes)
1193
 
   if test "$GCC" = yes; then
1194
 
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1195
 
   fi
1196
 
   ;; #(
1197
 
 /*)
1198
 
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1199
 
   ;; #(
1200
 
 no|'')
1201
 
   ;; #(
1202
 
 *)
1203
 
   AC_MSG_RESULT([${with_sysroot}])
1204
 
   AC_MSG_ERROR([The sysroot must be an absolute path.])
1205
 
   ;;
1206
 
esac
1207
 
 
1208
 
 AC_MSG_RESULT([${lt_sysroot:-no}])
1209
 
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1210
 
[dependent libraries, and in which our libraries should be installed.])])
1211
 
 
1212
1168
# _LT_ENABLE_LOCK
1213
1169
# ---------------
1214
1170
m4_defun([_LT_ENABLE_LOCK],
1355
1311
])# _LT_ENABLE_LOCK
1356
1312
 
1357
1313
 
1358
 
# _LT_PROG_AR
1359
 
# -----------
1360
 
m4_defun([_LT_PROG_AR],
1361
 
[AC_CHECK_TOOLS(AR, [ar], false)
1362
 
: ${AR=ar}
1363
 
: ${AR_FLAGS=cru}
1364
 
_LT_DECL([], [AR], [1], [The archiver])
1365
 
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1366
 
 
1367
 
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1368
 
  [lt_cv_ar_at_file=no
1369
 
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1370
 
     [echo conftest.$ac_objext > conftest.lst
1371
 
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1372
 
      AC_TRY_EVAL([lt_ar_try])
1373
 
      if test "$ac_status" -eq 0; then
1374
 
        # Ensure the archiver fails upon bogus file names.
1375
 
        rm -f conftest.$ac_objext libconftest.a
1376
 
        AC_TRY_EVAL([lt_ar_try])
1377
 
        if test "$ac_status" -ne 0; then
1378
 
          lt_cv_ar_at_file=@
1379
 
        fi
1380
 
      fi
1381
 
      rm -f conftest.* libconftest.a
1382
 
     ])
1383
 
  ])
1384
 
 
1385
 
if test "x$lt_cv_ar_at_file" = xno; then
1386
 
  archiver_list_spec=
1387
 
else
1388
 
  archiver_list_spec=$lt_cv_ar_at_file
1389
 
fi
1390
 
_LT_DECL([], [archiver_list_spec], [1],
1391
 
  [How to feed a file listing to the archiver])
1392
 
])# _LT_PROG_AR
1393
 
 
1394
 
 
1395
1314
# _LT_CMD_OLD_ARCHIVE
1396
1315
# -------------------
1397
1316
m4_defun([_LT_CMD_OLD_ARCHIVE],
1398
 
[_LT_PROG_AR
 
1317
[AC_CHECK_TOOL(AR, ar, false)
 
1318
test -z "$AR" && AR=ar
 
1319
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
1320
_LT_DECL([], [AR], [1], [The archiver])
 
1321
_LT_DECL([], [AR_FLAGS], [1])
1399
1322
 
1400
1323
AC_CHECK_TOOL(STRIP, strip, :)
1401
1324
test -z "$STRIP" && STRIP=:
1735
1658
/* When -fvisbility=hidden is used, assume the code has been annotated
1736
1659
   correspondingly for the symbols needed.  */
1737
1660
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1738
 
int fnord () __attribute__((visibility("default")));
 
1661
void fnord () __attribute__((visibility("default")));
1739
1662
#endif
1740
1663
 
1741
 
int fnord () { return 42; }
 
1664
void fnord () { int i=42; }
1742
1665
int main ()
1743
1666
{
1744
1667
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2278
2201
  need_version=no
2279
2202
  need_lib_prefix=no
2280
2203
 
2281
 
  case $GCC,$cc_basename in
2282
 
  yes,*)
2283
 
    # gcc
 
2204
  case $GCC,$host_os in
 
2205
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2284
2206
    library_names_spec='$libname.dll.a'
2285
2207
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2286
2208
    postinstall_cmds='base_file=`basename \${file}`~
2313
2235
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2314
2236
      ;;
2315
2237
    esac
2316
 
    dynamic_linker='Win32 ld.exe'
2317
 
    ;;
2318
 
 
2319
 
  *,cl*)
2320
 
    # Native MSVC
2321
 
    libname_spec='$name'
2322
 
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2323
 
    library_names_spec='${libname}.dll.lib'
2324
 
 
2325
 
    case $build_os in
2326
 
    mingw*)
2327
 
      sys_lib_search_path_spec=
2328
 
      lt_save_ifs=$IFS
2329
 
      IFS=';'
2330
 
      for lt_path in $LIB
2331
 
      do
2332
 
        IFS=$lt_save_ifs
2333
 
        # Let DOS variable expansion print the short 8.3 style file name.
2334
 
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2335
 
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2336
 
      done
2337
 
      IFS=$lt_save_ifs
2338
 
      # Convert to MSYS style.
2339
 
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2340
 
      ;;
2341
 
    cygwin*)
2342
 
      # Convert to unix form, then to dos form, then back to unix form
2343
 
      # but this time dos style (no spaces!) so that the unix form looks
2344
 
      # like /cygdrive/c/PROGRA~1:/cygdr...
2345
 
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2346
 
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2347
 
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2348
 
      ;;
2349
 
    *)
2350
 
      sys_lib_search_path_spec="$LIB"
2351
 
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2352
 
        # It is most probably a Windows format PATH.
2353
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2354
 
      else
2355
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2356
 
      fi
2357
 
      # FIXME: find the short name or the path components, as spaces are
2358
 
      # common. (e.g. "Program Files" -> "PROGRA~1")
2359
 
      ;;
2360
 
    esac
2361
 
 
2362
 
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2363
 
    postinstall_cmds='base_file=`basename \${file}`~
2364
 
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2365
 
      dldir=$destdir/`dirname \$dlpath`~
2366
 
      test -d \$dldir || mkdir -p \$dldir~
2367
 
      $install_prog $dir/$dlname \$dldir/$dlname'
2368
 
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2369
 
      dlpath=$dir/\$dldll~
2370
 
       $RM \$dlpath'
2371
 
    shlibpath_overrides_runpath=yes
2372
 
    dynamic_linker='Win32 link.exe'
2373
2238
    ;;
2374
2239
 
2375
2240
  *)
2376
 
    # Assume MSVC wrapper
2377
2241
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2378
 
    dynamic_linker='Win32 ld.exe'
2379
2242
    ;;
2380
2243
  esac
 
2244
  dynamic_linker='Win32 ld.exe'
2381
2245
  # FIXME: first we should search . and the directory the executable is in
2382
2246
  shlibpath_var=PATH
2383
2247
  ;;
3085
2949
esac
3086
2950
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3087
2951
case $host_os in
3088
 
  cygwin* | mingw* | pw32* | cegcc*)
3089
 
    if test "$GCC" != yes; then
3090
 
      reload_cmds=false
3091
 
    fi
3092
 
    ;;
3093
2952
  darwin*)
3094
2953
    if test "$GCC" = yes; then
3095
2954
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3308
3167
  ;;
3309
3168
esac
3310
3169
])
3311
 
 
3312
 
file_magic_glob=
3313
 
want_nocaseglob=no
3314
 
if test "$build" = "$host"; then
3315
 
  case $host_os in
3316
 
  mingw* | pw32*)
3317
 
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3318
 
      want_nocaseglob=yes
3319
 
    else
3320
 
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3321
 
    fi
3322
 
    ;;
3323
 
  esac
3324
 
fi
3325
 
 
3326
3170
file_magic_cmd=$lt_cv_file_magic_cmd
3327
3171
deplibs_check_method=$lt_cv_deplibs_check_method
3328
3172
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3330
3174
_LT_DECL([], [deplibs_check_method], [1],
3331
3175
    [Method to check whether dependent libraries are shared objects])
3332
3176
_LT_DECL([], [file_magic_cmd], [1],
3333
 
    [Command to use when deplibs_check_method = "file_magic"])
3334
 
_LT_DECL([], [file_magic_glob], [1],
3335
 
    [How to find potential files when deplibs_check_method = "file_magic"])
3336
 
_LT_DECL([], [want_nocaseglob], [1],
3337
 
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 
3177
    [Command to use when deplibs_check_method == "file_magic"])
3338
3178
])# _LT_CHECK_MAGIC_METHOD
3339
3179
 
3340
3180
 
3437
3277
dnl AC_DEFUN([AM_PROG_NM], [])
3438
3278
dnl AC_DEFUN([AC_PROG_NM], [])
3439
3279
 
3440
 
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3441
 
# --------------------------------
3442
 
# how to determine the name of the shared library
3443
 
# associated with a specific link library.
3444
 
#  -- PORTME fill in with the dynamic library characteristics
3445
 
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3446
 
[m4_require([_LT_DECL_EGREP])
3447
 
m4_require([_LT_DECL_OBJDUMP])
3448
 
m4_require([_LT_DECL_DLLTOOL])
3449
 
AC_CACHE_CHECK([how to associate runtime and link libraries],
3450
 
lt_cv_sharedlib_from_linklib_cmd,
3451
 
[lt_cv_sharedlib_from_linklib_cmd='unknown'
3452
 
 
3453
 
case $host_os in
3454
 
cygwin* | mingw* | pw32* | cegcc*)
3455
 
  # two different shell functions defined in ltmain.sh
3456
 
  # decide which to use based on capabilities of $DLLTOOL
3457
 
  case `$DLLTOOL --help 2>&1` in
3458
 
  *--identify-strict*)
3459
 
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3460
 
    ;;
3461
 
  *)
3462
 
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3463
 
    ;;
3464
 
  esac
3465
 
  ;;
3466
 
*)
3467
 
  # fallback: assume linklib IS sharedlib
3468
 
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3469
 
  ;;
3470
 
esac
3471
 
])
3472
 
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3473
 
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3474
 
 
3475
 
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3476
 
    [Command to associate shared and link libraries])
3477
 
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3478
 
 
3479
 
 
3480
 
# _LT_PATH_MANIFEST_TOOL
3481
 
# ----------------------
3482
 
# locate the manifest tool
3483
 
m4_defun([_LT_PATH_MANIFEST_TOOL],
3484
 
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3485
 
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3486
 
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3487
 
  [lt_cv_path_mainfest_tool=no
3488
 
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3489
 
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3490
 
  cat conftest.err >&AS_MESSAGE_LOG_FD
3491
 
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3492
 
    lt_cv_path_mainfest_tool=yes
3493
 
  fi
3494
 
  rm -f conftest*])
3495
 
if test "x$lt_cv_path_mainfest_tool" != xyes; then
3496
 
  MANIFEST_TOOL=:
3497
 
fi
3498
 
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3499
 
])# _LT_PATH_MANIFEST_TOOL
3500
 
 
3501
3280
 
3502
3281
# LT_LIB_M
3503
3282
# --------
3624
3403
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3625
3404
 
3626
3405
# Transform an extracted symbol line into symbol name and symbol address
3627
 
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3628
 
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
3406
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
3407
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3629
3408
 
3630
3409
# Handle CRLF in mingw tool chain
3631
3410
opt_cr=
3661
3440
  else
3662
3441
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3663
3442
  fi
3664
 
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3665
3443
 
3666
3444
  # Check to see that the pipe works correctly.
3667
3445
  pipe_works=no
3695
3473
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3696
3474
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3697
3475
          cat <<_LT_EOF > conftest.$ac_ext
3698
 
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3699
 
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3700
 
/* DATA imports from DLLs on WIN32 con't be const, because runtime
3701
 
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3702
 
# define LT@&t@_DLSYM_CONST
3703
 
#elif defined(__osf__)
3704
 
/* This system does not cope well with relocations in const data.  */
3705
 
# define LT@&t@_DLSYM_CONST
3706
 
#else
3707
 
# define LT@&t@_DLSYM_CONST const
3708
 
#endif
3709
 
 
3710
3476
#ifdef __cplusplus
3711
3477
extern "C" {
3712
3478
#endif
3718
3484
          cat <<_LT_EOF >> conftest.$ac_ext
3719
3485
 
3720
3486
/* The mapping between symbol names and symbols.  */
3721
 
LT@&t@_DLSYM_CONST struct {
 
3487
const struct {
3722
3488
  const char *name;
3723
3489
  void       *address;
3724
3490
}
3744
3510
_LT_EOF
3745
3511
          # Now try linking the two files.
3746
3512
          mv conftest.$ac_objext conftstm.$ac_objext
3747
 
          lt_globsym_save_LIBS=$LIBS
3748
 
          lt_globsym_save_CFLAGS=$CFLAGS
 
3513
          lt_save_LIBS="$LIBS"
 
3514
          lt_save_CFLAGS="$CFLAGS"
3749
3515
          LIBS="conftstm.$ac_objext"
3750
3516
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3751
3517
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3752
3518
            pipe_works=yes
3753
3519
          fi
3754
 
          LIBS=$lt_globsym_save_LIBS
3755
 
          CFLAGS=$lt_globsym_save_CFLAGS
 
3520
          LIBS="$lt_save_LIBS"
 
3521
          CFLAGS="$lt_save_CFLAGS"
3756
3522
        else
3757
3523
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3758
3524
        fi
3785
3551
  AC_MSG_RESULT(ok)
3786
3552
fi
3787
3553
 
3788
 
# Response file support.
3789
 
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3790
 
  nm_file_list_spec='@'
3791
 
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3792
 
  nm_file_list_spec='@'
3793
 
fi
3794
 
 
3795
3554
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3796
3555
    [Take the output of nm and produce a listing of raw symbols and C names])
3797
3556
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3802
3561
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3803
3562
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3804
3563
    [Transform the output of nm in a C name address pair when lib prefix is needed])
3805
 
_LT_DECL([], [nm_file_list_spec], [1],
3806
 
    [Specify filename containing input files for $NM])
3807
3564
]) # _LT_CMD_GLOBAL_SYMBOLS
3808
3565
 
3809
3566
 
3815
3572
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3816
3573
_LT_TAGVAR(lt_prog_compiler_static, $1)=
3817
3574
 
 
3575
AC_MSG_CHECKING([for $compiler option to produce PIC])
3818
3576
m4_if([$1], [CXX], [
3819
3577
  # C++ specific cases for pic, static, wl, etc.
3820
3578
  if test "$GXX" = yes; then
3919
3677
          ;;
3920
3678
        esac
3921
3679
        ;;
3922
 
      mingw* | cygwin* | os2* | pw32* | cegcc*)
3923
 
        # This hack is so that the source file can tell whether it is being
3924
 
        # built for inclusion in a dll (and should export symbols for example).
3925
 
        m4_if([$1], [GCJ], [],
3926
 
          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3927
 
        ;;
3928
3680
      dgux*)
3929
3681
        case $cc_basename in
3930
3682
          ec++*)
4299
4051
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4300
4052
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4301
4053
        ;;
4302
 
      nagfor*)
4303
 
        # NAG Fortran compiler
4304
 
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4305
 
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4306
 
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4307
 
        ;;
4308
4054
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4309
4055
        # Portland Group compilers (*not* the Pentium gcc compiler,
4310
4056
        # which looks to be a dead project)
4424
4170
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4425
4171
    ;;
4426
4172
esac
4427
 
 
4428
 
AC_CACHE_CHECK([for $compiler option to produce PIC],
4429
 
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4430
 
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4431
 
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
4173
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
4174
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
4175
        [How to pass a linker flag through the compiler])
4432
4176
 
4433
4177
#
4434
4178
# Check to make sure the PIC flag actually works.
4447
4191
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4448
4192
        [Additional compiler flags for building library objects])
4449
4193
 
4450
 
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4451
 
        [How to pass a linker flag through the compiler])
4452
4194
#
4453
4195
# Check to make sure the static flag actually works.
4454
4196
#
4469
4211
m4_defun([_LT_LINKER_SHLIBS],
4470
4212
[AC_REQUIRE([LT_PATH_LD])dnl
4471
4213
AC_REQUIRE([LT_PATH_NM])dnl
4472
 
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4473
4214
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4474
4215
m4_require([_LT_DECL_EGREP])dnl
4475
4216
m4_require([_LT_DECL_SED])dnl
4478
4219
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4479
4220
m4_if([$1], [CXX], [
4480
4221
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4481
 
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4482
4222
  case $host_os in
4483
4223
  aix[[4-9]]*)
4484
4224
    # If we're using GNU nm, then we don't want the "-C" option.
4493
4233
    ;;
4494
4234
  pw32*)
4495
4235
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4496
 
    ;;
 
4236
  ;;
4497
4237
  cygwin* | mingw* | cegcc*)
4498
 
    case $cc_basename in
4499
 
    cl*) ;;
4500
 
    *)
4501
 
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4502
 
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4503
 
      ;;
4504
 
    esac
4505
 
    ;;
 
4238
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
4239
  ;;
4506
4240
  *)
4507
4241
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4508
 
    ;;
 
4242
  ;;
4509
4243
  esac
 
4244
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4510
4245
], [
4511
4246
  runpath_var=
4512
4247
  _LT_TAGVAR(allow_undefined_flag, $1)=
4674
4409
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4675
4410
      _LT_TAGVAR(always_export_symbols, $1)=no
4676
4411
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4677
 
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4678
 
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
4412
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4679
4413
 
4680
4414
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4681
4415
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4723
4457
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4724
4458
         && test "$tmp_diet" = no
4725
4459
      then
4726
 
        tmp_addflag=' $pic_flag'
 
4460
        tmp_addflag=
4727
4461
        tmp_sharedflag='-shared'
4728
4462
        case $cc_basename,$host_cpu in
4729
4463
        pgcc*)                          # Portland Group C compiler
4793
4527
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4794
4528
        wlarc=
4795
4529
      else
4796
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4797
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4530
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4531
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4798
4532
      fi
4799
4533
      ;;
4800
4534
 
4812
4546
 
4813
4547
_LT_EOF
4814
4548
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4815
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4816
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4549
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4550
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4817
4551
      else
4818
4552
        _LT_TAGVAR(ld_shlibs, $1)=no
4819
4553
      fi
4859
4593
 
4860
4594
    *)
4861
4595
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4862
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4863
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4596
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4597
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4864
4598
      else
4865
4599
        _LT_TAGVAR(ld_shlibs, $1)=no
4866
4600
      fi
4990
4724
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4991
4725
        # Determine the default libpath from the value encoded in an
4992
4726
        # empty executable.
4993
 
        _LT_SYS_MODULE_PATH_AIX([$1])
 
4727
        _LT_SYS_MODULE_PATH_AIX
4994
4728
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4995
4729
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4996
4730
      else
5001
4735
        else
5002
4736
         # Determine the default libpath from the value encoded in an
5003
4737
         # empty executable.
5004
 
         _LT_SYS_MODULE_PATH_AIX([$1])
 
4738
         _LT_SYS_MODULE_PATH_AIX
5005
4739
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5006
4740
          # Warning - without using the other run time loading flags,
5007
4741
          # -berok will link without error, but may produce a broken library.
5045
4779
      # Microsoft Visual C++.
5046
4780
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5047
4781
      # no search path for DLLs.
5048
 
      case $cc_basename in
5049
 
      cl*)
5050
 
        # Native MSVC
5051
 
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5052
 
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5053
 
        _LT_TAGVAR(always_export_symbols, $1)=yes
5054
 
        _LT_TAGVAR(file_list_spec, $1)='@'
5055
 
        # Tell ltmain to make .lib files, not .a files.
5056
 
        libext=lib
5057
 
        # Tell ltmain to make .dll files, not .so files.
5058
 
        shrext_cmds=".dll"
5059
 
        # FIXME: Setting linknames here is a bad hack.
5060
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5061
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5062
 
            sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5063
 
          else
5064
 
            sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5065
 
          fi~
5066
 
          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5067
 
          linknames='
5068
 
        # The linker will not automatically build a static lib if we build a DLL.
5069
 
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5070
 
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5071
 
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5072
 
        # Don't use ranlib
5073
 
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5074
 
        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5075
 
          lt_tool_outputfile="@TOOL_OUTPUT@"~
5076
 
          case $lt_outputfile in
5077
 
            *.exe|*.EXE) ;;
5078
 
            *)
5079
 
              lt_outputfile="$lt_outputfile.exe"
5080
 
              lt_tool_outputfile="$lt_tool_outputfile.exe"
5081
 
              ;;
5082
 
          esac~
5083
 
          if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5084
 
            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5085
 
            $RM "$lt_outputfile.manifest";
5086
 
          fi'
5087
 
        ;;
5088
 
      *)
5089
 
        # Assume MSVC wrapper
5090
 
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5091
 
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5092
 
        # Tell ltmain to make .lib files, not .a files.
5093
 
        libext=lib
5094
 
        # Tell ltmain to make .dll files, not .so files.
5095
 
        shrext_cmds=".dll"
5096
 
        # FIXME: Setting linknames here is a bad hack.
5097
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5098
 
        # The linker will automatically build a .lib file if we build a DLL.
5099
 
        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5100
 
        # FIXME: Should let the user specify the lib program.
5101
 
        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5102
 
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5103
 
        ;;
5104
 
      esac
 
4782
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
4783
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
4784
      # Tell ltmain to make .lib files, not .a files.
 
4785
      libext=lib
 
4786
      # Tell ltmain to make .dll files, not .so files.
 
4787
      shrext_cmds=".dll"
 
4788
      # FIXME: Setting linknames here is a bad hack.
 
4789
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 
4790
      # The linker will automatically build a .lib file if we build a DLL.
 
4791
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
4792
      # FIXME: Should let the user specify the lib program.
 
4793
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
4794
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
4795
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5105
4796
      ;;
5106
4797
 
5107
4798
    darwin* | rhapsody*)
5139
4830
 
5140
4831
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5141
4832
    freebsd* | dragonfly*)
5142
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
4833
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5143
4834
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5144
4835
      _LT_TAGVAR(hardcode_direct, $1)=yes
5145
4836
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5147
4838
 
5148
4839
    hpux9*)
5149
4840
      if test "$GCC" = yes; then
5150
 
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
4841
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5151
4842
      else
5152
4843
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5153
4844
      fi
5163
4854
 
5164
4855
    hpux10*)
5165
4856
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5166
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
4857
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5167
4858
      else
5168
4859
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5169
4860
      fi
5187
4878
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5188
4879
          ;;
5189
4880
        ia64*)
5190
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
4881
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5191
4882
          ;;
5192
4883
        *)
5193
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
4884
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5194
4885
          ;;
5195
4886
        esac
5196
4887
      else
5237
4928
 
5238
4929
    irix5* | irix6* | nonstopux*)
5239
4930
      if test "$GCC" = yes; then
5240
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
4931
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5241
4932
        # Try to use the -exported_symbol ld option, if it does not
5242
4933
        # work, assume that -exports_file does not work either and
5243
4934
        # implicitly export all symbols.
5244
 
        # This should be the same for all languages, so no per-tag cache variable.
5245
 
        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5246
 
          [lt_cv_irix_exported_symbol],
5247
 
          [save_LDFLAGS="$LDFLAGS"
5248
 
           LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5249
 
           AC_LINK_IFELSE(
5250
 
             [AC_LANG_SOURCE(
5251
 
                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5252
 
                              [C++], [[int foo (void) { return 0; }]],
5253
 
                              [Fortran 77], [[
5254
 
      subroutine foo
5255
 
      end]],
5256
 
                              [Fortran], [[
5257
 
      subroutine foo
5258
 
      end]])])],
5259
 
              [lt_cv_irix_exported_symbol=yes],
5260
 
              [lt_cv_irix_exported_symbol=no])
5261
 
           LDFLAGS="$save_LDFLAGS"])
5262
 
        if test "$lt_cv_irix_exported_symbol" = yes; then
5263
 
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5264
 
        fi
 
4935
        save_LDFLAGS="$LDFLAGS"
 
4936
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
4937
        AC_LINK_IFELSE(int foo(void) {},
 
4938
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
4939
        )
 
4940
        LDFLAGS="$save_LDFLAGS"
5265
4941
      else
5266
4942
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5267
4943
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5346
5022
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
5347
5023
      if test "$GCC" = yes; then
5348
5024
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5349
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5025
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5350
5026
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5351
5027
      else
5352
5028
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5365
5041
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5366
5042
      if test "$GCC" = yes; then
5367
5043
        wlarc='${wl}'
5368
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5044
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5369
5045
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5370
 
          $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
5046
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5371
5047
      else
5372
5048
        case `$CC -V 2>&1` in
5373
5049
        *"Compilers 5.0"*)
5639
5315
    to runtime path list])
5640
5316
_LT_TAGDECL([], [link_all_deplibs], [0],
5641
5317
    [Whether libtool must link a program against all its dependency libraries])
 
5318
_LT_TAGDECL([], [fix_srcfile_path], [1],
 
5319
    [Fix the shell variable $srcfile for the compiler])
5642
5320
_LT_TAGDECL([], [always_export_symbols], [0],
5643
5321
    [Set to "yes" if exported symbols are required])
5644
5322
_LT_TAGDECL([], [export_symbols_cmds], [2],
5649
5327
    [Symbols that must always be exported])
5650
5328
_LT_TAGDECL([], [prelink_cmds], [2],
5651
5329
    [Commands necessary for linking programs (against libraries) with templates])
5652
 
_LT_TAGDECL([], [postlink_cmds], [2],
5653
 
    [Commands necessary for finishing linking programs])
5654
5330
_LT_TAGDECL([], [file_list_spec], [1],
5655
5331
    [Specify filename containing input files])
5656
5332
dnl FIXME: Not yet implemented
5752
5428
m4_defun([_LT_LANG_CXX_CONFIG],
5753
5429
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5754
5430
m4_require([_LT_DECL_EGREP])dnl
5755
 
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5756
5431
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5757
5432
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5758
5433
    (test "X$CXX" != "Xg++"))) ; then
5814
5489
 
5815
5490
  # Allow CC to be a program name with arguments.
5816
5491
  lt_save_CC=$CC
5817
 
  lt_save_CFLAGS=$CFLAGS
5818
5492
  lt_save_LD=$LD
5819
5493
  lt_save_GCC=$GCC
5820
5494
  GCC=$GXX
5832
5506
  fi
5833
5507
  test -z "${LDCXX+set}" || LD=$LDCXX
5834
5508
  CC=${CXX-"c++"}
5835
 
  CFLAGS=$CXXFLAGS
5836
5509
  compiler=$CC
5837
5510
  _LT_TAGVAR(compiler, $1)=$CC
5838
5511
  _LT_CC_BASENAME([$compiler])
5854
5527
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5855
5528
      # archiving commands below assume that GNU ld is being used.
5856
5529
      if test "$with_gnu_ld" = yes; then
5857
 
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5858
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5530
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5531
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5859
5532
 
5860
5533
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5861
5534
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5996
5669
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5997
5670
          # Determine the default libpath from the value encoded in an empty
5998
5671
          # executable.
5999
 
          _LT_SYS_MODULE_PATH_AIX([$1])
 
5672
          _LT_SYS_MODULE_PATH_AIX
6000
5673
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6001
5674
 
6002
5675
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6008
5681
          else
6009
5682
            # Determine the default libpath from the value encoded in an
6010
5683
            # empty executable.
6011
 
            _LT_SYS_MODULE_PATH_AIX([$1])
 
5684
            _LT_SYS_MODULE_PATH_AIX
6012
5685
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6013
5686
            # Warning - without using the other run time loading flags,
6014
5687
            # -berok will link without error, but may produce a broken library.
6050
5723
        ;;
6051
5724
 
6052
5725
      cygwin* | mingw* | pw32* | cegcc*)
6053
 
        case $GXX,$cc_basename in
6054
 
        ,cl* | no,cl*)
6055
 
          # Native MSVC
6056
 
          # hardcode_libdir_flag_spec is actually meaningless, as there is
6057
 
          # no search path for DLLs.
6058
 
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6059
 
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6060
 
          _LT_TAGVAR(always_export_symbols, $1)=yes
6061
 
          _LT_TAGVAR(file_list_spec, $1)='@'
6062
 
          # Tell ltmain to make .lib files, not .a files.
6063
 
          libext=lib
6064
 
          # Tell ltmain to make .dll files, not .so files.
6065
 
          shrext_cmds=".dll"
6066
 
          # FIXME: Setting linknames here is a bad hack.
6067
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6068
 
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6069
 
              $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6070
 
            else
6071
 
              $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6072
 
            fi~
6073
 
            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6074
 
            linknames='
6075
 
          # The linker will not automatically build a static lib if we build a DLL.
6076
 
          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6077
 
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6078
 
          # Don't use ranlib
6079
 
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6080
 
          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6081
 
            lt_tool_outputfile="@TOOL_OUTPUT@"~
6082
 
            case $lt_outputfile in
6083
 
              *.exe|*.EXE) ;;
6084
 
              *)
6085
 
                lt_outputfile="$lt_outputfile.exe"
6086
 
                lt_tool_outputfile="$lt_tool_outputfile.exe"
6087
 
                ;;
6088
 
            esac~
6089
 
            func_to_tool_file "$lt_outputfile"~
6090
 
            if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6091
 
              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6092
 
              $RM "$lt_outputfile.manifest";
6093
 
            fi'
6094
 
          ;;
6095
 
        *)
6096
 
          # g++
6097
 
          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6098
 
          # as there is no search path for DLLs.
6099
 
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6100
 
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6101
 
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6102
 
          _LT_TAGVAR(always_export_symbols, $1)=no
6103
 
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5726
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5727
        # as there is no search path for DLLs.
 
5728
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5729
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
5730
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5731
        _LT_TAGVAR(always_export_symbols, $1)=no
 
5732
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6104
5733
 
6105
 
          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6106
 
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6107
 
            # If the export-symbols file already is a .def file (1st line
6108
 
            # is EXPORTS), use it as is; otherwise, prepend...
6109
 
            _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6110
 
              cp $export_symbols $output_objdir/$soname.def;
6111
 
            else
6112
 
              echo EXPORTS > $output_objdir/$soname.def;
6113
 
              cat $export_symbols >> $output_objdir/$soname.def;
6114
 
            fi~
6115
 
            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6116
 
          else
6117
 
            _LT_TAGVAR(ld_shlibs, $1)=no
6118
 
          fi
6119
 
          ;;
6120
 
        esac
6121
 
        ;;
 
5734
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
5735
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5736
          # If the export-symbols file already is a .def file (1st line
 
5737
          # is EXPORTS), use it as is; otherwise, prepend...
 
5738
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5739
            cp $export_symbols $output_objdir/$soname.def;
 
5740
          else
 
5741
            echo EXPORTS > $output_objdir/$soname.def;
 
5742
            cat $export_symbols >> $output_objdir/$soname.def;
 
5743
          fi~
 
5744
          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5745
        else
 
5746
          _LT_TAGVAR(ld_shlibs, $1)=no
 
5747
        fi
 
5748
        ;;
6122
5749
      darwin* | rhapsody*)
6123
5750
        _LT_DARWIN_LINKER_FEATURES($1)
6124
5751
        ;;
6193
5820
            ;;
6194
5821
          *)
6195
5822
            if test "$GXX" = yes; then
6196
 
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5823
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6197
5824
            else
6198
5825
              # FIXME: insert proper C++ library support
6199
5826
              _LT_TAGVAR(ld_shlibs, $1)=no
6264
5891
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6265
5892
                    ;;
6266
5893
                  ia64*)
6267
 
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
5894
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6268
5895
                    ;;
6269
5896
                  *)
6270
 
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
5897
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6271
5898
                    ;;
6272
5899
                esac
6273
5900
              fi
6308
5935
          *)
6309
5936
            if test "$GXX" = yes; then
6310
5937
              if test "$with_gnu_ld" = no; then
6311
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5938
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6312
5939
              else
6313
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 
5940
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6314
5941
              fi
6315
5942
            fi
6316
5943
            _LT_TAGVAR(link_all_deplibs, $1)=yes
6588
6215
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6589
6216
                  ;;
6590
6217
                *)
6591
 
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6218
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6592
6219
                  ;;
6593
6220
              esac
6594
6221
 
6675
6302
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6676
6303
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6677
6304
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6678
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
6305
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6679
6306
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6680
 
                  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
6307
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6681
6308
 
6682
6309
                # Commands to make compiler produce verbose output that lists
6683
6310
                # what "hidden" libraries, object files and flags are used when
6806
6433
  fi # test -n "$compiler"
6807
6434
 
6808
6435
  CC=$lt_save_CC
6809
 
  CFLAGS=$lt_save_CFLAGS
6810
6436
  LDCXX=$LD
6811
6437
  LD=$lt_save_LD
6812
6438
  GCC=$lt_save_GCC
6821
6447
])# _LT_LANG_CXX_CONFIG
6822
6448
 
6823
6449
 
6824
 
# _LT_FUNC_STRIPNAME_CNF
6825
 
# ----------------------
6826
 
# func_stripname_cnf prefix suffix name
6827
 
# strip PREFIX and SUFFIX off of NAME.
6828
 
# PREFIX and SUFFIX must not contain globbing or regex special
6829
 
# characters, hashes, percent signs, but SUFFIX may contain a leading
6830
 
# dot (in which case that matches only a dot).
6831
 
#
6832
 
# This function is identical to the (non-XSI) version of func_stripname,
6833
 
# except this one can be used by m4 code that may be executed by configure,
6834
 
# rather than the libtool script.
6835
 
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6836
 
AC_REQUIRE([_LT_DECL_SED])
6837
 
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6838
 
func_stripname_cnf ()
6839
 
{
6840
 
  case ${2} in
6841
 
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6842
 
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6843
 
  esac
6844
 
} # func_stripname_cnf
6845
 
])# _LT_FUNC_STRIPNAME_CNF
6846
 
 
6847
6450
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6848
6451
# ---------------------------------
6849
6452
# Figure out "hidden" library dependencies from verbose
6852
6455
# objects, libraries and library flags.
6853
6456
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6854
6457
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6855
 
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6856
6458
# Dependencies to place before and after the object being linked:
6857
6459
_LT_TAGVAR(predep_objects, $1)=
6858
6460
_LT_TAGVAR(postdep_objects, $1)=
6903
6505
};
6904
6506
_LT_EOF
6905
6507
])
6906
 
 
6907
 
_lt_libdeps_save_CFLAGS=$CFLAGS
6908
 
case "$CC $CFLAGS " in #(
6909
 
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6910
 
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6911
 
esac
6912
 
 
6913
6508
dnl Parse the compiler output and extract the necessary
6914
6509
dnl objects, libraries and library flags.
6915
6510
if AC_TRY_EVAL(ac_compile); then
6921
6516
  pre_test_object_deps_done=no
6922
6517
 
6923
6518
  for p in `eval "$output_verbose_link_cmd"`; do
6924
 
    case ${prev}${p} in
 
6519
    case $p in
6925
6520
 
6926
6521
    -L* | -R* | -l*)
6927
6522
       # Some compilers place space between "-{L,R}" and the path.
6930
6525
          test $p = "-R"; then
6931
6526
         prev=$p
6932
6527
         continue
 
6528
       else
 
6529
         prev=
6933
6530
       fi
6934
6531
 
6935
 
       # Expand the sysroot to ease extracting the directories later.
6936
 
       if test -z "$prev"; then
6937
 
         case $p in
6938
 
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
6939
 
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
6940
 
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
6941
 
         esac
6942
 
       fi
6943
 
       case $p in
6944
 
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
6945
 
       esac
6946
6532
       if test "$pre_test_object_deps_done" = no; then
6947
 
         case ${prev} in
6948
 
         -L | -R)
 
6533
         case $p in
 
6534
         -L* | -R*)
6949
6535
           # Internal compiler library paths should come after those
6950
6536
           # provided the user.  The postdeps already come after the
6951
6537
           # user supplied libs so there is no need to process them.
6965
6551
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6966
6552
         fi
6967
6553
       fi
6968
 
       prev=
6969
6554
       ;;
6970
6555
 
6971
 
    *.lto.$objext) ;; # Ignore GCC LTO objects
6972
6556
    *.$objext)
6973
6557
       # This assumes that the test object file only shows up
6974
6558
       # once in the compiler output.
7004
6588
fi
7005
6589
 
7006
6590
$RM -f confest.$objext
7007
 
CFLAGS=$_lt_libdeps_save_CFLAGS
7008
6591
 
7009
6592
# PORTME: override above test on systems where it is broken
7010
6593
m4_if([$1], [CXX],
7154
6737
  # Allow CC to be a program name with arguments.
7155
6738
  lt_save_CC="$CC"
7156
6739
  lt_save_GCC=$GCC
7157
 
  lt_save_CFLAGS=$CFLAGS
7158
6740
  CC=${F77-"f77"}
7159
 
  CFLAGS=$FFLAGS
7160
6741
  compiler=$CC
7161
6742
  _LT_TAGVAR(compiler, $1)=$CC
7162
6743
  _LT_CC_BASENAME([$compiler])
7210
6791
 
7211
6792
  GCC=$lt_save_GCC
7212
6793
  CC="$lt_save_CC"
7213
 
  CFLAGS="$lt_save_CFLAGS"
7214
6794
fi # test "$_lt_disable_F77" != yes
7215
6795
 
7216
6796
AC_LANG_POP
7287
6867
  # Allow CC to be a program name with arguments.
7288
6868
  lt_save_CC="$CC"
7289
6869
  lt_save_GCC=$GCC
7290
 
  lt_save_CFLAGS=$CFLAGS
7291
6870
  CC=${FC-"f95"}
7292
 
  CFLAGS=$FCFLAGS
7293
6871
  compiler=$CC
7294
6872
  GCC=$ac_cv_fc_compiler_gnu
7295
6873
 
7345
6923
  fi # test -n "$compiler"
7346
6924
 
7347
6925
  GCC=$lt_save_GCC
7348
 
  CC=$lt_save_CC
7349
 
  CFLAGS=$lt_save_CFLAGS
 
6926
  CC="$lt_save_CC"
7350
6927
fi # test "$_lt_disable_FC" != yes
7351
6928
 
7352
6929
AC_LANG_POP
7383
6960
_LT_LINKER_BOILERPLATE
7384
6961
 
7385
6962
# Allow CC to be a program name with arguments.
7386
 
lt_save_CC=$CC
7387
 
lt_save_CFLAGS=$CFLAGS
 
6963
lt_save_CC="$CC"
7388
6964
lt_save_GCC=$GCC
7389
6965
GCC=yes
7390
6966
CC=${GCJ-"gcj"}
7391
 
CFLAGS=$GCJFLAGS
7392
6967
compiler=$CC
7393
6968
_LT_TAGVAR(compiler, $1)=$CC
7394
6969
_LT_TAGVAR(LD, $1)="$LD"
7419
6994
AC_LANG_RESTORE
7420
6995
 
7421
6996
GCC=$lt_save_GCC
7422
 
CC=$lt_save_CC
7423
 
CFLAGS=$lt_save_CFLAGS
 
6997
CC="$lt_save_CC"
7424
6998
])# _LT_LANG_GCJ_CONFIG
7425
6999
 
7426
7000
 
7455
7029
 
7456
7030
# Allow CC to be a program name with arguments.
7457
7031
lt_save_CC="$CC"
7458
 
lt_save_CFLAGS=$CFLAGS
7459
7032
lt_save_GCC=$GCC
7460
7033
GCC=
7461
7034
CC=${RC-"windres"}
7462
 
CFLAGS=
7463
7035
compiler=$CC
7464
7036
_LT_TAGVAR(compiler, $1)=$CC
7465
7037
_LT_CC_BASENAME([$compiler])
7472
7044
 
7473
7045
GCC=$lt_save_GCC
7474
7046
AC_LANG_RESTORE
7475
 
CC=$lt_save_CC
7476
 
CFLAGS=$lt_save_CFLAGS
 
7047
CC="$lt_save_CC"
7477
7048
])# _LT_LANG_RC_CONFIG
7478
7049
 
7479
7050
 
7532
7103
AC_SUBST([OBJDUMP])
7533
7104
])
7534
7105
 
7535
 
# _LT_DECL_DLLTOOL
7536
 
# ----------------
7537
 
# Ensure DLLTOOL variable is set.
7538
 
m4_defun([_LT_DECL_DLLTOOL],
7539
 
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7540
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
7541
 
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7542
 
AC_SUBST([DLLTOOL])
7543
 
])
7544
7106
 
7545
7107
# _LT_DECL_SED
7546
7108
# ------------
7634
7196
# Try some XSI features
7635
7197
xsi_shell=no
7636
7198
( _lt_dummy="a/b/c"
7637
 
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7638
 
      = c,a/b,b/c, \
 
7199
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
 
7200
      = c,a/b,, \
7639
7201
    && eval 'test $(( 1 + 1 )) -eq 2 \
7640
7202
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7641
7203
  && xsi_shell=yes
7674
7236
])# _LT_CHECK_SHELL_FEATURES
7675
7237
 
7676
7238
 
7677
 
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7678
 
# ------------------------------------------------------
7679
 
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7680
 
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7681
 
m4_defun([_LT_PROG_FUNCTION_REPLACE],
7682
 
[dnl {
7683
 
sed -e '/^$1 ()$/,/^} # $1 /c\
7684
 
$1 ()\
7685
 
{\
7686
 
m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
7687
 
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7688
 
  && mv -f "$cfgfile.tmp" "$cfgfile" \
7689
 
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7690
 
test 0 -eq $? || _lt_function_replace_fail=:
7691
 
])
7692
 
 
7693
 
 
7694
 
# _LT_PROG_REPLACE_SHELLFNS
7695
 
# -------------------------
7696
 
# Replace existing portable implementations of several shell functions with
7697
 
# equivalent extended shell implementations where those features are available..
7698
 
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7699
 
[if test x"$xsi_shell" = xyes; then
7700
 
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7701
 
    case ${1} in
7702
 
      */*) func_dirname_result="${1%/*}${2}" ;;
7703
 
      *  ) func_dirname_result="${3}" ;;
7704
 
    esac])
7705
 
 
7706
 
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7707
 
    func_basename_result="${1##*/}"])
7708
 
 
7709
 
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7710
 
    case ${1} in
7711
 
      */*) func_dirname_result="${1%/*}${2}" ;;
7712
 
      *  ) func_dirname_result="${3}" ;;
7713
 
    esac
7714
 
    func_basename_result="${1##*/}"])
7715
 
 
7716
 
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7717
 
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7718
 
    # positional parameters, so assign one to ordinary parameter first.
7719
 
    func_stripname_result=${3}
7720
 
    func_stripname_result=${func_stripname_result#"${1}"}
7721
 
    func_stripname_result=${func_stripname_result%"${2}"}])
7722
 
 
7723
 
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7724
 
    func_split_long_opt_name=${1%%=*}
7725
 
    func_split_long_opt_arg=${1#*=}])
7726
 
 
7727
 
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7728
 
    func_split_short_opt_arg=${1#??}
7729
 
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7730
 
 
7731
 
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7732
 
    case ${1} in
7733
 
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7734
 
      *)    func_lo2o_result=${1} ;;
7735
 
    esac])
7736
 
 
7737
 
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
7738
 
 
7739
 
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
7740
 
 
7741
 
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
7742
 
fi
7743
 
 
7744
 
if test x"$lt_shell_append" = xyes; then
7745
 
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
7746
 
 
7747
 
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7748
 
    func_quote_for_eval "${2}"
7749
 
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7750
 
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7751
 
 
7752
 
  # Save a `func_append' function call where possible by direct use of '+='
7753
 
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7754
 
    && mv -f "$cfgfile.tmp" "$cfgfile" \
7755
 
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7756
 
  test 0 -eq $? || _lt_function_replace_fail=:
7757
 
else
7758
 
  # Save a `func_append' function call even when '+=' is not available
7759
 
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7760
 
    && mv -f "$cfgfile.tmp" "$cfgfile" \
7761
 
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7762
 
  test 0 -eq $? || _lt_function_replace_fail=:
7763
 
fi
7764
 
 
7765
 
if test x"$_lt_function_replace_fail" = x":"; then
7766
 
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7767
 
fi
7768
 
])
7769
 
 
7770
 
# _LT_PATH_CONVERSION_FUNCTIONS
7771
 
# -----------------------------
7772
 
# Determine which file name conversion functions should be used by
7773
 
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
7774
 
# for certain cross-compile configurations and native mingw.
7775
 
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7776
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7777
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7778
 
AC_MSG_CHECKING([how to convert $build file names to $host format])
7779
 
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7780
 
[case $host in
7781
 
  *-*-mingw* )
7782
 
    case $build in
7783
 
      *-*-mingw* ) # actually msys
7784
 
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7785
 
        ;;
7786
 
      *-*-cygwin* )
7787
 
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7788
 
        ;;
7789
 
      * ) # otherwise, assume *nix
7790
 
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7791
 
        ;;
7792
 
    esac
7793
 
    ;;
7794
 
  *-*-cygwin* )
7795
 
    case $build in
7796
 
      *-*-mingw* ) # actually msys
7797
 
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7798
 
        ;;
7799
 
      *-*-cygwin* )
7800
 
        lt_cv_to_host_file_cmd=func_convert_file_noop
7801
 
        ;;
7802
 
      * ) # otherwise, assume *nix
7803
 
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7804
 
        ;;
7805
 
    esac
7806
 
    ;;
7807
 
  * ) # unhandled hosts (and "normal" native builds)
7808
 
    lt_cv_to_host_file_cmd=func_convert_file_noop
7809
 
    ;;
7810
 
esac
7811
 
])
7812
 
to_host_file_cmd=$lt_cv_to_host_file_cmd
7813
 
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7814
 
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7815
 
         [0], [convert $build file names to $host format])dnl
7816
 
 
7817
 
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7818
 
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7819
 
[#assume ordinary cross tools, or native build.
7820
 
lt_cv_to_tool_file_cmd=func_convert_file_noop
7821
 
case $host in
7822
 
  *-*-mingw* )
7823
 
    case $build in
7824
 
      *-*-mingw* ) # actually msys
7825
 
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7826
 
        ;;
7827
 
    esac
7828
 
    ;;
7829
 
esac
7830
 
])
7831
 
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7832
 
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7833
 
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7834
 
         [0], [convert $build files to toolchain format])dnl
7835
 
])# _LT_PATH_CONVERSION_FUNCTIONS
 
7239
# _LT_PROG_XSI_SHELLFNS
 
7240
# ---------------------
 
7241
# Bourne and XSI compatible variants of some useful shell functions.
 
7242
m4_defun([_LT_PROG_XSI_SHELLFNS],
 
7243
[case $xsi_shell in
 
7244
  yes)
 
7245
    cat << \_LT_EOF >> "$cfgfile"
 
7246
 
 
7247
# func_dirname file append nondir_replacement
 
7248
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
7249
# otherwise set result to NONDIR_REPLACEMENT.
 
7250
func_dirname ()
 
7251
{
 
7252
  case ${1} in
 
7253
    */*) func_dirname_result="${1%/*}${2}" ;;
 
7254
    *  ) func_dirname_result="${3}" ;;
 
7255
  esac
 
7256
}
 
7257
 
 
7258
# func_basename file
 
7259
func_basename ()
 
7260
{
 
7261
  func_basename_result="${1##*/}"
 
7262
}
 
7263
 
 
7264
# func_dirname_and_basename file append nondir_replacement
 
7265
# perform func_basename and func_dirname in a single function
 
7266
# call:
 
7267
#   dirname:  Compute the dirname of FILE.  If nonempty,
 
7268
#             add APPEND to the result, otherwise set result
 
7269
#             to NONDIR_REPLACEMENT.
 
7270
#             value returned in "$func_dirname_result"
 
7271
#   basename: Compute filename of FILE.
 
7272
#             value retuned in "$func_basename_result"
 
7273
# Implementation must be kept synchronized with func_dirname
 
7274
# and func_basename. For efficiency, we do not delegate to
 
7275
# those functions but instead duplicate the functionality here.
 
7276
func_dirname_and_basename ()
 
7277
{
 
7278
  case ${1} in
 
7279
    */*) func_dirname_result="${1%/*}${2}" ;;
 
7280
    *  ) func_dirname_result="${3}" ;;
 
7281
  esac
 
7282
  func_basename_result="${1##*/}"
 
7283
}
 
7284
 
 
7285
# func_stripname prefix suffix name
 
7286
# strip PREFIX and SUFFIX off of NAME.
 
7287
# PREFIX and SUFFIX must not contain globbing or regex special
 
7288
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
7289
# dot (in which case that matches only a dot).
 
7290
func_stripname ()
 
7291
{
 
7292
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
7293
  # positional parameters, so assign one to ordinary parameter first.
 
7294
  func_stripname_result=${3}
 
7295
  func_stripname_result=${func_stripname_result#"${1}"}
 
7296
  func_stripname_result=${func_stripname_result%"${2}"}
 
7297
}
 
7298
 
 
7299
# func_opt_split
 
7300
func_opt_split ()
 
7301
{
 
7302
  func_opt_split_opt=${1%%=*}
 
7303
  func_opt_split_arg=${1#*=}
 
7304
}
 
7305
 
 
7306
# func_lo2o object
 
7307
func_lo2o ()
 
7308
{
 
7309
  case ${1} in
 
7310
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
7311
    *)    func_lo2o_result=${1} ;;
 
7312
  esac
 
7313
}
 
7314
 
 
7315
# func_xform libobj-or-source
 
7316
func_xform ()
 
7317
{
 
7318
  func_xform_result=${1%.*}.lo
 
7319
}
 
7320
 
 
7321
# func_arith arithmetic-term...
 
7322
func_arith ()
 
7323
{
 
7324
  func_arith_result=$(( $[*] ))
 
7325
}
 
7326
 
 
7327
# func_len string
 
7328
# STRING may not start with a hyphen.
 
7329
func_len ()
 
7330
{
 
7331
  func_len_result=${#1}
 
7332
}
 
7333
 
 
7334
_LT_EOF
 
7335
    ;;
 
7336
  *) # Bourne compatible functions.
 
7337
    cat << \_LT_EOF >> "$cfgfile"
 
7338
 
 
7339
# func_dirname file append nondir_replacement
 
7340
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
7341
# otherwise set result to NONDIR_REPLACEMENT.
 
7342
func_dirname ()
 
7343
{
 
7344
  # Extract subdirectory from the argument.
 
7345
  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
 
7346
  if test "X$func_dirname_result" = "X${1}"; then
 
7347
    func_dirname_result="${3}"
 
7348
  else
 
7349
    func_dirname_result="$func_dirname_result${2}"
 
7350
  fi
 
7351
}
 
7352
 
 
7353
# func_basename file
 
7354
func_basename ()
 
7355
{
 
7356
  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
 
7357
}
 
7358
 
 
7359
dnl func_dirname_and_basename
 
7360
dnl A portable version of this function is already defined in general.m4sh
 
7361
dnl so there is no need for it here.
 
7362
 
 
7363
# func_stripname prefix suffix name
 
7364
# strip PREFIX and SUFFIX off of NAME.
 
7365
# PREFIX and SUFFIX must not contain globbing or regex special
 
7366
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
7367
# dot (in which case that matches only a dot).
 
7368
# func_strip_suffix prefix name
 
7369
func_stripname ()
 
7370
{
 
7371
  case ${2} in
 
7372
    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
 
7373
    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
 
7374
  esac
 
7375
}
 
7376
 
 
7377
# sed scripts:
 
7378
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
 
7379
my_sed_long_arg='1s/^-[[^=]]*=//'
 
7380
 
 
7381
# func_opt_split
 
7382
func_opt_split ()
 
7383
{
 
7384
  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
 
7385
  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
 
7386
}
 
7387
 
 
7388
# func_lo2o object
 
7389
func_lo2o ()
 
7390
{
 
7391
  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
 
7392
}
 
7393
 
 
7394
# func_xform libobj-or-source
 
7395
func_xform ()
 
7396
{
 
7397
  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
 
7398
}
 
7399
 
 
7400
# func_arith arithmetic-term...
 
7401
func_arith ()
 
7402
{
 
7403
  func_arith_result=`expr "$[@]"`
 
7404
}
 
7405
 
 
7406
# func_len string
 
7407
# STRING may not start with a hyphen.
 
7408
func_len ()
 
7409
{
 
7410
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
 
7411
}
 
7412
 
 
7413
_LT_EOF
 
7414
esac
 
7415
 
 
7416
case $lt_shell_append in
 
7417
  yes)
 
7418
    cat << \_LT_EOF >> "$cfgfile"
 
7419
 
 
7420
# func_append var value
 
7421
# Append VALUE to the end of shell variable VAR.
 
7422
func_append ()
 
7423
{
 
7424
  eval "$[1]+=\$[2]"
 
7425
}
 
7426
_LT_EOF
 
7427
    ;;
 
7428
  *)
 
7429
    cat << \_LT_EOF >> "$cfgfile"
 
7430
 
 
7431
# func_append var value
 
7432
# Append VALUE to the end of shell variable VAR.
 
7433
func_append ()
 
7434
{
 
7435
  eval "$[1]=\$$[1]\$[2]"
 
7436
}
 
7437
 
 
7438
_LT_EOF
 
7439
    ;;
 
7440
  esac
 
7441
])