~ubuntu-branches/ubuntu/saucy/augeas/saucy-proposed

« back to all changes in this revision

Viewing changes to gnulib/m4/libtool.m4

  • Committer: Package Import Robot
  • Author(s): Nicolas Valcárcel Scerpella
  • Date: 2011-11-10 09:20:03 UTC
  • mto: (1.5.1) (19.1.11 precise)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: package-import@ubuntu.com-20111110092003-sb3z6bq97rlb96de
Tags: upstream-0.9.0
Import upstream version 0.9.0

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
171
172
m4_require([_LT_CMD_RELOAD])dnl
172
173
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
174
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
173
175
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
174
176
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
177
m4_require([_LT_WITH_SYSROOT])dnl
175
178
 
176
179
_LT_CONFIG_LIBTOOL_INIT([
177
180
# See if we are running on zsh, and set the options which allow our
748
751
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
749
752
  # text mode, it properly converts lines to CR/LF.  This bash problem
750
753
  # is reportedly fixed, but why not run on old versions too?
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" ||
 
754
  sed '$q' "$ltmain" >> "$cfgfile" \
 
755
     || (rm -f "$cfgfile"; exit 1)
 
756
 
 
757
  _LT_PROG_REPLACE_SHELLFNS
 
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
1077
 
# -----------------------
 
1076
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
 
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.
1084
1086
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1085
1087
[m4_require([_LT_DECL_SED])dnl
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
 
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
1100
1111
])# _LT_SYS_MODULE_PATH_AIX
1101
1112
 
1102
1113
 
1121
1132
 
1122
1133
AC_MSG_CHECKING([how to print strings])
1123
1134
# Test print first, because it will be a builtin if present.
1124
 
if test "X`print -r -- -n 2>/dev/null`" = X-n && \
 
1135
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1125
1136
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1126
1137
  ECHO='print -r --'
1127
1138
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1165
1176
])# _LT_PROG_ECHO_BACKSLASH
1166
1177
 
1167
1178
 
 
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
 
1168
1212
# _LT_ENABLE_LOCK
1169
1213
# ---------------
1170
1214
m4_defun([_LT_ENABLE_LOCK],
1311
1355
])# _LT_ENABLE_LOCK
1312
1356
 
1313
1357
 
 
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
 
1314
1395
# _LT_CMD_OLD_ARCHIVE
1315
1396
# -------------------
1316
1397
m4_defun([_LT_CMD_OLD_ARCHIVE],
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])
 
1398
[_LT_PROG_AR
1322
1399
 
1323
1400
AC_CHECK_TOOL(STRIP, strip, :)
1324
1401
test -z "$STRIP" && STRIP=:
1658
1735
/* When -fvisbility=hidden is used, assume the code has been annotated
1659
1736
   correspondingly for the symbols needed.  */
1660
1737
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1661
 
void fnord () __attribute__((visibility("default")));
 
1738
int fnord () __attribute__((visibility("default")));
1662
1739
#endif
1663
1740
 
1664
 
void fnord () { int i=42; }
 
1741
int fnord () { return 42; }
1665
1742
int main ()
1666
1743
{
1667
1744
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2201
2278
  need_version=no
2202
2279
  need_lib_prefix=no
2203
2280
 
2204
 
  case $GCC,$host_os in
2205
 
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
2281
  case $GCC,$cc_basename in
 
2282
  yes,*)
 
2283
    # gcc
2206
2284
    library_names_spec='$libname.dll.a'
2207
2285
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2208
2286
    postinstall_cmds='base_file=`basename \${file}`~
2235
2313
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2236
2314
      ;;
2237
2315
    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'
2238
2373
    ;;
2239
2374
 
2240
2375
  *)
 
2376
    # Assume MSVC wrapper
2241
2377
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
2378
    dynamic_linker='Win32 ld.exe'
2242
2379
    ;;
2243
2380
  esac
2244
 
  dynamic_linker='Win32 ld.exe'
2245
2381
  # FIXME: first we should search . and the directory the executable is in
2246
2382
  shlibpath_var=PATH
2247
2383
  ;;
2949
3085
esac
2950
3086
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2951
3087
case $host_os in
 
3088
  cygwin* | mingw* | pw32* | cegcc*)
 
3089
    if test "$GCC" != yes; then
 
3090
      reload_cmds=false
 
3091
    fi
 
3092
    ;;
2952
3093
  darwin*)
2953
3094
    if test "$GCC" = yes; then
2954
3095
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3167
3308
  ;;
3168
3309
esac
3169
3310
])
 
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
 
3170
3326
file_magic_cmd=$lt_cv_file_magic_cmd
3171
3327
deplibs_check_method=$lt_cv_deplibs_check_method
3172
3328
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3174
3330
_LT_DECL([], [deplibs_check_method], [1],
3175
3331
    [Method to check whether dependent libraries are shared objects])
3176
3332
_LT_DECL([], [file_magic_cmd], [1],
3177
 
    [Command to use when deplibs_check_method == "file_magic"])
 
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"])
3178
3338
])# _LT_CHECK_MAGIC_METHOD
3179
3339
 
3180
3340
 
3277
3437
dnl AC_DEFUN([AM_PROG_NM], [])
3278
3438
dnl AC_DEFUN([AC_PROG_NM], [])
3279
3439
 
 
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
 
3280
3501
 
3281
3502
# LT_LIB_M
3282
3503
# --------
3403
3624
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3404
3625
 
3405
3626
# Transform an extracted symbol line into symbol name and symbol address
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'"
 
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'"
3408
3629
 
3409
3630
# Handle CRLF in mingw tool chain
3410
3631
opt_cr=
3440
3661
  else
3441
3662
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3442
3663
  fi
 
3664
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3443
3665
 
3444
3666
  # Check to see that the pipe works correctly.
3445
3667
  pipe_works=no
3473
3695
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3474
3696
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3475
3697
          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
 
3476
3710
#ifdef __cplusplus
3477
3711
extern "C" {
3478
3712
#endif
3484
3718
          cat <<_LT_EOF >> conftest.$ac_ext
3485
3719
 
3486
3720
/* The mapping between symbol names and symbols.  */
3487
 
const struct {
 
3721
LT@&t@_DLSYM_CONST struct {
3488
3722
  const char *name;
3489
3723
  void       *address;
3490
3724
}
3510
3744
_LT_EOF
3511
3745
          # Now try linking the two files.
3512
3746
          mv conftest.$ac_objext conftstm.$ac_objext
3513
 
          lt_save_LIBS="$LIBS"
3514
 
          lt_save_CFLAGS="$CFLAGS"
 
3747
          lt_globsym_save_LIBS=$LIBS
 
3748
          lt_globsym_save_CFLAGS=$CFLAGS
3515
3749
          LIBS="conftstm.$ac_objext"
3516
3750
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3517
3751
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3518
3752
            pipe_works=yes
3519
3753
          fi
3520
 
          LIBS="$lt_save_LIBS"
3521
 
          CFLAGS="$lt_save_CFLAGS"
 
3754
          LIBS=$lt_globsym_save_LIBS
 
3755
          CFLAGS=$lt_globsym_save_CFLAGS
3522
3756
        else
3523
3757
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3524
3758
        fi
3551
3785
  AC_MSG_RESULT(ok)
3552
3786
fi
3553
3787
 
 
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
 
3554
3795
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3555
3796
    [Take the output of nm and produce a listing of raw symbols and C names])
3556
3797
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3561
3802
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3562
3803
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3563
3804
    [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])
3564
3807
]) # _LT_CMD_GLOBAL_SYMBOLS
3565
3808
 
3566
3809
 
3572
3815
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3573
3816
_LT_TAGVAR(lt_prog_compiler_static, $1)=
3574
3817
 
3575
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
3576
3818
m4_if([$1], [CXX], [
3577
3819
  # C++ specific cases for pic, static, wl, etc.
3578
3820
  if test "$GXX" = yes; then
3677
3919
          ;;
3678
3920
        esac
3679
3921
        ;;
 
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
        ;;
3680
3928
      dgux*)
3681
3929
        case $cc_basename in
3682
3930
          ec++*)
4051
4299
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4052
4300
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4053
4301
        ;;
 
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
        ;;
4054
4308
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4055
4309
        # Portland Group compilers (*not* the Pentium gcc compiler,
4056
4310
        # which looks to be a dead project)
4170
4424
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4171
4425
    ;;
4172
4426
esac
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])
 
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)
4176
4432
 
4177
4433
#
4178
4434
# Check to make sure the PIC flag actually works.
4191
4447
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4192
4448
        [Additional compiler flags for building library objects])
4193
4449
 
 
4450
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
4451
        [How to pass a linker flag through the compiler])
4194
4452
#
4195
4453
# Check to make sure the static flag actually works.
4196
4454
#
4211
4469
m4_defun([_LT_LINKER_SHLIBS],
4212
4470
[AC_REQUIRE([LT_PATH_LD])dnl
4213
4471
AC_REQUIRE([LT_PATH_NM])dnl
 
4472
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4214
4473
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4215
4474
m4_require([_LT_DECL_EGREP])dnl
4216
4475
m4_require([_LT_DECL_SED])dnl
4219
4478
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4220
4479
m4_if([$1], [CXX], [
4221
4480
  _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]_.*']
4222
4482
  case $host_os in
4223
4483
  aix[[4-9]]*)
4224
4484
    # If we're using GNU nm, then we don't want the "-C" option.
4233
4493
    ;;
4234
4494
  pw32*)
4235
4495
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4236
 
  ;;
 
4496
    ;;
4237
4497
  cygwin* | mingw* | cegcc*)
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
 
  ;;
 
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
    ;;
4240
4506
  *)
4241
4507
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4242
 
  ;;
 
4508
    ;;
4243
4509
  esac
4244
 
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4245
4510
], [
4246
4511
  runpath_var=
4247
4512
  _LT_TAGVAR(allow_undefined_flag, $1)=
4409
4674
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4410
4675
      _LT_TAGVAR(always_export_symbols, $1)=no
4411
4676
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
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'
 
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']
4413
4679
 
4414
4680
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4415
4681
        _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'
4457
4723
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4458
4724
         && test "$tmp_diet" = no
4459
4725
      then
4460
 
        tmp_addflag=
 
4726
        tmp_addflag=' $pic_flag'
4461
4727
        tmp_sharedflag='-shared'
4462
4728
        case $cc_basename,$host_cpu in
4463
4729
        pgcc*)                          # Portland Group C compiler
4527
4793
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4528
4794
        wlarc=
4529
4795
      else
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'
 
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'
4532
4798
      fi
4533
4799
      ;;
4534
4800
 
4546
4812
 
4547
4813
_LT_EOF
4548
4814
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
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'
 
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'
4551
4817
      else
4552
4818
        _LT_TAGVAR(ld_shlibs, $1)=no
4553
4819
      fi
4593
4859
 
4594
4860
    *)
4595
4861
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
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'
 
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'
4598
4864
      else
4599
4865
        _LT_TAGVAR(ld_shlibs, $1)=no
4600
4866
      fi
4724
4990
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4725
4991
        # Determine the default libpath from the value encoded in an
4726
4992
        # empty executable.
4727
 
        _LT_SYS_MODULE_PATH_AIX
 
4993
        _LT_SYS_MODULE_PATH_AIX([$1])
4728
4994
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4729
4995
        _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"
4730
4996
      else
4735
5001
        else
4736
5002
         # Determine the default libpath from the value encoded in an
4737
5003
         # empty executable.
4738
 
         _LT_SYS_MODULE_PATH_AIX
 
5004
         _LT_SYS_MODULE_PATH_AIX([$1])
4739
5005
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4740
5006
          # Warning - without using the other run time loading flags,
4741
5007
          # -berok will link without error, but may produce a broken library.
4779
5045
      # Microsoft Visual C++.
4780
5046
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4781
5047
      # no search path for DLLs.
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
 
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
4796
5105
      ;;
4797
5106
 
4798
5107
    darwin* | rhapsody*)
4830
5139
 
4831
5140
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4832
5141
    freebsd* | dragonfly*)
4833
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5142
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4834
5143
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4835
5144
      _LT_TAGVAR(hardcode_direct, $1)=yes
4836
5145
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4838
5147
 
4839
5148
    hpux9*)
4840
5149
      if test "$GCC" = yes; then
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'
 
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'
4842
5151
      else
4843
5152
        _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'
4844
5153
      fi
4854
5163
 
4855
5164
    hpux10*)
4856
5165
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
4857
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
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'
4858
5167
      else
4859
5168
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4860
5169
      fi
4878
5187
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4879
5188
          ;;
4880
5189
        ia64*)
4881
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5190
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4882
5191
          ;;
4883
5192
        *)
4884
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
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'
4885
5194
          ;;
4886
5195
        esac
4887
5196
      else
4928
5237
 
4929
5238
    irix5* | irix6* | nonstopux*)
4930
5239
      if test "$GCC" = yes; then
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'
 
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'
4932
5241
        # Try to use the -exported_symbol ld option, if it does not
4933
5242
        # work, assume that -exports_file does not work either and
4934
5243
        # implicitly export all symbols.
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"
 
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
4941
5265
      else
4942
5266
        _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'
4943
5267
        _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'
5022
5346
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
5023
5347
      if test "$GCC" = yes; then
5024
5348
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
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'
 
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'
5026
5350
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5027
5351
      else
5028
5352
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5041
5365
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5042
5366
      if test "$GCC" = yes; then
5043
5367
        wlarc='${wl}'
5044
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5368
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5045
5369
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $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'
 
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'
5047
5371
      else
5048
5372
        case `$CC -V 2>&1` in
5049
5373
        *"Compilers 5.0"*)
5315
5639
    to runtime path list])
5316
5640
_LT_TAGDECL([], [link_all_deplibs], [0],
5317
5641
    [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])
5320
5642
_LT_TAGDECL([], [always_export_symbols], [0],
5321
5643
    [Set to "yes" if exported symbols are required])
5322
5644
_LT_TAGDECL([], [export_symbols_cmds], [2],
5327
5649
    [Symbols that must always be exported])
5328
5650
_LT_TAGDECL([], [prelink_cmds], [2],
5329
5651
    [Commands necessary for linking programs (against libraries) with templates])
 
5652
_LT_TAGDECL([], [postlink_cmds], [2],
 
5653
    [Commands necessary for finishing linking programs])
5330
5654
_LT_TAGDECL([], [file_list_spec], [1],
5331
5655
    [Specify filename containing input files])
5332
5656
dnl FIXME: Not yet implemented
5428
5752
m4_defun([_LT_LANG_CXX_CONFIG],
5429
5753
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5430
5754
m4_require([_LT_DECL_EGREP])dnl
 
5755
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5431
5756
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5432
5757
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5433
5758
    (test "X$CXX" != "Xg++"))) ; then
5489
5814
 
5490
5815
  # Allow CC to be a program name with arguments.
5491
5816
  lt_save_CC=$CC
 
5817
  lt_save_CFLAGS=$CFLAGS
5492
5818
  lt_save_LD=$LD
5493
5819
  lt_save_GCC=$GCC
5494
5820
  GCC=$GXX
5506
5832
  fi
5507
5833
  test -z "${LDCXX+set}" || LD=$LDCXX
5508
5834
  CC=${CXX-"c++"}
 
5835
  CFLAGS=$CXXFLAGS
5509
5836
  compiler=$CC
5510
5837
  _LT_TAGVAR(compiler, $1)=$CC
5511
5838
  _LT_CC_BASENAME([$compiler])
5527
5854
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5528
5855
      # archiving commands below assume that GNU ld is being used.
5529
5856
      if test "$with_gnu_ld" = yes; then
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'
 
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'
5532
5859
 
5533
5860
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5534
5861
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5669
5996
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5670
5997
          # Determine the default libpath from the value encoded in an empty
5671
5998
          # executable.
5672
 
          _LT_SYS_MODULE_PATH_AIX
 
5999
          _LT_SYS_MODULE_PATH_AIX([$1])
5673
6000
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5674
6001
 
5675
6002
          _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"
5681
6008
          else
5682
6009
            # Determine the default libpath from the value encoded in an
5683
6010
            # empty executable.
5684
 
            _LT_SYS_MODULE_PATH_AIX
 
6011
            _LT_SYS_MODULE_PATH_AIX([$1])
5685
6012
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5686
6013
            # Warning - without using the other run time loading flags,
5687
6014
            # -berok will link without error, but may produce a broken library.
5723
6050
        ;;
5724
6051
 
5725
6052
      cygwin* | mingw* | pw32* | cegcc*)
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
 
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
5733
6104
 
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
 
        ;;
 
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
        ;;
5749
6122
      darwin* | rhapsody*)
5750
6123
        _LT_DARWIN_LINKER_FEATURES($1)
5751
6124
        ;;
5820
6193
            ;;
5821
6194
          *)
5822
6195
            if test "$GXX" = yes; then
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'
 
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'
5824
6197
            else
5825
6198
              # FIXME: insert proper C++ library support
5826
6199
              _LT_TAGVAR(ld_shlibs, $1)=no
5891
6264
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5892
6265
                    ;;
5893
6266
                  ia64*)
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'
 
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'
5895
6268
                    ;;
5896
6269
                  *)
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'
 
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'
5898
6271
                    ;;
5899
6272
                esac
5900
6273
              fi
5935
6308
          *)
5936
6309
            if test "$GXX" = yes; then
5937
6310
              if test "$with_gnu_ld" = no; then
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'
 
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'
5939
6312
              else
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'
 
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'
5941
6314
              fi
5942
6315
            fi
5943
6316
            _LT_TAGVAR(link_all_deplibs, $1)=yes
6215
6588
                  _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'
6216
6589
                  ;;
6217
6590
                *)
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'
 
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'
6219
6592
                  ;;
6220
6593
              esac
6221
6594
 
6302
6675
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6303
6676
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6304
6677
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6305
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
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'
6306
6679
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6307
 
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $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'
6308
6681
 
6309
6682
                # Commands to make compiler produce verbose output that lists
6310
6683
                # what "hidden" libraries, object files and flags are used when
6433
6806
  fi # test -n "$compiler"
6434
6807
 
6435
6808
  CC=$lt_save_CC
 
6809
  CFLAGS=$lt_save_CFLAGS
6436
6810
  LDCXX=$LD
6437
6811
  LD=$lt_save_LD
6438
6812
  GCC=$lt_save_GCC
6447
6821
])# _LT_LANG_CXX_CONFIG
6448
6822
 
6449
6823
 
 
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
 
6450
6847
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6451
6848
# ---------------------------------
6452
6849
# Figure out "hidden" library dependencies from verbose
6455
6852
# objects, libraries and library flags.
6456
6853
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6457
6854
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6855
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6458
6856
# Dependencies to place before and after the object being linked:
6459
6857
_LT_TAGVAR(predep_objects, $1)=
6460
6858
_LT_TAGVAR(postdep_objects, $1)=
6505
6903
};
6506
6904
_LT_EOF
6507
6905
])
 
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
 
6508
6913
dnl Parse the compiler output and extract the necessary
6509
6914
dnl objects, libraries and library flags.
6510
6915
if AC_TRY_EVAL(ac_compile); then
6516
6921
  pre_test_object_deps_done=no
6517
6922
 
6518
6923
  for p in `eval "$output_verbose_link_cmd"`; do
6519
 
    case $p in
 
6924
    case ${prev}${p} in
6520
6925
 
6521
6926
    -L* | -R* | -l*)
6522
6927
       # Some compilers place space between "-{L,R}" and the path.
6525
6930
          test $p = "-R"; then
6526
6931
         prev=$p
6527
6932
         continue
6528
 
       else
6529
 
         prev=
6530
6933
       fi
6531
6934
 
 
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
6532
6946
       if test "$pre_test_object_deps_done" = no; then
6533
 
         case $p in
6534
 
         -L* | -R*)
 
6947
         case ${prev} in
 
6948
         -L | -R)
6535
6949
           # Internal compiler library paths should come after those
6536
6950
           # provided the user.  The postdeps already come after the
6537
6951
           # user supplied libs so there is no need to process them.
6551
6965
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6552
6966
         fi
6553
6967
       fi
 
6968
       prev=
6554
6969
       ;;
6555
6970
 
 
6971
    *.lto.$objext) ;; # Ignore GCC LTO objects
6556
6972
    *.$objext)
6557
6973
       # This assumes that the test object file only shows up
6558
6974
       # once in the compiler output.
6588
7004
fi
6589
7005
 
6590
7006
$RM -f confest.$objext
 
7007
CFLAGS=$_lt_libdeps_save_CFLAGS
6591
7008
 
6592
7009
# PORTME: override above test on systems where it is broken
6593
7010
m4_if([$1], [CXX],
6737
7154
  # Allow CC to be a program name with arguments.
6738
7155
  lt_save_CC="$CC"
6739
7156
  lt_save_GCC=$GCC
 
7157
  lt_save_CFLAGS=$CFLAGS
6740
7158
  CC=${F77-"f77"}
 
7159
  CFLAGS=$FFLAGS
6741
7160
  compiler=$CC
6742
7161
  _LT_TAGVAR(compiler, $1)=$CC
6743
7162
  _LT_CC_BASENAME([$compiler])
6791
7210
 
6792
7211
  GCC=$lt_save_GCC
6793
7212
  CC="$lt_save_CC"
 
7213
  CFLAGS="$lt_save_CFLAGS"
6794
7214
fi # test "$_lt_disable_F77" != yes
6795
7215
 
6796
7216
AC_LANG_POP
6867
7287
  # Allow CC to be a program name with arguments.
6868
7288
  lt_save_CC="$CC"
6869
7289
  lt_save_GCC=$GCC
 
7290
  lt_save_CFLAGS=$CFLAGS
6870
7291
  CC=${FC-"f95"}
 
7292
  CFLAGS=$FCFLAGS
6871
7293
  compiler=$CC
6872
7294
  GCC=$ac_cv_fc_compiler_gnu
6873
7295
 
6923
7345
  fi # test -n "$compiler"
6924
7346
 
6925
7347
  GCC=$lt_save_GCC
6926
 
  CC="$lt_save_CC"
 
7348
  CC=$lt_save_CC
 
7349
  CFLAGS=$lt_save_CFLAGS
6927
7350
fi # test "$_lt_disable_FC" != yes
6928
7351
 
6929
7352
AC_LANG_POP
6960
7383
_LT_LINKER_BOILERPLATE
6961
7384
 
6962
7385
# Allow CC to be a program name with arguments.
6963
 
lt_save_CC="$CC"
 
7386
lt_save_CC=$CC
 
7387
lt_save_CFLAGS=$CFLAGS
6964
7388
lt_save_GCC=$GCC
6965
7389
GCC=yes
6966
7390
CC=${GCJ-"gcj"}
 
7391
CFLAGS=$GCJFLAGS
6967
7392
compiler=$CC
6968
7393
_LT_TAGVAR(compiler, $1)=$CC
6969
7394
_LT_TAGVAR(LD, $1)="$LD"
6994
7419
AC_LANG_RESTORE
6995
7420
 
6996
7421
GCC=$lt_save_GCC
6997
 
CC="$lt_save_CC"
 
7422
CC=$lt_save_CC
 
7423
CFLAGS=$lt_save_CFLAGS
6998
7424
])# _LT_LANG_GCJ_CONFIG
6999
7425
 
7000
7426
 
7029
7455
 
7030
7456
# Allow CC to be a program name with arguments.
7031
7457
lt_save_CC="$CC"
 
7458
lt_save_CFLAGS=$CFLAGS
7032
7459
lt_save_GCC=$GCC
7033
7460
GCC=
7034
7461
CC=${RC-"windres"}
 
7462
CFLAGS=
7035
7463
compiler=$CC
7036
7464
_LT_TAGVAR(compiler, $1)=$CC
7037
7465
_LT_CC_BASENAME([$compiler])
7044
7472
 
7045
7473
GCC=$lt_save_GCC
7046
7474
AC_LANG_RESTORE
7047
 
CC="$lt_save_CC"
 
7475
CC=$lt_save_CC
 
7476
CFLAGS=$lt_save_CFLAGS
7048
7477
])# _LT_LANG_RC_CONFIG
7049
7478
 
7050
7479
 
7103
7532
AC_SUBST([OBJDUMP])
7104
7533
])
7105
7534
 
 
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
])
7106
7544
 
7107
7545
# _LT_DECL_SED
7108
7546
# ------------
7196
7634
# Try some XSI features
7197
7635
xsi_shell=no
7198
7636
( _lt_dummy="a/b/c"
7199
 
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7200
 
      = c,a/b,, \
 
7637
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
 
7638
      = c,a/b,b/c, \
7201
7639
    && eval 'test $(( 1 + 1 )) -eq 2 \
7202
7640
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7203
7641
  && xsi_shell=yes
7236
7674
])# _LT_CHECK_SHELL_FEATURES
7237
7675
 
7238
7676
 
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
 
])
 
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