Import upstream version 2.10.0+git20210727.2.a65ecab
Debian Janitor
1 year, 10 months ago
233 | 233 | ETAGS = @ETAGS@ |
234 | 234 | EXEEXT = @EXEEXT@ |
235 | 235 | FGREP = @FGREP@ |
236 | FILECMD = @FILECMD@ | |
236 | 237 | GREP = @GREP@ |
237 | 238 | GTK_CONFIG = @GTK_CONFIG@ |
238 | 239 | INSTALL = @INSTALL@ |
21 | 21 | |
22 | 22 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
23 | 23 | # |
24 | # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. | |
24 | # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software | |
25 | # Foundation, Inc. | |
25 | 26 | # Written by Gordon Matzigkeit, 1996 |
26 | 27 | # |
27 | 28 | # This file is free software; the Free Software Foundation gives |
52 | 53 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
53 | 54 | ]) |
54 | 55 | |
55 | # serial 58 LT_INIT | |
56 | # serial 59 LT_INIT | |
56 | 57 | |
57 | 58 | |
58 | 59 | # LT_PREREQ(VERSION) |
202 | 203 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
203 | 204 | m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl |
204 | 205 | m4_require([_LT_CMD_RELOAD])dnl |
206 | m4_require([_LT_DECL_FILECMD])dnl | |
205 | 207 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl |
206 | 208 | m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl |
207 | 209 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl |
240 | 242 | ofile=libtool |
241 | 243 | can_build_shared=yes |
242 | 244 | |
243 | # All known linkers require a '.a' archive for static linking (except MSVC, | |
244 | # which needs '.lib'). | |
245 | # All known linkers require a '.a' archive for static linking (except MSVC and | |
246 | # ICC, which need '.lib'). | |
245 | 247 | libext=a |
246 | 248 | |
247 | 249 | with_gnu_ld=$lt_cv_prog_gnu_ld |
792 | 794 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
793 | 795 | # text mode, it properly converts lines to CR/LF. This bash problem |
794 | 796 | # is reportedly fixed, but why not run on old versions too? |
795 | sed '$q' "$ltmain" >> "$cfgfile" \ | |
797 | $SED '$q' "$ltmain" >> "$cfgfile" \ | |
796 | 798 | || (rm -f "$cfgfile"; exit 1) |
797 | 799 | |
798 | 800 | mv -f "$cfgfile" "$ofile" || |
1054 | 1056 | _LT_EOF |
1055 | 1057 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD |
1056 | 1058 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD |
1057 | echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | |
1058 | $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | |
1059 | echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | |
1060 | $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | |
1059 | 1061 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD |
1060 | 1062 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD |
1061 | 1063 | cat > conftest.c << _LT_EOF |
1079 | 1081 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
1080 | 1082 | darwin1.*) |
1081 | 1083 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
1082 | darwin*) # darwin 5.x on | |
1083 | # if running on 10.5 or later, the deployment target defaults | |
1084 | # to the OS version, if on x86, and 10.4, the deployment | |
1085 | # target defaults to 10.4. Don't you love it? | |
1086 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
1087 | 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) | |
1088 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
1089 | 10.[[012]][[,.]]*) | |
1090 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | |
1091 | 10.*|11.*) | |
1092 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
1084 | darwin*) | |
1085 | case $MACOSX_DEPLOYMENT_TARGET,$host in | |
1086 | 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) | |
1087 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | |
1088 | *) | |
1089 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
1093 | 1090 | esac |
1094 | 1091 | ;; |
1095 | 1092 | esac |
1138 | 1135 | output_verbose_link_cmd=func_echo_all |
1139 | 1136 | _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" |
1140 | 1137 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" |
1141 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
1142 | _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
1138 | _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
1139 | _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
1143 | 1140 | m4_if([$1], [CXX], |
1144 | 1141 | [ if test yes != "$lt_cv_apple_cc_single_mod"; then |
1145 | 1142 | _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" |
1146 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" | |
1143 | _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" | |
1147 | 1144 | fi |
1148 | 1145 | ],[]) |
1149 | 1146 | else |
1257 | 1254 | # _LT_WITH_SYSROOT |
1258 | 1255 | # ---------------- |
1259 | 1256 | AC_DEFUN([_LT_WITH_SYSROOT], |
1260 | [AC_MSG_CHECKING([for sysroot]) | |
1257 | [m4_require([_LT_DECL_SED])dnl | |
1258 | AC_MSG_CHECKING([for sysroot]) | |
1261 | 1259 | AC_ARG_WITH([sysroot], |
1262 | 1260 | [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], |
1263 | 1261 | [Search for dependent libraries within DIR (or the compiler's sysroot |
1274 | 1272 | fi |
1275 | 1273 | ;; #( |
1276 | 1274 | /*) |
1277 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | |
1275 | lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` | |
1278 | 1276 | ;; #( |
1279 | 1277 | no|'') |
1280 | 1278 | ;; #( |
1304 | 1302 | # options accordingly. |
1305 | 1303 | echo 'int i;' > conftest.$ac_ext |
1306 | 1304 | if AC_TRY_EVAL(ac_compile); then |
1307 | case `/usr/bin/file conftest.$ac_objext` in | |
1305 | case `$FILECMD conftest.$ac_objext` in | |
1308 | 1306 | *ELF-32*) |
1309 | 1307 | HPUX_IA64_MODE=32 |
1310 | 1308 | ;; |
1321 | 1319 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
1322 | 1320 | if AC_TRY_EVAL(ac_compile); then |
1323 | 1321 | if test yes = "$lt_cv_prog_gnu_ld"; then |
1324 | case `/usr/bin/file conftest.$ac_objext` in | |
1322 | case `$FILECMD conftest.$ac_objext` in | |
1325 | 1323 | *32-bit*) |
1326 | 1324 | LD="${LD-ld} -melf32bsmip" |
1327 | 1325 | ;; |
1333 | 1331 | ;; |
1334 | 1332 | esac |
1335 | 1333 | else |
1336 | case `/usr/bin/file conftest.$ac_objext` in | |
1334 | case `$FILECMD conftest.$ac_objext` in | |
1337 | 1335 | *32-bit*) |
1338 | 1336 | LD="${LD-ld} -32" |
1339 | 1337 | ;; |
1355 | 1353 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
1356 | 1354 | if AC_TRY_EVAL(ac_compile); then |
1357 | 1355 | emul=elf |
1358 | case `/usr/bin/file conftest.$ac_objext` in | |
1356 | case `$FILECMD conftest.$ac_objext` in | |
1359 | 1357 | *32-bit*) |
1360 | 1358 | emul="${emul}32" |
1361 | 1359 | ;; |
1363 | 1361 | emul="${emul}64" |
1364 | 1362 | ;; |
1365 | 1363 | esac |
1366 | case `/usr/bin/file conftest.$ac_objext` in | |
1364 | case `$FILECMD conftest.$ac_objext` in | |
1367 | 1365 | *MSB*) |
1368 | 1366 | emul="${emul}btsmip" |
1369 | 1367 | ;; |
1371 | 1369 | emul="${emul}ltsmip" |
1372 | 1370 | ;; |
1373 | 1371 | esac |
1374 | case `/usr/bin/file conftest.$ac_objext` in | |
1372 | case `$FILECMD conftest.$ac_objext` in | |
1375 | 1373 | *N32*) |
1376 | 1374 | emul="${emul}n32" |
1377 | 1375 | ;; |
1391 | 1389 | # not appear in the list. |
1392 | 1390 | echo 'int i;' > conftest.$ac_ext |
1393 | 1391 | if AC_TRY_EVAL(ac_compile); then |
1394 | case `/usr/bin/file conftest.o` in | |
1392 | case `$FILECMD conftest.o` in | |
1395 | 1393 | *32-bit*) |
1396 | 1394 | case $host in |
1397 | 1395 | x86_64-*kfreebsd*-gnu) |
1398 | 1396 | LD="${LD-ld} -m elf_i386_fbsd" |
1399 | 1397 | ;; |
1400 | 1398 | x86_64-*linux*) |
1401 | case `/usr/bin/file conftest.o` in | |
1399 | case `$FILECMD conftest.o` in | |
1402 | 1400 | *x86-64*) |
1403 | 1401 | LD="${LD-ld} -m elf32_x86_64" |
1404 | 1402 | ;; |
1466 | 1464 | # options accordingly. |
1467 | 1465 | echo 'int i;' > conftest.$ac_ext |
1468 | 1466 | if AC_TRY_EVAL(ac_compile); then |
1469 | case `/usr/bin/file conftest.o` in | |
1467 | case `$FILECMD conftest.o` in | |
1470 | 1468 | *64-bit*) |
1471 | 1469 | case $lt_cv_prog_gnu_ld in |
1472 | 1470 | yes*) |
1505 | 1503 | m4_defun([_LT_PROG_AR], |
1506 | 1504 | [AC_CHECK_TOOLS(AR, [ar], false) |
1507 | 1505 | : ${AR=ar} |
1508 | : ${AR_FLAGS=cr} | |
1509 | 1506 | _LT_DECL([], [AR], [1], [The archiver]) |
1510 | _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) | |
1507 | ||
1508 | # Use ARFLAGS variable as AR's operation code to sync the variable naming with | |
1509 | # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have | |
1510 | # higher priority because thats what people were doing historically (setting | |
1511 | # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS | |
1512 | # variable obsoleted/removed. | |
1513 | ||
1514 | test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} | |
1515 | lt_ar_flags=$AR_FLAGS | |
1516 | _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) | |
1517 | ||
1518 | # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override | |
1519 | # by AR_FLAGS because that was never working and AR_FLAGS is about to die. | |
1520 | _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], | |
1521 | [Flags to create an archive]) | |
1511 | 1522 | |
1512 | 1523 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], |
1513 | 1524 | [lt_cv_ar_at_file=no |
1726 | 1737 | lt_cv_sys_max_cmd_len=8192; |
1727 | 1738 | ;; |
1728 | 1739 | |
1729 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) | |
1740 | bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) | |
1730 | 1741 | # This has been around since 386BSD, at least. Likely further. |
1731 | 1742 | if test -x /sbin/sysctl; then |
1732 | 1743 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
1769 | 1780 | sysv5* | sco5v6* | sysv4.2uw2*) |
1770 | 1781 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
1771 | 1782 | if test -n "$kargmax"; then |
1772 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | |
1783 | lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` | |
1773 | 1784 | else |
1774 | 1785 | lt_cv_sys_max_cmd_len=32768 |
1775 | 1786 | fi |
2219 | 2230 | striplib= |
2220 | 2231 | old_striplib= |
2221 | 2232 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
2222 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
2223 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2224 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2225 | AC_MSG_RESULT([yes]) | |
2233 | if test -z "$STRIP"; then | |
2234 | AC_MSG_RESULT([no]) | |
2226 | 2235 | else |
2227 | # FIXME - insert some real tests, host_os isn't really good enough | |
2228 | case $host_os in | |
2229 | darwin*) | |
2230 | if test -n "$STRIP"; then | |
2236 | if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
2237 | old_striplib="$STRIP --strip-debug" | |
2238 | striplib="$STRIP --strip-unneeded" | |
2239 | AC_MSG_RESULT([yes]) | |
2240 | else | |
2241 | case $host_os in | |
2242 | darwin*) | |
2243 | # FIXME - insert some real tests, host_os isn't really good enough | |
2231 | 2244 | striplib="$STRIP -x" |
2232 | 2245 | old_striplib="$STRIP -S" |
2233 | 2246 | AC_MSG_RESULT([yes]) |
2234 | else | |
2247 | ;; | |
2248 | freebsd*) | |
2249 | if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then | |
2250 | old_striplib="$STRIP --strip-debug" | |
2251 | striplib="$STRIP --strip-unneeded" | |
2252 | AC_MSG_RESULT([yes]) | |
2253 | else | |
2254 | AC_MSG_RESULT([no]) | |
2255 | fi | |
2256 | ;; | |
2257 | *) | |
2235 | 2258 | AC_MSG_RESULT([no]) |
2236 | fi | |
2237 | ;; | |
2238 | *) | |
2239 | AC_MSG_RESULT([no]) | |
2240 | ;; | |
2241 | esac | |
2259 | ;; | |
2260 | esac | |
2261 | fi | |
2242 | 2262 | fi |
2243 | 2263 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) |
2244 | 2264 | _LT_DECL([], [striplib], [1]) |
2561 | 2581 | case $host_os in |
2562 | 2582 | cygwin*) |
2563 | 2583 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
2564 | soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | |
2584 | soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | |
2565 | 2585 | m4_if([$1], [],[ |
2566 | 2586 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) |
2567 | 2587 | ;; |
2571 | 2591 | ;; |
2572 | 2592 | pw32*) |
2573 | 2593 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
2574 | library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | |
2594 | library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | |
2575 | 2595 | ;; |
2576 | 2596 | esac |
2577 | 2597 | dynamic_linker='Win32 ld.exe' |
2578 | 2598 | ;; |
2579 | 2599 | |
2580 | *,cl*) | |
2581 | # Native MSVC | |
2600 | *,cl* | *,icl*) | |
2601 | # Native MSVC or ICC | |
2582 | 2602 | libname_spec='$name' |
2583 | 2603 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
2584 | 2604 | library_names_spec='$libname.dll.lib' |
2597 | 2617 | done |
2598 | 2618 | IFS=$lt_save_ifs |
2599 | 2619 | # Convert to MSYS style. |
2600 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` | |
2620 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` | |
2601 | 2621 | ;; |
2602 | 2622 | cygwin*) |
2603 | 2623 | # Convert to unix form, then to dos form, then back to unix form |
2634 | 2654 | ;; |
2635 | 2655 | |
2636 | 2656 | *) |
2637 | # Assume MSVC wrapper | |
2657 | # Assume MSVC and ICC wrapper | |
2638 | 2658 | library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' |
2639 | 2659 | dynamic_linker='Win32 ld.exe' |
2640 | 2660 | ;; |
2667 | 2687 | shlibpath_var=LD_LIBRARY_PATH |
2668 | 2688 | ;; |
2669 | 2689 | |
2670 | freebsd* | dragonfly*) | |
2690 | freebsd* | dragonfly* | midnightbsd*) | |
2671 | 2691 | # DragonFly does not have aout. When/if they implement a new |
2672 | 2692 | # versioning mechanism, adjust this. |
2673 | 2693 | if test -x /usr/bin/objformat; then |
3478 | 3498 | |
3479 | 3499 | bsdi[[45]]*) |
3480 | 3500 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
3481 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3501 | lt_cv_file_magic_cmd='$FILECMD -L' | |
3482 | 3502 | lt_cv_file_magic_test_file=/shlib/libc.so |
3483 | 3503 | ;; |
3484 | 3504 | |
3512 | 3532 | lt_cv_deplibs_check_method=pass_all |
3513 | 3533 | ;; |
3514 | 3534 | |
3515 | freebsd* | dragonfly*) | |
3535 | freebsd* | dragonfly* | midnightbsd*) | |
3516 | 3536 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
3517 | 3537 | case $host_cpu in |
3518 | 3538 | i*86 ) |
3519 | 3539 | # Not sure whether the presence of OpenBSD here was a mistake. |
3520 | 3540 | # Let's accept both of them until this is cleared up. |
3521 | 3541 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' |
3522 | lt_cv_file_magic_cmd=/usr/bin/file | |
3542 | lt_cv_file_magic_cmd=$FILECMD | |
3523 | 3543 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
3524 | 3544 | ;; |
3525 | 3545 | esac |
3533 | 3553 | ;; |
3534 | 3554 | |
3535 | 3555 | hpux10.20* | hpux11*) |
3536 | lt_cv_file_magic_cmd=/usr/bin/file | |
3556 | lt_cv_file_magic_cmd=$FILECMD | |
3537 | 3557 | case $host_cpu in |
3538 | 3558 | ia64*) |
3539 | 3559 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
3580 | 3600 | |
3581 | 3601 | newos6*) |
3582 | 3602 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
3583 | lt_cv_file_magic_cmd=/usr/bin/file | |
3603 | lt_cv_file_magic_cmd=$FILECMD | |
3584 | 3604 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
3585 | 3605 | ;; |
3586 | 3606 | |
3707 | 3727 | mingw*) lt_bad_file=conftest.nm/nofile ;; |
3708 | 3728 | *) lt_bad_file=/dev/null ;; |
3709 | 3729 | esac |
3710 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in | |
3730 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in | |
3711 | 3731 | *$lt_bad_file* | *'Invalid file or object type'*) |
3712 | 3732 | lt_cv_path_NM="$tmp_nm -B" |
3713 | 3733 | break 2 |
3714 | 3734 | ;; |
3715 | 3735 | *) |
3716 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
3736 | case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in | |
3717 | 3737 | */dev/null*) |
3718 | 3738 | lt_cv_path_NM="$tmp_nm -p" |
3719 | 3739 | break 2 |
3739 | 3759 | # Let the user override the test. |
3740 | 3760 | else |
3741 | 3761 | AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) |
3742 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in | |
3762 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in | |
3743 | 3763 | *COFF*) |
3744 | 3764 | DUMPBIN="$DUMPBIN -symbols -headers" |
3745 | 3765 | ;; |
3979 | 3999 | |
3980 | 4000 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
3981 | 4001 | # Gets list of data symbols to import. |
3982 | lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" | |
4002 | lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" | |
3983 | 4003 | # Adjust the below global symbol transforms to fixup imported variables. |
3984 | 4004 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" |
3985 | 4005 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" |
3997 | 4017 | # Transform an extracted symbol line into a proper C declaration. |
3998 | 4018 | # Some systems (esp. on ia64) link data and code symbols differently, |
3999 | 4019 | # so use this general approach. |
4000 | lt_cv_sys_global_symbol_to_cdecl="sed -n"\ | |
4020 | lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ | |
4001 | 4021 | $lt_cdecl_hook\ |
4002 | 4022 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ |
4003 | 4023 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" |
4004 | 4024 | |
4005 | 4025 | # Transform an extracted symbol line into symbol name and symbol address |
4006 | lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ | |
4026 | lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ | |
4007 | 4027 | $lt_c_name_hook\ |
4008 | 4028 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
4009 | 4029 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" |
4010 | 4030 | |
4011 | 4031 | # Transform an extracted symbol line into symbol name with lib prefix and |
4012 | 4032 | # symbol address. |
4013 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ | |
4033 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ | |
4014 | 4034 | $lt_c_name_lib_hook\ |
4015 | 4035 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
4016 | 4036 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ |
4034 | 4054 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
4035 | 4055 | # Fake it for dumpbin and say T for any non-static function, |
4036 | 4056 | # D for any global variable and I for any imported variable. |
4037 | # Also find C++ and __fastcall symbols from MSVC++, | |
4057 | # Also find C++ and __fastcall symbols from MSVC++ or ICC, | |
4038 | 4058 | # which start with @ or ?. |
4039 | 4059 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ |
4040 | 4060 | " {last_section=section; section=\$ 3};"\ |
4052 | 4072 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ |
4053 | 4073 | " ' prfx=^$ac_symprfx]" |
4054 | 4074 | else |
4055 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
4075 | lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
4056 | 4076 | fi |
4057 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | |
4077 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" | |
4058 | 4078 | |
4059 | 4079 | # Check to see that the pipe works correctly. |
4060 | 4080 | pipe_works=no |
4342 | 4362 | ;; |
4343 | 4363 | esac |
4344 | 4364 | ;; |
4345 | freebsd* | dragonfly*) | |
4365 | freebsd* | dragonfly* | midnightbsd*) | |
4346 | 4366 | # FreeBSD uses GNU C++ |
4347 | 4367 | ;; |
4348 | 4368 | hpux9* | hpux10* | hpux11*) |
4425 | 4445 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4426 | 4446 | ;; |
4427 | 4447 | *) |
4428 | case `$CC -V 2>&1 | sed 5q` in | |
4448 | case `$CC -V 2>&1 | $SED 5q` in | |
4429 | 4449 | *Sun\ C*) |
4430 | 4450 | # Sun C++ 5.9 |
4431 | 4451 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4767 | 4787 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4768 | 4788 | ;; |
4769 | 4789 | *) |
4770 | case `$CC -V 2>&1 | sed 5q` in | |
4790 | case `$CC -V 2>&1 | $SED 5q` in | |
4771 | 4791 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) |
4772 | 4792 | # Sun Fortran 8.3 passes all unrecognized flags to the linker |
4773 | 4793 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4950 | 4970 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
4951 | 4971 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
4952 | 4972 | else |
4953 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
4973 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
4954 | 4974 | fi |
4955 | 4975 | ;; |
4956 | 4976 | pw32*) |
4958 | 4978 | ;; |
4959 | 4979 | cygwin* | mingw* | cegcc*) |
4960 | 4980 | case $cc_basename in |
4961 | cl*) | |
4981 | cl* | icl*) | |
4962 | 4982 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' |
4963 | 4983 | ;; |
4964 | 4984 | *) |
5018 | 5038 | |
5019 | 5039 | case $host_os in |
5020 | 5040 | cygwin* | mingw* | pw32* | cegcc*) |
5021 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
5041 | # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time | |
5022 | 5042 | # When not using gcc, we currently assume that we are using |
5023 | # Microsoft Visual C++. | |
5043 | # Microsoft Visual C++ or Intel C++ Compiler. | |
5024 | 5044 | if test yes != "$GCC"; then |
5025 | 5045 | with_gnu_ld=no |
5026 | 5046 | fi |
5027 | 5047 | ;; |
5028 | 5048 | interix*) |
5029 | # we just hope/assume this is gcc and not c89 (= MSVC++) | |
5049 | # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) | |
5030 | 5050 | with_gnu_ld=yes |
5031 | 5051 | ;; |
5032 | 5052 | openbsd* | bitrig*) |
5081 | 5101 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
5082 | 5102 | fi |
5083 | 5103 | supports_anon_versioning=no |
5084 | case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in | |
5104 | case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in | |
5085 | 5105 | *GNU\ gold*) supports_anon_versioning=yes ;; |
5086 | 5106 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
5087 | 5107 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
5193 | 5213 | emximp -o $lib $output_objdir/$libname.def' |
5194 | 5214 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
5195 | 5215 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
5216 | _LT_TAGVAR(file_list_spec, $1)='@' | |
5196 | 5217 | ;; |
5197 | 5218 | |
5198 | 5219 | interix[[3-9]]*) |
5207 | 5228 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
5208 | 5229 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
5209 | 5230 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
5210 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
5231 | _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
5211 | 5232 | ;; |
5212 | 5233 | |
5213 | 5234 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
5250 | 5271 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
5251 | 5272 | ;; |
5252 | 5273 | esac |
5253 | case `$CC -V 2>&1 | sed 5q` in | |
5274 | case `$CC -V 2>&1 | $SED 5q` in | |
5254 | 5275 | *Sun\ C*) # Sun C 5.9 |
5255 | 5276 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' |
5256 | 5277 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
5262 | 5283 | |
5263 | 5284 | if test yes = "$supports_anon_versioning"; then |
5264 | 5285 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
5265 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
5286 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
5266 | 5287 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
5267 | 5288 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
5268 | 5289 | fi |
5269 | 5290 | |
5270 | 5291 | case $cc_basename in |
5271 | 5292 | tcc*) |
5293 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | |
5272 | 5294 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' |
5273 | 5295 | ;; |
5274 | 5296 | xlf* | bgf* | bgxlf* | mpixlf*) |
5278 | 5300 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' |
5279 | 5301 | if test yes = "$supports_anon_versioning"; then |
5280 | 5302 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
5281 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
5303 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
5282 | 5304 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
5283 | 5305 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
5284 | 5306 | fi |
5410 | 5432 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
5411 | 5433 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
5412 | 5434 | else |
5413 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
5435 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
5414 | 5436 | fi |
5415 | 5437 | aix_use_runtimelinking=no |
5416 | 5438 | |
5593 | 5615 | |
5594 | 5616 | cygwin* | mingw* | pw32* | cegcc*) |
5595 | 5617 | # When not using gcc, we currently assume that we are using |
5596 | # Microsoft Visual C++. | |
5618 | # Microsoft Visual C++ or Intel C++ Compiler. | |
5597 | 5619 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
5598 | 5620 | # no search path for DLLs. |
5599 | 5621 | case $cc_basename in |
5600 | cl*) | |
5601 | # Native MSVC | |
5622 | cl* | icl*) | |
5623 | # Native MSVC or ICC | |
5602 | 5624 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
5603 | 5625 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
5604 | 5626 | _LT_TAGVAR(always_export_symbols, $1)=yes |
5639 | 5661 | fi' |
5640 | 5662 | ;; |
5641 | 5663 | *) |
5642 | # Assume MSVC wrapper | |
5664 | # Assume MSVC and ICC wrapper | |
5643 | 5665 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
5644 | 5666 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
5645 | 5667 | # Tell ltmain to make .lib files, not .a files. |
5687 | 5709 | ;; |
5688 | 5710 | |
5689 | 5711 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
5690 | freebsd* | dragonfly*) | |
5712 | freebsd* | dragonfly* | midnightbsd*) | |
5691 | 5713 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
5692 | 5714 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
5693 | 5715 | _LT_TAGVAR(hardcode_direct, $1)=yes |
5828 | 5850 | # Fabrice Bellard et al's Tiny C Compiler |
5829 | 5851 | _LT_TAGVAR(ld_shlibs, $1)=yes |
5830 | 5852 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
5853 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | |
5831 | 5854 | ;; |
5832 | 5855 | esac |
5833 | 5856 | ;; |
5899 | 5922 | emximp -o $lib $output_objdir/$libname.def' |
5900 | 5923 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
5901 | 5924 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
5925 | _LT_TAGVAR(file_list_spec, $1)='@' | |
5902 | 5926 | ;; |
5903 | 5927 | |
5904 | 5928 | osf3*) |
6665 | 6689 | |
6666 | 6690 | cygwin* | mingw* | pw32* | cegcc*) |
6667 | 6691 | case $GXX,$cc_basename in |
6668 | ,cl* | no,cl*) | |
6669 | # Native MSVC | |
6692 | ,cl* | no,cl* | ,icl* | no,icl*) | |
6693 | # Native MSVC or ICC | |
6670 | 6694 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
6671 | 6695 | # no search path for DLLs. |
6672 | 6696 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
6764 | 6788 | emximp -o $lib $output_objdir/$libname.def' |
6765 | 6789 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
6766 | 6790 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
6791 | _LT_TAGVAR(file_list_spec, $1)='@' | |
6767 | 6792 | ;; |
6768 | 6793 | |
6769 | 6794 | dgux*) |
6794 | 6819 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
6795 | 6820 | ;; |
6796 | 6821 | |
6797 | freebsd* | dragonfly*) | |
6822 | freebsd* | dragonfly* | midnightbsd*) | |
6798 | 6823 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
6799 | 6824 | # conventions |
6800 | 6825 | _LT_TAGVAR(ld_shlibs, $1)=yes |
6931 | 6956 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
6932 | 6957 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
6933 | 6958 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
6934 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
6959 | _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
6935 | 6960 | ;; |
6936 | 6961 | irix5* | irix6*) |
6937 | 6962 | case $cc_basename in |
7071 | 7096 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
7072 | 7097 | if test yes = "$supports_anon_versioning"; then |
7073 | 7098 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
7074 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
7099 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
7075 | 7100 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
7076 | 7101 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
7077 | 7102 | fi |
7078 | 7103 | ;; |
7079 | 7104 | *) |
7080 | case `$CC -V 2>&1 | sed 5q` in | |
7105 | case `$CC -V 2>&1 | $SED 5q` in | |
7081 | 7106 | *Sun\ C*) |
7082 | 7107 | # Sun C++ 5.9 |
7083 | 7108 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
8214 | 8239 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) |
8215 | 8240 | AC_SUBST([DLLTOOL]) |
8216 | 8241 | ]) |
8242 | ||
8243 | # _LT_DECL_FILECMD | |
8244 | # ---------------- | |
8245 | # Check for a file(cmd) program that can be used to detect file type and magic | |
8246 | m4_defun([_LT_DECL_FILECMD], | |
8247 | [AC_CHECK_TOOL([FILECMD], [file], [:]) | |
8248 | _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) | |
8249 | ])# _LD_DECL_FILECMD | |
8217 | 8250 | |
8218 | 8251 | # _LT_DECL_SED |
8219 | 8252 | # ------------ |
8394 | 8427 | |
8395 | 8428 | # Helper functions for option handling. -*- Autoconf -*- |
8396 | 8429 | # |
8397 | # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software | |
8398 | # Foundation, Inc. | |
8430 | # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free | |
8431 | # Software Foundation, Inc. | |
8399 | 8432 | # Written by Gary V. Vaughan, 2004 |
8400 | 8433 | # |
8401 | 8434 | # This file is free software; the Free Software Foundation gives |
8826 | 8859 | |
8827 | 8860 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
8828 | 8861 | # |
8829 | # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software | |
8862 | # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software | |
8830 | 8863 | # Foundation, Inc. |
8831 | 8864 | # Written by Gary V. Vaughan, 2004 |
8832 | 8865 | # |
8951 | 8984 | |
8952 | 8985 | # ltversion.m4 -- version numbers -*- Autoconf -*- |
8953 | 8986 | # |
8954 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. | |
8987 | # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, | |
8988 | # Inc. | |
8955 | 8989 | # Written by Scott James Remnant, 2004 |
8956 | 8990 | # |
8957 | 8991 | # This file is free software; the Free Software Foundation gives |
8960 | 8994 | |
8961 | 8995 | # @configure_input@ |
8962 | 8996 | |
8963 | # serial 4179 ltversion.m4 | |
8997 | # serial 4245 ltversion.m4 | |
8964 | 8998 | # This file is part of GNU Libtool |
8965 | 8999 | |
8966 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) | |
8967 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) | |
9000 | m4_define([LT_PACKAGE_VERSION], [2.4.7]) | |
9001 | m4_define([LT_PACKAGE_REVISION], [2.4.7]) | |
8968 | 9002 | |
8969 | 9003 | AC_DEFUN([LTVERSION_VERSION], |
8970 | [macro_version='2.4.6' | |
8971 | macro_revision='2.4.6' | |
9004 | [macro_version='2.4.7' | |
9005 | macro_revision='2.4.7' | |
8972 | 9006 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) |
8973 | 9007 | _LT_DECL(, macro_revision, 0) |
8974 | 9008 | ]) |
8975 | 9009 | |
8976 | 9010 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- |
8977 | 9011 | # |
8978 | # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software | |
8979 | # Foundation, Inc. | |
9012 | # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free | |
9013 | # Software Foundation, Inc. | |
8980 | 9014 | # Written by Scott James Remnant, 2004. |
8981 | 9015 | # |
8982 | 9016 | # This file is free software; the Free Software Foundation gives |
688 | 688 | AR |
689 | 689 | DLLTOOL |
690 | 690 | OBJDUMP |
691 | FILECMD | |
691 | 692 | LN_S |
692 | 693 | NM |
693 | 694 | ac_ct_DUMPBIN |
3638 | 3639 | |
3639 | 3640 | |
3640 | 3641 | |
3641 | macro_version='2.4.6' | |
3642 | macro_revision='2.4.6' | |
3642 | macro_version='2.4.7' | |
3643 | macro_revision='2.4.7' | |
3643 | 3644 | |
3644 | 3645 | |
3645 | 3646 | |
5516 | 5517 | mingw*) lt_bad_file=conftest.nm/nofile ;; |
5517 | 5518 | *) lt_bad_file=/dev/null ;; |
5518 | 5519 | esac |
5519 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in | |
5520 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in | |
5520 | 5521 | *$lt_bad_file* | *'Invalid file or object type'*) |
5521 | 5522 | lt_cv_path_NM="$tmp_nm -B" |
5522 | 5523 | break 2 |
5523 | 5524 | ;; |
5524 | 5525 | *) |
5525 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
5526 | case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in | |
5526 | 5527 | */dev/null*) |
5527 | 5528 | lt_cv_path_NM="$tmp_nm -p" |
5528 | 5529 | break 2 |
5660 | 5661 | fi |
5661 | 5662 | fi |
5662 | 5663 | |
5663 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in | |
5664 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in | |
5664 | 5665 | *COFF*) |
5665 | 5666 | DUMPBIN="$DUMPBIN -symbols -headers" |
5666 | 5667 | ;; |
5764 | 5765 | lt_cv_sys_max_cmd_len=8192; |
5765 | 5766 | ;; |
5766 | 5767 | |
5767 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) | |
5768 | bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) | |
5768 | 5769 | # This has been around since 386BSD, at least. Likely further. |
5769 | 5770 | if test -x /sbin/sysctl; then |
5770 | 5771 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
5807 | 5808 | sysv5* | sco5v6* | sysv4.2uw2*) |
5808 | 5809 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
5809 | 5810 | if test -n "$kargmax"; then |
5810 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` | |
5811 | lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` | |
5811 | 5812 | else |
5812 | 5813 | lt_cv_sys_max_cmd_len=32768 |
5813 | 5814 | fi |
6013 | 6014 | |
6014 | 6015 | |
6015 | 6016 | if test -n "$ac_tool_prefix"; then |
6017 | # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. | |
6018 | set dummy ${ac_tool_prefix}file; ac_word=$2 | |
6019 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6020 | printf %s "checking for $ac_word... " >&6; } | |
6021 | if test ${ac_cv_prog_FILECMD+y} | |
6022 | then : | |
6023 | printf %s "(cached) " >&6 | |
6024 | else $as_nop | |
6025 | if test -n "$FILECMD"; then | |
6026 | ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. | |
6027 | else | |
6028 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6029 | for as_dir in $PATH | |
6030 | do | |
6031 | IFS=$as_save_IFS | |
6032 | case $as_dir in #((( | |
6033 | '') as_dir=./ ;; | |
6034 | */) ;; | |
6035 | *) as_dir=$as_dir/ ;; | |
6036 | esac | |
6037 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6038 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
6039 | ac_cv_prog_FILECMD="${ac_tool_prefix}file" | |
6040 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
6041 | break 2 | |
6042 | fi | |
6043 | done | |
6044 | done | |
6045 | IFS=$as_save_IFS | |
6046 | ||
6047 | fi | |
6048 | fi | |
6049 | FILECMD=$ac_cv_prog_FILECMD | |
6050 | if test -n "$FILECMD"; then | |
6051 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 | |
6052 | printf "%s\n" "$FILECMD" >&6; } | |
6053 | else | |
6054 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6055 | printf "%s\n" "no" >&6; } | |
6056 | fi | |
6057 | ||
6058 | ||
6059 | fi | |
6060 | if test -z "$ac_cv_prog_FILECMD"; then | |
6061 | ac_ct_FILECMD=$FILECMD | |
6062 | # Extract the first word of "file", so it can be a program name with args. | |
6063 | set dummy file; ac_word=$2 | |
6064 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6065 | printf %s "checking for $ac_word... " >&6; } | |
6066 | if test ${ac_cv_prog_ac_ct_FILECMD+y} | |
6067 | then : | |
6068 | printf %s "(cached) " >&6 | |
6069 | else $as_nop | |
6070 | if test -n "$ac_ct_FILECMD"; then | |
6071 | ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. | |
6072 | else | |
6073 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6074 | for as_dir in $PATH | |
6075 | do | |
6076 | IFS=$as_save_IFS | |
6077 | case $as_dir in #((( | |
6078 | '') as_dir=./ ;; | |
6079 | */) ;; | |
6080 | *) as_dir=$as_dir/ ;; | |
6081 | esac | |
6082 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6083 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
6084 | ac_cv_prog_ac_ct_FILECMD="file" | |
6085 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
6086 | break 2 | |
6087 | fi | |
6088 | done | |
6089 | done | |
6090 | IFS=$as_save_IFS | |
6091 | ||
6092 | fi | |
6093 | fi | |
6094 | ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD | |
6095 | if test -n "$ac_ct_FILECMD"; then | |
6096 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 | |
6097 | printf "%s\n" "$ac_ct_FILECMD" >&6; } | |
6098 | else | |
6099 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6100 | printf "%s\n" "no" >&6; } | |
6101 | fi | |
6102 | ||
6103 | if test "x$ac_ct_FILECMD" = x; then | |
6104 | FILECMD=":" | |
6105 | else | |
6106 | case $cross_compiling:$ac_tool_warned in | |
6107 | yes:) | |
6108 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6109 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6110 | ac_tool_warned=yes ;; | |
6111 | esac | |
6112 | FILECMD=$ac_ct_FILECMD | |
6113 | fi | |
6114 | else | |
6115 | FILECMD="$ac_cv_prog_FILECMD" | |
6116 | fi | |
6117 | ||
6118 | ||
6119 | ||
6120 | ||
6121 | ||
6122 | ||
6123 | ||
6124 | if test -n "$ac_tool_prefix"; then | |
6016 | 6125 | # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. |
6017 | 6126 | set dummy ${ac_tool_prefix}objdump; ac_word=$2 |
6018 | 6127 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6155 | 6264 | |
6156 | 6265 | bsdi[45]*) |
6157 | 6266 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' |
6158 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
6267 | lt_cv_file_magic_cmd='$FILECMD -L' | |
6159 | 6268 | lt_cv_file_magic_test_file=/shlib/libc.so |
6160 | 6269 | ;; |
6161 | 6270 | |
6189 | 6298 | lt_cv_deplibs_check_method=pass_all |
6190 | 6299 | ;; |
6191 | 6300 | |
6192 | freebsd* | dragonfly*) | |
6301 | freebsd* | dragonfly* | midnightbsd*) | |
6193 | 6302 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
6194 | 6303 | case $host_cpu in |
6195 | 6304 | i*86 ) |
6196 | 6305 | # Not sure whether the presence of OpenBSD here was a mistake. |
6197 | 6306 | # Let's accept both of them until this is cleared up. |
6198 | 6307 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' |
6199 | lt_cv_file_magic_cmd=/usr/bin/file | |
6308 | lt_cv_file_magic_cmd=$FILECMD | |
6200 | 6309 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
6201 | 6310 | ;; |
6202 | 6311 | esac |
6210 | 6319 | ;; |
6211 | 6320 | |
6212 | 6321 | hpux10.20* | hpux11*) |
6213 | lt_cv_file_magic_cmd=/usr/bin/file | |
6322 | lt_cv_file_magic_cmd=$FILECMD | |
6214 | 6323 | case $host_cpu in |
6215 | 6324 | ia64*) |
6216 | 6325 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' |
6257 | 6366 | |
6258 | 6367 | newos6*) |
6259 | 6368 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' |
6260 | lt_cv_file_magic_cmd=/usr/bin/file | |
6369 | lt_cv_file_magic_cmd=$FILECMD | |
6261 | 6370 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
6262 | 6371 | ;; |
6263 | 6372 | |
6631 | 6740 | fi |
6632 | 6741 | |
6633 | 6742 | : ${AR=ar} |
6634 | : ${AR_FLAGS=cr} | |
6635 | ||
6636 | ||
6637 | ||
6638 | ||
6639 | ||
6743 | ||
6744 | ||
6745 | ||
6746 | ||
6747 | ||
6748 | ||
6749 | # Use ARFLAGS variable as AR's operation code to sync the variable naming with | |
6750 | # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have | |
6751 | # higher priority because thats what people were doing historically (setting | |
6752 | # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS | |
6753 | # variable obsoleted/removed. | |
6754 | ||
6755 | test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} | |
6756 | lt_ar_flags=$AR_FLAGS | |
6757 | ||
6758 | ||
6759 | ||
6760 | ||
6761 | ||
6762 | ||
6763 | # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override | |
6764 | # by AR_FLAGS because that was never working and AR_FLAGS is about to die. | |
6640 | 6765 | |
6641 | 6766 | |
6642 | 6767 | |
7054 | 7179 | |
7055 | 7180 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
7056 | 7181 | # Gets list of data symbols to import. |
7057 | lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" | |
7182 | lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" | |
7058 | 7183 | # Adjust the below global symbol transforms to fixup imported variables. |
7059 | 7184 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" |
7060 | 7185 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" |
7072 | 7197 | # Transform an extracted symbol line into a proper C declaration. |
7073 | 7198 | # Some systems (esp. on ia64) link data and code symbols differently, |
7074 | 7199 | # so use this general approach. |
7075 | lt_cv_sys_global_symbol_to_cdecl="sed -n"\ | |
7200 | lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ | |
7076 | 7201 | $lt_cdecl_hook\ |
7077 | 7202 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ |
7078 | 7203 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" |
7079 | 7204 | |
7080 | 7205 | # Transform an extracted symbol line into symbol name and symbol address |
7081 | lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ | |
7206 | lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ | |
7082 | 7207 | $lt_c_name_hook\ |
7083 | 7208 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
7084 | 7209 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" |
7085 | 7210 | |
7086 | 7211 | # Transform an extracted symbol line into symbol name with lib prefix and |
7087 | 7212 | # symbol address. |
7088 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ | |
7213 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ | |
7089 | 7214 | $lt_c_name_lib_hook\ |
7090 | 7215 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
7091 | 7216 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ |
7109 | 7234 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
7110 | 7235 | # Fake it for dumpbin and say T for any non-static function, |
7111 | 7236 | # D for any global variable and I for any imported variable. |
7112 | # Also find C++ and __fastcall symbols from MSVC++, | |
7237 | # Also find C++ and __fastcall symbols from MSVC++ or ICC, | |
7113 | 7238 | # which start with @ or ?. |
7114 | 7239 | lt_cv_sys_global_symbol_pipe="$AWK '"\ |
7115 | 7240 | " {last_section=section; section=\$ 3};"\ |
7127 | 7252 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ |
7128 | 7253 | " ' prfx=^$ac_symprfx" |
7129 | 7254 | else |
7130 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
7255 | lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
7131 | 7256 | fi |
7132 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | |
7257 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" | |
7133 | 7258 | |
7134 | 7259 | # Check to see that the pipe works correctly. |
7135 | 7260 | pipe_works=no |
7329 | 7454 | fi |
7330 | 7455 | ;; #( |
7331 | 7456 | /*) |
7332 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | |
7457 | lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` | |
7333 | 7458 | ;; #( |
7334 | 7459 | no|'') |
7335 | 7460 | ;; #( |
7454 | 7579 | ac_status=$? |
7455 | 7580 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7456 | 7581 | test $ac_status = 0; }; then |
7457 | case `/usr/bin/file conftest.$ac_objext` in | |
7582 | case `$FILECMD conftest.$ac_objext` in | |
7458 | 7583 | *ELF-32*) |
7459 | 7584 | HPUX_IA64_MODE=32 |
7460 | 7585 | ;; |
7475 | 7600 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7476 | 7601 | test $ac_status = 0; }; then |
7477 | 7602 | if test yes = "$lt_cv_prog_gnu_ld"; then |
7478 | case `/usr/bin/file conftest.$ac_objext` in | |
7603 | case `$FILECMD conftest.$ac_objext` in | |
7479 | 7604 | *32-bit*) |
7480 | 7605 | LD="${LD-ld} -melf32bsmip" |
7481 | 7606 | ;; |
7487 | 7612 | ;; |
7488 | 7613 | esac |
7489 | 7614 | else |
7490 | case `/usr/bin/file conftest.$ac_objext` in | |
7615 | case `$FILECMD conftest.$ac_objext` in | |
7491 | 7616 | *32-bit*) |
7492 | 7617 | LD="${LD-ld} -32" |
7493 | 7618 | ;; |
7513 | 7638 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7514 | 7639 | test $ac_status = 0; }; then |
7515 | 7640 | emul=elf |
7516 | case `/usr/bin/file conftest.$ac_objext` in | |
7641 | case `$FILECMD conftest.$ac_objext` in | |
7517 | 7642 | *32-bit*) |
7518 | 7643 | emul="${emul}32" |
7519 | 7644 | ;; |
7521 | 7646 | emul="${emul}64" |
7522 | 7647 | ;; |
7523 | 7648 | esac |
7524 | case `/usr/bin/file conftest.$ac_objext` in | |
7649 | case `$FILECMD conftest.$ac_objext` in | |
7525 | 7650 | *MSB*) |
7526 | 7651 | emul="${emul}btsmip" |
7527 | 7652 | ;; |
7529 | 7654 | emul="${emul}ltsmip" |
7530 | 7655 | ;; |
7531 | 7656 | esac |
7532 | case `/usr/bin/file conftest.$ac_objext` in | |
7657 | case `$FILECMD conftest.$ac_objext` in | |
7533 | 7658 | *N32*) |
7534 | 7659 | emul="${emul}n32" |
7535 | 7660 | ;; |
7553 | 7678 | ac_status=$? |
7554 | 7679 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7555 | 7680 | test $ac_status = 0; }; then |
7556 | case `/usr/bin/file conftest.o` in | |
7681 | case `$FILECMD conftest.o` in | |
7557 | 7682 | *32-bit*) |
7558 | 7683 | case $host in |
7559 | 7684 | x86_64-*kfreebsd*-gnu) |
7560 | 7685 | LD="${LD-ld} -m elf_i386_fbsd" |
7561 | 7686 | ;; |
7562 | 7687 | x86_64-*linux*) |
7563 | case `/usr/bin/file conftest.o` in | |
7688 | case `$FILECMD conftest.o` in | |
7564 | 7689 | *x86-64*) |
7565 | 7690 | LD="${LD-ld} -m elf32_x86_64" |
7566 | 7691 | ;; |
7668 | 7793 | ac_status=$? |
7669 | 7794 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7670 | 7795 | test $ac_status = 0; }; then |
7671 | case `/usr/bin/file conftest.o` in | |
7796 | case `$FILECMD conftest.o` in | |
7672 | 7797 | *64-bit*) |
7673 | 7798 | case $lt_cv_prog_gnu_ld in |
7674 | 7799 | yes*) |
8451 | 8576 | _LT_EOF |
8452 | 8577 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 |
8453 | 8578 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 |
8454 | echo "$AR cr libconftest.a conftest.o" >&5 | |
8455 | $AR cr libconftest.a conftest.o 2>&5 | |
8579 | echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 | |
8580 | $AR $AR_FLAGS libconftest.a conftest.o 2>&5 | |
8456 | 8581 | echo "$RANLIB libconftest.a" >&5 |
8457 | 8582 | $RANLIB libconftest.a 2>&5 |
8458 | 8583 | cat > conftest.c << _LT_EOF |
8479 | 8604 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
8480 | 8605 | darwin1.*) |
8481 | 8606 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
8482 | darwin*) # darwin 5.x on | |
8483 | # if running on 10.5 or later, the deployment target defaults | |
8484 | # to the OS version, if on x86, and 10.4, the deployment | |
8485 | # target defaults to 10.4. Don't you love it? | |
8486 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
8487 | 10.0,*86*-darwin8*|10.0,*-darwin[912]*) | |
8488 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
8489 | 10.[012][,.]*) | |
8490 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | |
8491 | 10.*|11.*) | |
8492 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
8607 | darwin*) | |
8608 | case $MACOSX_DEPLOYMENT_TARGET,$host in | |
8609 | 10.[012],*|,*powerpc*-darwin[5-8]*) | |
8610 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | |
8611 | *) | |
8612 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
8493 | 8613 | esac |
8494 | 8614 | ;; |
8495 | 8615 | esac |
8877 | 8997 | ofile=libtool |
8878 | 8998 | can_build_shared=yes |
8879 | 8999 | |
8880 | # All known linkers require a '.a' archive for static linking (except MSVC, | |
8881 | # which needs '.lib'). | |
9000 | # All known linkers require a '.a' archive for static linking (except MSVC and | |
9001 | # ICC, which need '.lib'). | |
8882 | 9002 | libext=a |
8883 | 9003 | |
8884 | 9004 | with_gnu_ld=$lt_cv_prog_gnu_ld |
9392 | 9512 | lt_prog_compiler_static='-qstaticlink' |
9393 | 9513 | ;; |
9394 | 9514 | *) |
9395 | case `$CC -V 2>&1 | sed 5q` in | |
9515 | case `$CC -V 2>&1 | $SED 5q` in | |
9396 | 9516 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) |
9397 | 9517 | # Sun Fortran 8.3 passes all unrecognized flags to the linker |
9398 | 9518 | lt_prog_compiler_pic='-KPIC' |
9815 | 9935 | |
9816 | 9936 | case $host_os in |
9817 | 9937 | cygwin* | mingw* | pw32* | cegcc*) |
9818 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
9938 | # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time | |
9819 | 9939 | # When not using gcc, we currently assume that we are using |
9820 | # Microsoft Visual C++. | |
9940 | # Microsoft Visual C++ or Intel C++ Compiler. | |
9821 | 9941 | if test yes != "$GCC"; then |
9822 | 9942 | with_gnu_ld=no |
9823 | 9943 | fi |
9824 | 9944 | ;; |
9825 | 9945 | interix*) |
9826 | # we just hope/assume this is gcc and not c89 (= MSVC++) | |
9946 | # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) | |
9827 | 9947 | with_gnu_ld=yes |
9828 | 9948 | ;; |
9829 | 9949 | openbsd* | bitrig*) |
9878 | 9998 | whole_archive_flag_spec= |
9879 | 9999 | fi |
9880 | 10000 | supports_anon_versioning=no |
9881 | case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in | |
10001 | case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in | |
9882 | 10002 | *GNU\ gold*) supports_anon_versioning=yes ;; |
9883 | 10003 | *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 |
9884 | 10004 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
9990 | 10110 | emximp -o $lib $output_objdir/$libname.def' |
9991 | 10111 | old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
9992 | 10112 | enable_shared_with_static_runtimes=yes |
10113 | file_list_spec='@' | |
9993 | 10114 | ;; |
9994 | 10115 | |
9995 | 10116 | interix[3-9]*) |
10004 | 10125 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
10005 | 10126 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
10006 | 10127 | archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
10007 | archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
10128 | archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
10008 | 10129 | ;; |
10009 | 10130 | |
10010 | 10131 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
10047 | 10168 | compiler_needs_object=yes |
10048 | 10169 | ;; |
10049 | 10170 | esac |
10050 | case `$CC -V 2>&1 | sed 5q` in | |
10171 | case `$CC -V 2>&1 | $SED 5q` in | |
10051 | 10172 | *Sun\ C*) # Sun C 5.9 |
10052 | 10173 | whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' |
10053 | 10174 | compiler_needs_object=yes |
10059 | 10180 | |
10060 | 10181 | if test yes = "$supports_anon_versioning"; then |
10061 | 10182 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ |
10062 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
10183 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
10063 | 10184 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
10064 | 10185 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
10065 | 10186 | fi |
10066 | 10187 | |
10067 | 10188 | case $cc_basename in |
10068 | 10189 | tcc*) |
10190 | hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' | |
10069 | 10191 | export_dynamic_flag_spec='-rdynamic' |
10070 | 10192 | ;; |
10071 | 10193 | xlf* | bgf* | bgxlf* | mpixlf*) |
10075 | 10197 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' |
10076 | 10198 | if test yes = "$supports_anon_versioning"; then |
10077 | 10199 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ |
10078 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
10200 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
10079 | 10201 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
10080 | 10202 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
10081 | 10203 | fi |
10207 | 10329 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
10208 | 10330 | export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
10209 | 10331 | else |
10210 | export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
10332 | export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
10211 | 10333 | fi |
10212 | 10334 | aix_use_runtimelinking=no |
10213 | 10335 | |
10478 | 10600 | |
10479 | 10601 | cygwin* | mingw* | pw32* | cegcc*) |
10480 | 10602 | # When not using gcc, we currently assume that we are using |
10481 | # Microsoft Visual C++. | |
10603 | # Microsoft Visual C++ or Intel C++ Compiler. | |
10482 | 10604 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
10483 | 10605 | # no search path for DLLs. |
10484 | 10606 | case $cc_basename in |
10485 | cl*) | |
10486 | # Native MSVC | |
10607 | cl* | icl*) | |
10608 | # Native MSVC or ICC | |
10487 | 10609 | hardcode_libdir_flag_spec=' ' |
10488 | 10610 | allow_undefined_flag=unsupported |
10489 | 10611 | always_export_symbols=yes |
10524 | 10646 | fi' |
10525 | 10647 | ;; |
10526 | 10648 | *) |
10527 | # Assume MSVC wrapper | |
10649 | # Assume MSVC and ICC wrapper | |
10528 | 10650 | hardcode_libdir_flag_spec=' ' |
10529 | 10651 | allow_undefined_flag=unsupported |
10530 | 10652 | # Tell ltmain to make .lib files, not .a files. |
10565 | 10687 | output_verbose_link_cmd=func_echo_all |
10566 | 10688 | archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" |
10567 | 10689 | module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" |
10568 | archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
10569 | module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
10690 | archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
10691 | module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
10570 | 10692 | |
10571 | 10693 | else |
10572 | 10694 | ld_shlibs=no |
10600 | 10722 | ;; |
10601 | 10723 | |
10602 | 10724 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
10603 | freebsd* | dragonfly*) | |
10725 | freebsd* | dragonfly* | midnightbsd*) | |
10604 | 10726 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
10605 | 10727 | hardcode_libdir_flag_spec='-R$libdir' |
10606 | 10728 | hardcode_direct=yes |
10781 | 10903 | # Fabrice Bellard et al's Tiny C Compiler |
10782 | 10904 | ld_shlibs=yes |
10783 | 10905 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
10906 | hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' | |
10784 | 10907 | ;; |
10785 | 10908 | esac |
10786 | 10909 | ;; |
10852 | 10975 | emximp -o $lib $output_objdir/$libname.def' |
10853 | 10976 | old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
10854 | 10977 | enable_shared_with_static_runtimes=yes |
10978 | file_list_spec='@' | |
10855 | 10979 | ;; |
10856 | 10980 | |
10857 | 10981 | osf3*) |
11544 | 11668 | case $host_os in |
11545 | 11669 | cygwin*) |
11546 | 11670 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
11547 | soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
11671 | soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
11548 | 11672 | |
11549 | 11673 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" |
11550 | 11674 | ;; |
11554 | 11678 | ;; |
11555 | 11679 | pw32*) |
11556 | 11680 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
11557 | library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
11681 | library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
11558 | 11682 | ;; |
11559 | 11683 | esac |
11560 | 11684 | dynamic_linker='Win32 ld.exe' |
11561 | 11685 | ;; |
11562 | 11686 | |
11563 | *,cl*) | |
11564 | # Native MSVC | |
11687 | *,cl* | *,icl*) | |
11688 | # Native MSVC or ICC | |
11565 | 11689 | libname_spec='$name' |
11566 | 11690 | soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' |
11567 | 11691 | library_names_spec='$libname.dll.lib' |
11580 | 11704 | done |
11581 | 11705 | IFS=$lt_save_ifs |
11582 | 11706 | # Convert to MSYS style. |
11583 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | |
11707 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | |
11584 | 11708 | ;; |
11585 | 11709 | cygwin*) |
11586 | 11710 | # Convert to unix form, then to dos form, then back to unix form |
11617 | 11741 | ;; |
11618 | 11742 | |
11619 | 11743 | *) |
11620 | # Assume MSVC wrapper | |
11744 | # Assume MSVC and ICC wrapper | |
11621 | 11745 | library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' |
11622 | 11746 | dynamic_linker='Win32 ld.exe' |
11623 | 11747 | ;; |
11650 | 11774 | shlibpath_var=LD_LIBRARY_PATH |
11651 | 11775 | ;; |
11652 | 11776 | |
11653 | freebsd* | dragonfly*) | |
11777 | freebsd* | dragonfly* | midnightbsd*) | |
11654 | 11778 | # DragonFly does not have aout. When/if they implement a new |
11655 | 11779 | # versioning mechanism, adjust this. |
11656 | 11780 | if test -x /usr/bin/objformat; then |
12815 | 12939 | old_striplib= |
12816 | 12940 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 |
12817 | 12941 | printf %s "checking whether stripping libraries is possible... " >&6; } |
12818 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
12819 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
12820 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
12821 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12942 | if test -z "$STRIP"; then | |
12943 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12944 | printf "%s\n" "no" >&6; } | |
12945 | else | |
12946 | if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
12947 | old_striplib="$STRIP --strip-debug" | |
12948 | striplib="$STRIP --strip-unneeded" | |
12949 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12822 | 12950 | printf "%s\n" "yes" >&6; } |
12823 | else | |
12824 | # FIXME - insert some real tests, host_os isn't really good enough | |
12825 | case $host_os in | |
12826 | darwin*) | |
12827 | if test -n "$STRIP"; then | |
12951 | else | |
12952 | case $host_os in | |
12953 | darwin*) | |
12954 | # FIXME - insert some real tests, host_os isn't really good enough | |
12828 | 12955 | striplib="$STRIP -x" |
12829 | 12956 | old_striplib="$STRIP -S" |
12830 | 12957 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12831 | 12958 | printf "%s\n" "yes" >&6; } |
12832 | else | |
12959 | ;; | |
12960 | freebsd*) | |
12961 | if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then | |
12962 | old_striplib="$STRIP --strip-debug" | |
12963 | striplib="$STRIP --strip-unneeded" | |
12964 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12965 | printf "%s\n" "yes" >&6; } | |
12966 | else | |
12967 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12968 | printf "%s\n" "no" >&6; } | |
12969 | fi | |
12970 | ;; | |
12971 | *) | |
12833 | 12972 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12834 | 12973 | printf "%s\n" "no" >&6; } |
12835 | fi | |
12836 | ;; | |
12837 | *) | |
12838 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12839 | printf "%s\n" "no" >&6; } | |
12840 | ;; | |
12841 | esac | |
12974 | ;; | |
12975 | esac | |
12976 | fi | |
12842 | 12977 | fi |
12843 | 12978 | |
12844 | 12979 | |
15200 | 15335 | |
15201 | 15336 | cygwin* | mingw* | pw32* | cegcc*) |
15202 | 15337 | case $GXX,$cc_basename in |
15203 | ,cl* | no,cl*) | |
15204 | # Native MSVC | |
15338 | ,cl* | no,cl* | ,icl* | no,icl*) | |
15339 | # Native MSVC or ICC | |
15205 | 15340 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
15206 | 15341 | # no search path for DLLs. |
15207 | 15342 | hardcode_libdir_flag_spec_CXX=' ' |
15292 | 15427 | output_verbose_link_cmd=func_echo_all |
15293 | 15428 | archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" |
15294 | 15429 | module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" |
15295 | archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
15296 | module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
15430 | archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | |
15431 | module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | |
15297 | 15432 | if test yes != "$lt_cv_apple_cc_single_mod"; then |
15298 | 15433 | archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" |
15299 | archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" | |
15434 | archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" | |
15300 | 15435 | fi |
15301 | 15436 | |
15302 | 15437 | else |
15331 | 15466 | emximp -o $lib $output_objdir/$libname.def' |
15332 | 15467 | old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
15333 | 15468 | enable_shared_with_static_runtimes_CXX=yes |
15469 | file_list_spec_CXX='@' | |
15334 | 15470 | ;; |
15335 | 15471 | |
15336 | 15472 | dgux*) |
15361 | 15497 | archive_cmds_need_lc_CXX=no |
15362 | 15498 | ;; |
15363 | 15499 | |
15364 | freebsd* | dragonfly*) | |
15500 | freebsd* | dragonfly* | midnightbsd*) | |
15365 | 15501 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
15366 | 15502 | # conventions |
15367 | 15503 | ld_shlibs_CXX=yes |
15498 | 15634 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
15499 | 15635 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
15500 | 15636 | archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
15501 | archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
15637 | archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
15502 | 15638 | ;; |
15503 | 15639 | irix5* | irix6*) |
15504 | 15640 | case $cc_basename in |
15638 | 15774 | archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
15639 | 15775 | if test yes = "$supports_anon_versioning"; then |
15640 | 15776 | archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ |
15641 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
15777 | cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
15642 | 15778 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
15643 | 15779 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
15644 | 15780 | fi |
15645 | 15781 | ;; |
15646 | 15782 | *) |
15647 | case `$CC -V 2>&1 | sed 5q` in | |
15783 | case `$CC -V 2>&1 | $SED 5q` in | |
15648 | 15784 | *Sun\ C*) |
15649 | 15785 | # Sun C++ 5.9 |
15650 | 15786 | no_undefined_flag_CXX=' -zdefs' |
16301 | 16437 | ;; |
16302 | 16438 | esac |
16303 | 16439 | ;; |
16304 | freebsd* | dragonfly*) | |
16440 | freebsd* | dragonfly* | midnightbsd*) | |
16305 | 16441 | # FreeBSD uses GNU C++ |
16306 | 16442 | ;; |
16307 | 16443 | hpux9* | hpux10* | hpux11*) |
16384 | 16520 | lt_prog_compiler_static_CXX='-qstaticlink' |
16385 | 16521 | ;; |
16386 | 16522 | *) |
16387 | case `$CC -V 2>&1 | sed 5q` in | |
16523 | case `$CC -V 2>&1 | $SED 5q` in | |
16388 | 16524 | *Sun\ C*) |
16389 | 16525 | # Sun C++ 5.9 |
16390 | 16526 | lt_prog_compiler_pic_CXX='-KPIC' |
16771 | 16907 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
16772 | 16908 | export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
16773 | 16909 | else |
16774 | export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
16910 | export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | |
16775 | 16911 | fi |
16776 | 16912 | ;; |
16777 | 16913 | pw32*) |
16779 | 16915 | ;; |
16780 | 16916 | cygwin* | mingw* | cegcc*) |
16781 | 16917 | case $cc_basename in |
16782 | cl*) | |
16918 | cl* | icl*) | |
16783 | 16919 | exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' |
16784 | 16920 | ;; |
16785 | 16921 | *) |
17130 | 17266 | case $host_os in |
17131 | 17267 | cygwin*) |
17132 | 17268 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
17133 | soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
17269 | soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
17134 | 17270 | |
17135 | 17271 | ;; |
17136 | 17272 | mingw* | cegcc*) |
17139 | 17275 | ;; |
17140 | 17276 | pw32*) |
17141 | 17277 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
17142 | library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
17278 | library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' | |
17143 | 17279 | ;; |
17144 | 17280 | esac |
17145 | 17281 | dynamic_linker='Win32 ld.exe' |
17146 | 17282 | ;; |
17147 | 17283 | |
17148 | *,cl*) | |
17149 | # Native MSVC | |
17284 | *,cl* | *,icl*) | |
17285 | # Native MSVC or ICC | |
17150 | 17286 | libname_spec='$name' |
17151 | 17287 | soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' |
17152 | 17288 | library_names_spec='$libname.dll.lib' |
17165 | 17301 | done |
17166 | 17302 | IFS=$lt_save_ifs |
17167 | 17303 | # Convert to MSYS style. |
17168 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | |
17304 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | |
17169 | 17305 | ;; |
17170 | 17306 | cygwin*) |
17171 | 17307 | # Convert to unix form, then to dos form, then back to unix form |
17202 | 17338 | ;; |
17203 | 17339 | |
17204 | 17340 | *) |
17205 | # Assume MSVC wrapper | |
17341 | # Assume MSVC and ICC wrapper | |
17206 | 17342 | library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' |
17207 | 17343 | dynamic_linker='Win32 ld.exe' |
17208 | 17344 | ;; |
17234 | 17370 | shlibpath_var=LD_LIBRARY_PATH |
17235 | 17371 | ;; |
17236 | 17372 | |
17237 | freebsd* | dragonfly*) | |
17373 | freebsd* | dragonfly* | midnightbsd*) | |
17238 | 17374 | # DragonFly does not have aout. When/if they implement a new |
17239 | 17375 | # versioning mechanism, adjust this. |
17240 | 17376 | if test -x /usr/bin/objformat; then |
19583 | 19719 | lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' |
19584 | 19720 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' |
19585 | 19721 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' |
19722 | FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' | |
19586 | 19723 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' |
19587 | 19724 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' |
19588 | 19725 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' |
19591 | 19728 | DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' |
19592 | 19729 | sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' |
19593 | 19730 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' |
19731 | lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' | |
19594 | 19732 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' |
19595 | 19733 | archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' |
19596 | 19734 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' |
19765 | 19903 | lt_SP2NL \ |
19766 | 19904 | lt_NL2SP \ |
19767 | 19905 | reload_flag \ |
19906 | FILECMD \ | |
19768 | 19907 | OBJDUMP \ |
19769 | 19908 | deplibs_check_method \ |
19770 | 19909 | file_magic_cmd \ |
19773 | 19912 | DLLTOOL \ |
19774 | 19913 | sharedlib_from_linklib_cmd \ |
19775 | 19914 | AR \ |
19776 | AR_FLAGS \ | |
19777 | 19915 | archiver_list_spec \ |
19778 | 19916 | STRIP \ |
19779 | 19917 | RANLIB \ |
20767 | 20905 | # convert \$build files to toolchain format. |
20768 | 20906 | to_tool_file_cmd=$lt_cv_to_tool_file_cmd |
20769 | 20907 | |
20908 | # A file(cmd) program that detects file types. | |
20909 | FILECMD=$lt_FILECMD | |
20910 | ||
20770 | 20911 | # An object symbol dumper. |
20771 | 20912 | OBJDUMP=$lt_OBJDUMP |
20772 | 20913 | |
20791 | 20932 | # The archiver. |
20792 | 20933 | AR=$lt_AR |
20793 | 20934 | |
20935 | # Flags to create an archive (by configure). | |
20936 | lt_ar_flags=$lt_ar_flags | |
20937 | ||
20794 | 20938 | # Flags to create an archive. |
20795 | AR_FLAGS=$lt_AR_FLAGS | |
20939 | AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} | |
20796 | 20940 | |
20797 | 20941 | # How to feed a file listing to the archiver. |
20798 | 20942 | archiver_list_spec=$lt_archiver_list_spec |
21182 | 21326 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
21183 | 21327 | # text mode, it properly converts lines to CR/LF. This bash problem |
21184 | 21328 | # is reportedly fixed, but why not run on old versions too? |
21185 | sed '$q' "$ltmain" >> "$cfgfile" \ | |
21329 | $SED '$q' "$ltmain" >> "$cfgfile" \ | |
21186 | 21330 | || (rm -f "$cfgfile"; exit 1) |
21187 | 21331 | |
21188 | 21332 | mv -f "$cfgfile" "$ofile" || |
234 | 234 | ETAGS = @ETAGS@ |
235 | 235 | EXEEXT = @EXEEXT@ |
236 | 236 | FGREP = @FGREP@ |
237 | FILECMD = @FILECMD@ | |
237 | 238 | GREP = @GREP@ |
238 | 239 | GTK_CONFIG = @GTK_CONFIG@ |
239 | 240 | INSTALL = @INSTALL@ |
352 | 352 | ETAGS = @ETAGS@ |
353 | 353 | EXEEXT = @EXEEXT@ |
354 | 354 | FGREP = @FGREP@ |
355 | FILECMD = @FILECMD@ | |
355 | 356 | GREP = @GREP@ |
356 | 357 | GTK_CONFIG = @GTK_CONFIG@ |
357 | 358 | INSTALL = @INSTALL@ |
0 | #! /bin/sh | |
0 | #! /usr/bin/env sh | |
1 | 1 | ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in |
2 | ## by inline-source v2014-01-03.01 | |
3 | ||
4 | # libtool (GNU libtool) 2.4.6 | |
2 | ## by inline-source v2019-02-19.15 | |
3 | ||
4 | # libtool (GNU libtool) 2.4.7 | |
5 | 5 | # Provide generalized library-building support services. |
6 | 6 | # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
7 | 7 | |
8 | # Copyright (C) 1996-2015 Free Software Foundation, Inc. | |
8 | # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. | |
9 | 9 | # This is free software; see the source for copying conditions. There is NO |
10 | 10 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11 | 11 | |
30 | 30 | |
31 | 31 | PROGRAM=libtool |
32 | 32 | PACKAGE=libtool |
33 | VERSION="2.4.6 Debian-2.4.6-15" | |
34 | package_revision=2.4.6 | |
33 | VERSION="2.4.7 Debian-2.4.7-4" | |
34 | package_revision=2.4.7 | |
35 | 35 | |
36 | 36 | |
37 | 37 | ## ------ ## |
63 | 63 | # libraries, which are installed to $pkgauxdir. |
64 | 64 | |
65 | 65 | # Set a version string for this script. |
66 | scriptversion=2015-01-20.17; # UTC | |
66 | scriptversion=2019-02-19.15; # UTC | |
67 | 67 | |
68 | 68 | # General shell script boiler plate, and helper functions. |
69 | 69 | # Written by Gary V. Vaughan, 2004 |
70 | 70 | |
71 | # Copyright (C) 2004-2015 Free Software Foundation, Inc. | |
72 | # This is free software; see the source for copying conditions. There is NO | |
73 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
74 | ||
75 | # This program is free software; you can redistribute it and/or modify | |
76 | # it under the terms of the GNU General Public License as published by | |
77 | # the Free Software Foundation; either version 3 of the License, or | |
78 | # (at your option) any later version. | |
79 | ||
80 | # As a special exception to the GNU General Public License, if you distribute | |
81 | # this file as part of a program or library that is built using GNU Libtool, | |
82 | # you may include this file under the same distribution terms that you use | |
83 | # for the rest of that program. | |
84 | ||
85 | # This program is distributed in the hope that it will be useful, | |
86 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
87 | # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU | |
88 | # General Public License for more details. | |
89 | ||
90 | # You should have received a copy of the GNU General Public License | |
91 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
92 | ||
93 | # Please report bugs or propose patches to gary@gnu.org. | |
71 | # This is free software. There is NO warranty; not even for | |
72 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
73 | # | |
74 | # Copyright (C) 2004-2019, 2021 Bootstrap Authors | |
75 | # | |
76 | # This file is dual licensed under the terms of the MIT license | |
77 | # <https://opensource.org/license/MIT>, and GPL version 2 or later | |
78 | # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of | |
79 | # these licenses when using or redistributing this software or any of | |
80 | # the files within it. See the URLs above, or the file `LICENSE` | |
81 | # included in the Bootstrap distribution for the full license texts. | |
82 | ||
83 | # Please report bugs or propose patches to: | |
84 | # <https://github.com/gnulib-modules/bootstrap/issues> | |
94 | 85 | |
95 | 86 | |
96 | 87 | ## ------ ## |
138 | 129 | _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" |
139 | 130 | fi" |
140 | 131 | done |
141 | ||
142 | # CDPATH. | |
143 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
132 | # These NLS vars are set unconditionally (bootstrap issue #24). Unset those | |
133 | # in case the environment reset is needed later and the $save_* variant is not | |
134 | # defined (see the code above). | |
135 | LC_ALL=C | |
136 | LANGUAGE=C | |
137 | export LANGUAGE LC_ALL | |
144 | 138 | |
145 | 139 | # Make sure IFS has a sensible default |
146 | 140 | sp=' ' |
157 | 151 | } |
158 | 152 | fi |
159 | 153 | |
154 | ||
155 | # func_unset VAR | |
156 | # -------------- | |
157 | # Portably unset VAR. | |
158 | # In some shells, an 'unset VAR' statement leaves a non-zero return | |
159 | # status if VAR is already unset, which might be problematic if the | |
160 | # statement is used at the end of a function (thus poisoning its return | |
161 | # value) or when 'set -e' is active (causing even a spurious abort of | |
162 | # the script in this case). | |
163 | func_unset () | |
164 | { | |
165 | { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } | |
166 | } | |
167 | ||
168 | ||
169 | # Make sure CDPATH doesn't cause `cd` commands to output the target dir. | |
170 | func_unset CDPATH | |
171 | ||
172 | # Make sure ${,E,F}GREP behave sanely. | |
173 | func_unset GREP_OPTIONS | |
160 | 174 | |
161 | 175 | |
162 | 176 | ## ------------------------- ## |
258 | 272 | rm -f conftest.in conftest.tmp conftest.nl conftest.out |
259 | 273 | } |
260 | 274 | |
261 | func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin | |
275 | func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" | |
262 | 276 | rm -f conftest.sed |
263 | 277 | SED=$func_path_progs_result |
264 | 278 | } |
294 | 308 | rm -f conftest.in conftest.tmp conftest.nl conftest.out |
295 | 309 | } |
296 | 310 | |
297 | func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin | |
311 | func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" | |
298 | 312 | GREP=$func_path_progs_result |
299 | 313 | } |
300 | 314 | |
358 | 372 | s/^$_G_bs2$_G_dollar/$_G_bs&/ |
359 | 373 | s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g |
360 | 374 | s/\n//g" |
375 | ||
376 | # require_check_ifs_backslash | |
377 | # --------------------------- | |
378 | # Check if we can use backslash as IFS='\' separator, and set | |
379 | # $check_ifs_backshlash_broken to ':' or 'false'. | |
380 | require_check_ifs_backslash=func_require_check_ifs_backslash | |
381 | func_require_check_ifs_backslash () | |
382 | { | |
383 | _G_save_IFS=$IFS | |
384 | IFS='\' | |
385 | _G_check_ifs_backshlash='a\\b' | |
386 | for _G_i in $_G_check_ifs_backshlash | |
387 | do | |
388 | case $_G_i in | |
389 | a) | |
390 | check_ifs_backshlash_broken=false | |
391 | ;; | |
392 | '') | |
393 | break | |
394 | ;; | |
395 | *) | |
396 | check_ifs_backshlash_broken=: | |
397 | break | |
398 | ;; | |
399 | esac | |
400 | done | |
401 | IFS=$_G_save_IFS | |
402 | require_check_ifs_backslash=: | |
403 | } | |
361 | 404 | |
362 | 405 | |
363 | 406 | ## ----------------- ## |
579 | 622 | { |
580 | 623 | $debug_cmd |
581 | 624 | |
582 | func_quote_for_eval "$2" | |
583 | eval "$1+=\\ \$func_quote_for_eval_result" | |
625 | func_quote_arg pretty "$2" | |
626 | eval "$1+=\\ \$func_quote_arg_result" | |
584 | 627 | }' |
585 | 628 | else |
586 | 629 | func_append_quoted () |
587 | 630 | { |
588 | 631 | $debug_cmd |
589 | 632 | |
590 | func_quote_for_eval "$2" | |
591 | eval "$1=\$$1\\ \$func_quote_for_eval_result" | |
633 | func_quote_arg pretty "$2" | |
634 | eval "$1=\$$1\\ \$func_quote_arg_result" | |
592 | 635 | } |
593 | 636 | fi |
594 | 637 | |
1090 | 1133 | } |
1091 | 1134 | |
1092 | 1135 | |
1093 | # func_quote_for_eval ARG... | |
1094 | # -------------------------- | |
1095 | # Aesthetically quote ARGs to be evaled later. | |
1096 | # This function returns two values: | |
1097 | # i) func_quote_for_eval_result | |
1098 | # double-quoted, suitable for a subsequent eval | |
1099 | # ii) func_quote_for_eval_unquoted_result | |
1100 | # has all characters that are still active within double | |
1101 | # quotes backslashified. | |
1102 | func_quote_for_eval () | |
1136 | # func_quote_portable EVAL ARG | |
1137 | # ---------------------------- | |
1138 | # Internal function to portably implement func_quote_arg. Note that we still | |
1139 | # keep attention to performance here so we as much as possible try to avoid | |
1140 | # calling sed binary (so far O(N) complexity as long as func_append is O(1)). | |
1141 | func_quote_portable () | |
1103 | 1142 | { |
1104 | 1143 | $debug_cmd |
1105 | 1144 | |
1106 | func_quote_for_eval_unquoted_result= | |
1107 | func_quote_for_eval_result= | |
1108 | while test 0 -lt $#; do | |
1145 | $require_check_ifs_backslash | |
1146 | ||
1147 | func_quote_portable_result=$2 | |
1148 | ||
1149 | # one-time-loop (easy break) | |
1150 | while true | |
1151 | do | |
1152 | if $1; then | |
1153 | func_quote_portable_result=`$ECHO "$2" | $SED \ | |
1154 | -e "$sed_double_quote_subst" -e "$sed_double_backslash"` | |
1155 | break | |
1156 | fi | |
1157 | ||
1158 | # Quote for eval. | |
1159 | case $func_quote_portable_result in | |
1160 | *[\\\`\"\$]*) | |
1161 | # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string | |
1162 | # contains the shell wildcard characters. | |
1163 | case $check_ifs_backshlash_broken$func_quote_portable_result in | |
1164 | :*|*[\[\*\?]*) | |
1165 | func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | |
1166 | | $SED "$sed_quote_subst"` | |
1167 | break | |
1168 | ;; | |
1169 | esac | |
1170 | ||
1171 | func_quote_portable_old_IFS=$IFS | |
1172 | for _G_char in '\' '`' '"' '$' | |
1173 | do | |
1174 | # STATE($1) PREV($2) SEPARATOR($3) | |
1175 | set start "" "" | |
1176 | func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy | |
1177 | IFS=$_G_char | |
1178 | for _G_part in $func_quote_portable_result | |
1179 | do | |
1180 | case $1 in | |
1181 | quote) | |
1182 | func_append func_quote_portable_result "$3$2" | |
1183 | set quote "$_G_part" "\\$_G_char" | |
1184 | ;; | |
1185 | start) | |
1186 | set first "" "" | |
1187 | func_quote_portable_result= | |
1188 | ;; | |
1189 | first) | |
1190 | set quote "$_G_part" "" | |
1191 | ;; | |
1192 | esac | |
1193 | done | |
1194 | done | |
1195 | IFS=$func_quote_portable_old_IFS | |
1196 | ;; | |
1197 | *) ;; | |
1198 | esac | |
1199 | break | |
1200 | done | |
1201 | ||
1202 | func_quote_portable_unquoted_result=$func_quote_portable_result | |
1203 | case $func_quote_portable_result in | |
1204 | # double-quote args containing shell metacharacters to delay | |
1205 | # word splitting, command substitution and variable expansion | |
1206 | # for a subsequent eval. | |
1207 | # many bourne shells cannot handle close brackets correctly | |
1208 | # in scan sets, so we specify it separately. | |
1209 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1210 | func_quote_portable_result=\"$func_quote_portable_result\" | |
1211 | ;; | |
1212 | esac | |
1213 | } | |
1214 | ||
1215 | ||
1216 | # func_quotefast_eval ARG | |
1217 | # ----------------------- | |
1218 | # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', | |
1219 | # but optimized for speed. Result is stored in $func_quotefast_eval. | |
1220 | if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then | |
1221 | printf -v _GL_test_printf_tilde %q '~' | |
1222 | if test '\~' = "$_GL_test_printf_tilde"; then | |
1223 | func_quotefast_eval () | |
1224 | { | |
1225 | printf -v func_quotefast_eval_result %q "$1" | |
1226 | } | |
1227 | else | |
1228 | # Broken older Bash implementations. Make those faster too if possible. | |
1229 | func_quotefast_eval () | |
1230 | { | |
1109 | 1231 | case $1 in |
1110 | *[\\\`\"\$]*) | |
1111 | _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; | |
1112 | *) | |
1113 | _G_unquoted_arg=$1 ;; | |
1114 | esac | |
1115 | if test -n "$func_quote_for_eval_unquoted_result"; then | |
1116 | func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" | |
1117 | else | |
1118 | func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" | |
1119 | fi | |
1120 | ||
1121 | case $_G_unquoted_arg in | |
1122 | # Double-quote args containing shell metacharacters to delay | |
1123 | # word splitting, command substitution and variable expansion | |
1124 | # for a subsequent eval. | |
1125 | # Many Bourne shells cannot handle close brackets correctly | |
1126 | # in scan sets, so we specify it separately. | |
1127 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1128 | _G_quoted_arg=\"$_G_unquoted_arg\" | |
1232 | '~'*) | |
1233 | func_quote_portable false "$1" | |
1234 | func_quotefast_eval_result=$func_quote_portable_result | |
1129 | 1235 | ;; |
1130 | 1236 | *) |
1131 | _G_quoted_arg=$_G_unquoted_arg | |
1132 | ;; | |
1237 | printf -v func_quotefast_eval_result %q "$1" | |
1238 | ;; | |
1133 | 1239 | esac |
1134 | ||
1135 | if test -n "$func_quote_for_eval_result"; then | |
1136 | func_append func_quote_for_eval_result " $_G_quoted_arg" | |
1240 | } | |
1241 | fi | |
1242 | else | |
1243 | func_quotefast_eval () | |
1244 | { | |
1245 | func_quote_portable false "$1" | |
1246 | func_quotefast_eval_result=$func_quote_portable_result | |
1247 | } | |
1248 | fi | |
1249 | ||
1250 | ||
1251 | # func_quote_arg MODEs ARG | |
1252 | # ------------------------ | |
1253 | # Quote one ARG to be evaled later. MODEs argument may contain zero or more | |
1254 | # specifiers listed below separated by ',' character. This function returns two | |
1255 | # values: | |
1256 | # i) func_quote_arg_result | |
1257 | # double-quoted (when needed), suitable for a subsequent eval | |
1258 | # ii) func_quote_arg_unquoted_result | |
1259 | # has all characters that are still active within double | |
1260 | # quotes backslashified. Available only if 'unquoted' is specified. | |
1261 | # | |
1262 | # Available modes: | |
1263 | # ---------------- | |
1264 | # 'eval' (default) | |
1265 | # - escape shell special characters | |
1266 | # 'expand' | |
1267 | # - the same as 'eval'; but do not quote variable references | |
1268 | # 'pretty' | |
1269 | # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might | |
1270 | # be used later in func_quote to get output like: 'echo "a b"' instead | |
1271 | # of 'echo a\ b'. This is slower than default on some shells. | |
1272 | # 'unquoted' | |
1273 | # - produce also $func_quote_arg_unquoted_result which does not contain | |
1274 | # wrapping double-quotes. | |
1275 | # | |
1276 | # Examples for 'func_quote_arg pretty,unquoted string': | |
1277 | # | |
1278 | # string | *_result | *_unquoted_result | |
1279 | # ------------+-----------------------+------------------- | |
1280 | # " | \" | \" | |
1281 | # a b | "a b" | a b | |
1282 | # "a b" | "\"a b\"" | \"a b\" | |
1283 | # * | "*" | * | |
1284 | # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" | |
1285 | # | |
1286 | # Examples for 'func_quote_arg pretty,unquoted,expand string': | |
1287 | # | |
1288 | # string | *_result | *_unquoted_result | |
1289 | # --------------+---------------------+-------------------- | |
1290 | # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" | |
1291 | func_quote_arg () | |
1292 | { | |
1293 | _G_quote_expand=false | |
1294 | case ,$1, in | |
1295 | *,expand,*) | |
1296 | _G_quote_expand=: | |
1297 | ;; | |
1298 | esac | |
1299 | ||
1300 | case ,$1, in | |
1301 | *,pretty,*|*,expand,*|*,unquoted,*) | |
1302 | func_quote_portable $_G_quote_expand "$2" | |
1303 | func_quote_arg_result=$func_quote_portable_result | |
1304 | func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result | |
1305 | ;; | |
1306 | *) | |
1307 | # Faster quote-for-eval for some shells. | |
1308 | func_quotefast_eval "$2" | |
1309 | func_quote_arg_result=$func_quotefast_eval_result | |
1310 | ;; | |
1311 | esac | |
1312 | } | |
1313 | ||
1314 | ||
1315 | # func_quote MODEs ARGs... | |
1316 | # ------------------------ | |
1317 | # Quote all ARGs to be evaled later and join them into single command. See | |
1318 | # func_quote_arg's description for more info. | |
1319 | func_quote () | |
1320 | { | |
1321 | $debug_cmd | |
1322 | _G_func_quote_mode=$1 ; shift | |
1323 | func_quote_result= | |
1324 | while test 0 -lt $#; do | |
1325 | func_quote_arg "$_G_func_quote_mode" "$1" | |
1326 | if test -n "$func_quote_result"; then | |
1327 | func_append func_quote_result " $func_quote_arg_result" | |
1137 | 1328 | else |
1138 | func_append func_quote_for_eval_result "$_G_quoted_arg" | |
1329 | func_append func_quote_result "$func_quote_arg_result" | |
1139 | 1330 | fi |
1140 | 1331 | shift |
1141 | 1332 | done |
1142 | } | |
1143 | ||
1144 | ||
1145 | # func_quote_for_expand ARG | |
1146 | # ------------------------- | |
1147 | # Aesthetically quote ARG to be evaled later; same as above, | |
1148 | # but do not quote variable references. | |
1149 | func_quote_for_expand () | |
1150 | { | |
1151 | $debug_cmd | |
1152 | ||
1153 | case $1 in | |
1154 | *[\\\`\"]*) | |
1155 | _G_arg=`$ECHO "$1" | $SED \ | |
1156 | -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; | |
1157 | *) | |
1158 | _G_arg=$1 ;; | |
1159 | esac | |
1160 | ||
1161 | case $_G_arg in | |
1162 | # Double-quote args containing shell metacharacters to delay | |
1163 | # word splitting and command substitution for a subsequent eval. | |
1164 | # Many Bourne shells cannot handle close brackets correctly | |
1165 | # in scan sets, so we specify it separately. | |
1166 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1167 | _G_arg=\"$_G_arg\" | |
1168 | ;; | |
1169 | esac | |
1170 | ||
1171 | func_quote_for_expand_result=$_G_arg | |
1172 | 1333 | } |
1173 | 1334 | |
1174 | 1335 | |
1214 | 1375 | _G_cmd=$1 |
1215 | 1376 | _G_fail_exp=${2-':'} |
1216 | 1377 | |
1217 | func_quote_for_expand "$_G_cmd" | |
1218 | eval "func_notquiet $func_quote_for_expand_result" | |
1378 | func_quote_arg pretty,expand "$_G_cmd" | |
1379 | eval "func_notquiet $func_quote_arg_result" | |
1219 | 1380 | |
1220 | 1381 | $opt_dry_run || { |
1221 | 1382 | eval "$_G_cmd" |
1240 | 1401 | _G_fail_exp=${2-':'} |
1241 | 1402 | |
1242 | 1403 | $opt_quiet || { |
1243 | func_quote_for_expand "$_G_cmd" | |
1244 | eval "func_echo $func_quote_for_expand_result" | |
1404 | func_quote_arg expand,pretty "$_G_cmd" | |
1405 | eval "func_echo $func_quote_arg_result" | |
1245 | 1406 | } |
1246 | 1407 | |
1247 | 1408 | $opt_dry_run || { |
1368 | 1529 | # End: |
1369 | 1530 | #! /bin/sh |
1370 | 1531 | |
1371 | # Set a version string for this script. | |
1372 | scriptversion=2015-10-07.11; # UTC | |
1373 | ||
1374 | 1532 | # A portable, pluggable option parser for Bourne shell. |
1375 | 1533 | # Written by Gary V. Vaughan, 2010 |
1376 | 1534 | |
1377 | # Copyright (C) 2010-2015 Free Software Foundation, Inc. | |
1378 | # This is free software; see the source for copying conditions. There is NO | |
1379 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1380 | ||
1381 | # This program is free software: you can redistribute it and/or modify | |
1382 | # it under the terms of the GNU General Public License as published by | |
1383 | # the Free Software Foundation, either version 3 of the License, or | |
1384 | # (at your option) any later version. | |
1385 | ||
1386 | # This program is distributed in the hope that it will be useful, | |
1387 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
1388 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
1389 | # GNU General Public License for more details. | |
1390 | ||
1391 | # You should have received a copy of the GNU General Public License | |
1392 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
1393 | ||
1394 | # Please report bugs or propose patches to gary@gnu.org. | |
1535 | # This is free software. There is NO warranty; not even for | |
1536 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1537 | # | |
1538 | # Copyright (C) 2010-2019, 2021 Bootstrap Authors | |
1539 | # | |
1540 | # This file is dual licensed under the terms of the MIT license | |
1541 | # <https://opensource.org/license/MIT>, and GPL version 2 or later | |
1542 | # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of | |
1543 | # these licenses when using or redistributing this software or any of | |
1544 | # the files within it. See the URLs above, or the file `LICENSE` | |
1545 | # included in the Bootstrap distribution for the full license texts. | |
1546 | ||
1547 | # Please report bugs or propose patches to: | |
1548 | # <https://github.com/gnulib-modules/bootstrap/issues> | |
1549 | ||
1550 | # Set a version string for this script. | |
1551 | scriptversion=2019-02-19.15; # UTC | |
1395 | 1552 | |
1396 | 1553 | |
1397 | 1554 | ## ------ ## |
1414 | 1571 | # |
1415 | 1572 | # In order for the '--version' option to work, you will need to have a |
1416 | 1573 | # suitably formatted comment like the one at the top of this file |
1417 | # starting with '# Written by ' and ending with '# warranty; '. | |
1574 | # starting with '# Written by ' and ending with '# Copyright'. | |
1418 | 1575 | # |
1419 | 1576 | # For '-h' and '--help' to work, you will also need a one line |
1420 | 1577 | # description of your script's purpose in a comment directly above the |
1426 | 1583 | # to display verbose messages only when your user has specified |
1427 | 1584 | # '--verbose'. |
1428 | 1585 | # |
1429 | # After sourcing this file, you can plug processing for additional | |
1586 | # After sourcing this file, you can plug in processing for additional | |
1430 | 1587 | # options by amending the variables from the 'Configuration' section |
1431 | 1588 | # below, and following the instructions in the 'Option parsing' |
1432 | 1589 | # section further down. |
1475 | 1632 | ## ------------------------- ## |
1476 | 1633 | |
1477 | 1634 | # This section contains functions for adding, removing, and running hooks |
1478 | # to the main code. A hook is just a named list of of function, that can | |
1479 | # be run in order later on. | |
1635 | # in the main code. A hook is just a list of function names that can be | |
1636 | # run in order later on. | |
1480 | 1637 | |
1481 | 1638 | # func_hookable FUNC_NAME |
1482 | 1639 | # ----------------------- |
1509 | 1666 | |
1510 | 1667 | # func_remove_hook FUNC_NAME HOOK_FUNC |
1511 | 1668 | # ------------------------------------ |
1512 | # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. | |
1669 | # Remove HOOK_FUNC from the list of hook functions to be called by | |
1670 | # FUNC_NAME. | |
1513 | 1671 | func_remove_hook () |
1514 | 1672 | { |
1515 | 1673 | $debug_cmd |
1516 | 1674 | |
1517 | 1675 | eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' |
1676 | } | |
1677 | ||
1678 | ||
1679 | # func_propagate_result FUNC_NAME_A FUNC_NAME_B | |
1680 | # --------------------------------------------- | |
1681 | # If the *_result variable of FUNC_NAME_A _is set_, assign its value to | |
1682 | # *_result variable of FUNC_NAME_B. | |
1683 | func_propagate_result () | |
1684 | { | |
1685 | $debug_cmd | |
1686 | ||
1687 | func_propagate_result_result=: | |
1688 | if eval "test \"\${${1}_result+set}\" = set" | |
1689 | then | |
1690 | eval "${2}_result=\$${1}_result" | |
1691 | else | |
1692 | func_propagate_result_result=false | |
1693 | fi | |
1518 | 1694 | } |
1519 | 1695 | |
1520 | 1696 | |
1521 | 1697 | # func_run_hooks FUNC_NAME [ARG]... |
1522 | 1698 | # --------------------------------- |
1523 | 1699 | # Run all hook functions registered to FUNC_NAME. |
1524 | # It is assumed that the list of hook functions contains nothing more | |
1700 | # It's assumed that the list of hook functions contains nothing more | |
1525 | 1701 | # than a whitespace-delimited list of legal shell function names, and |
1526 | 1702 | # no effort is wasted trying to catch shell meta-characters or preserve |
1527 | 1703 | # whitespace. |
1533 | 1709 | |
1534 | 1710 | case " $hookable_fns " in |
1535 | 1711 | *" $1 "*) ;; |
1536 | *) func_fatal_error "'$1' does not support hook funcions.n" ;; | |
1712 | *) func_fatal_error "'$1' does not support hook functions." ;; | |
1537 | 1713 | esac |
1538 | 1714 | |
1539 | 1715 | eval _G_hook_fns=\$$1_hooks; shift |
1540 | 1716 | |
1541 | 1717 | for _G_hook in $_G_hook_fns; do |
1542 | if eval $_G_hook '"$@"'; then | |
1543 | # store returned options list back into positional | |
1544 | # parameters for next 'cmd' execution. | |
1545 | eval _G_hook_result=\$${_G_hook}_result | |
1546 | eval set dummy "$_G_hook_result"; shift | |
1547 | _G_rc_run_hooks=: | |
1718 | func_unset "${_G_hook}_result" | |
1719 | eval $_G_hook '${1+"$@"}' | |
1720 | func_propagate_result $_G_hook func_run_hooks | |
1721 | if $func_propagate_result_result; then | |
1722 | eval set dummy "$func_run_hooks_result"; shift | |
1548 | 1723 | fi |
1549 | 1724 | done |
1550 | ||
1551 | $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result | |
1552 | 1725 | } |
1553 | 1726 | |
1554 | 1727 | |
1558 | 1731 | ## --------------- ## |
1559 | 1732 | |
1560 | 1733 | # In order to add your own option parsing hooks, you must accept the |
1561 | # full positional parameter list in your hook function, you may remove/edit | |
1562 | # any options that you action, and then pass back the remaining unprocessed | |
1563 | # options in '<hooked_function_name>_result', escaped suitably for | |
1564 | # 'eval'. In this case you also must return $EXIT_SUCCESS to let the | |
1565 | # hook's caller know that it should pay attention to | |
1566 | # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that | |
1567 | # arguments are left untouched by the hook and therefore caller will ignore the | |
1568 | # result variable. | |
1734 | # full positional parameter list from your hook function. You may remove | |
1735 | # or edit any options that you action, and then pass back the remaining | |
1736 | # unprocessed options in '<hooked_function_name>_result', escaped | |
1737 | # suitably for 'eval'. | |
1738 | # | |
1739 | # The '<hooked_function_name>_result' variable is automatically unset | |
1740 | # before your hook gets called; for best performance, only set the | |
1741 | # *_result variable when necessary (i.e. don't call the 'func_quote' | |
1742 | # function unnecessarily because it can be an expensive operation on some | |
1743 | # machines). | |
1569 | 1744 | # |
1570 | 1745 | # Like this: |
1571 | 1746 | # |
1577 | 1752 | # usage_message=$usage_message' |
1578 | 1753 | # -s, --silent don'\''t print informational messages |
1579 | 1754 | # ' |
1580 | # # No change in '$@' (ignored completely by this hook). There is | |
1581 | # # no need to do the equivalent (but slower) action: | |
1582 | # # func_quote_for_eval ${1+"$@"} | |
1583 | # # my_options_prep_result=$func_quote_for_eval_result | |
1584 | # false | |
1755 | # # No change in '$@' (ignored completely by this hook). Leave | |
1756 | # # my_options_prep_result variable intact. | |
1585 | 1757 | # } |
1586 | 1758 | # func_add_hook func_options_prep my_options_prep |
1587 | 1759 | # |
1592 | 1764 | # |
1593 | 1765 | # args_changed=false |
1594 | 1766 | # |
1595 | # # Note that for efficiency, we parse as many options as we can | |
1767 | # # Note that, for efficiency, we parse as many options as we can | |
1596 | 1768 | # # recognise in a loop before passing the remainder back to the |
1597 | 1769 | # # caller on the first unrecognised argument we encounter. |
1598 | 1770 | # while test $# -gt 0; do |
1609 | 1781 | # args_changed=: |
1610 | 1782 | # ;; |
1611 | 1783 | # *) # Make sure the first unrecognised option "$_G_opt" |
1612 | # # is added back to "$@", we could need that later | |
1613 | # # if $args_changed is true. | |
1784 | # # is added back to "$@" in case we need it later, | |
1785 | # # if $args_changed was set to 'true'. | |
1614 | 1786 | # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; |
1615 | 1787 | # esac |
1616 | 1788 | # done |
1617 | 1789 | # |
1790 | # # Only call 'func_quote' here if we processed at least one argument. | |
1618 | 1791 | # if $args_changed; then |
1619 | # func_quote_for_eval ${1+"$@"} | |
1620 | # my_silent_option_result=$func_quote_for_eval_result | |
1792 | # func_quote eval ${1+"$@"} | |
1793 | # my_silent_option_result=$func_quote_result | |
1621 | 1794 | # fi |
1622 | # | |
1623 | # $args_changed | |
1624 | 1795 | # } |
1625 | 1796 | # func_add_hook func_parse_options my_silent_option |
1626 | 1797 | # |
1631 | 1802 | # |
1632 | 1803 | # $opt_silent && $opt_verbose && func_fatal_help "\ |
1633 | 1804 | # '--silent' and '--verbose' options are mutually exclusive." |
1634 | # | |
1635 | # false | |
1636 | 1805 | # } |
1637 | 1806 | # func_add_hook func_validate_options my_option_validation |
1638 | 1807 | # |
1648 | 1817 | { |
1649 | 1818 | $debug_cmd |
1650 | 1819 | |
1651 | _G_func_options_finish_exit=false | |
1652 | if func_run_hooks func_options ${1+"$@"}; then | |
1653 | func_options_finish_result=$func_run_hooks_result | |
1654 | _G_func_options_finish_exit=: | |
1655 | fi | |
1656 | ||
1657 | $_G_func_options_finish_exit | |
1820 | func_run_hooks func_options ${1+"$@"} | |
1821 | func_propagate_result func_run_hooks func_options_finish | |
1658 | 1822 | } |
1659 | 1823 | |
1660 | 1824 | |
1667 | 1831 | { |
1668 | 1832 | $debug_cmd |
1669 | 1833 | |
1670 | _G_rc_options=false | |
1834 | _G_options_quoted=false | |
1671 | 1835 | |
1672 | 1836 | for my_func in options_prep parse_options validate_options options_finish |
1673 | 1837 | do |
1674 | if eval func_$my_func '${1+"$@"}'; then | |
1675 | eval _G_res_var='$'"func_${my_func}_result" | |
1676 | eval set dummy "$_G_res_var" ; shift | |
1677 | _G_rc_options=: | |
1838 | func_unset func_${my_func}_result | |
1839 | func_unset func_run_hooks_result | |
1840 | eval func_$my_func '${1+"$@"}' | |
1841 | func_propagate_result func_$my_func func_options | |
1842 | if $func_propagate_result_result; then | |
1843 | eval set dummy "$func_options_result"; shift | |
1844 | _G_options_quoted=: | |
1678 | 1845 | fi |
1679 | 1846 | done |
1680 | 1847 | |
1681 | # Save modified positional parameters for caller. As a top-level | |
1682 | # options-parser function we always need to set the 'func_options_result' | |
1683 | # variable (regardless the $_G_rc_options value). | |
1684 | if $_G_rc_options; then | |
1685 | func_options_result=$_G_res_var | |
1686 | else | |
1687 | func_quote_for_eval ${1+"$@"} | |
1688 | func_options_result=$func_quote_for_eval_result | |
1689 | fi | |
1690 | ||
1691 | $_G_rc_options | |
1848 | $_G_options_quoted || { | |
1849 | # As we (func_options) are top-level options-parser function and | |
1850 | # nobody quoted "$@" for us yet, we need to do it explicitly for | |
1851 | # caller. | |
1852 | func_quote eval ${1+"$@"} | |
1853 | func_options_result=$func_quote_result | |
1854 | } | |
1692 | 1855 | } |
1693 | 1856 | |
1694 | 1857 | |
1698 | 1861 | # Note that when calling hook functions, we pass through the list of |
1699 | 1862 | # positional parameters. If a hook function modifies that list, and |
1700 | 1863 | # needs to propagate that back to rest of this script, then the complete |
1701 | # modified list must be put in 'func_run_hooks_result' before | |
1702 | # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). | |
1864 | # modified list must be put in 'func_run_hooks_result' before returning. | |
1703 | 1865 | func_hookable func_options_prep |
1704 | 1866 | func_options_prep () |
1705 | 1867 | { |
1709 | 1871 | opt_verbose=false |
1710 | 1872 | opt_warning_types= |
1711 | 1873 | |
1712 | _G_rc_options_prep=false | |
1713 | if func_run_hooks func_options_prep ${1+"$@"}; then | |
1714 | _G_rc_options_prep=: | |
1715 | # save modified positional parameters for caller | |
1716 | func_options_prep_result=$func_run_hooks_result | |
1717 | fi | |
1718 | ||
1719 | $_G_rc_options_prep | |
1874 | func_run_hooks func_options_prep ${1+"$@"} | |
1875 | func_propagate_result func_run_hooks func_options_prep | |
1720 | 1876 | } |
1721 | 1877 | |
1722 | 1878 | |
1728 | 1884 | { |
1729 | 1885 | $debug_cmd |
1730 | 1886 | |
1731 | func_parse_options_result= | |
1732 | ||
1733 | _G_rc_parse_options=false | |
1887 | _G_parse_options_requote=false | |
1734 | 1888 | # this just eases exit handling |
1735 | 1889 | while test $# -gt 0; do |
1736 | 1890 | # Defer to hook functions for initial option parsing, so they |
1737 | 1891 | # get priority in the event of reusing an option name. |
1738 | if func_run_hooks func_parse_options ${1+"$@"}; then | |
1739 | eval set dummy "$func_run_hooks_result"; shift | |
1740 | _G_rc_parse_options=: | |
1892 | func_run_hooks func_parse_options ${1+"$@"} | |
1893 | func_propagate_result func_run_hooks func_parse_options | |
1894 | if $func_propagate_result_result; then | |
1895 | eval set dummy "$func_parse_options_result"; shift | |
1896 | # Even though we may have changed "$@", we passed the "$@" array | |
1897 | # down into the hook and it quoted it for us (because we are in | |
1898 | # this if-branch). No need to quote it again. | |
1899 | _G_parse_options_requote=false | |
1741 | 1900 | fi |
1742 | 1901 | |
1743 | 1902 | # Break out of the loop if we already parsed every option. |
1744 | 1903 | test $# -gt 0 || break |
1745 | 1904 | |
1905 | # We expect that one of the options parsed in this function matches | |
1906 | # and thus we remove _G_opt from "$@" and need to re-quote. | |
1746 | 1907 | _G_match_parse_options=: |
1747 | 1908 | _G_opt=$1 |
1748 | 1909 | shift |
1749 | 1910 | case $_G_opt in |
1750 | 1911 | --debug|-x) debug_cmd='set -x' |
1751 | func_echo "enabling shell trace mode" | |
1912 | func_echo "enabling shell trace mode" >&2 | |
1752 | 1913 | $debug_cmd |
1753 | 1914 | ;; |
1754 | 1915 | |
1759 | 1920 | |
1760 | 1921 | --warnings|--warning|-W) |
1761 | 1922 | if test $# = 0 && func_missing_arg $_G_opt; then |
1762 | _G_rc_parse_options=: | |
1923 | _G_parse_options_requote=: | |
1763 | 1924 | break |
1764 | 1925 | fi |
1765 | 1926 | case " $warning_categories $1" in |
1814 | 1975 | shift |
1815 | 1976 | ;; |
1816 | 1977 | |
1817 | --) _G_rc_parse_options=: ; break ;; | |
1978 | --) _G_parse_options_requote=: ; break ;; | |
1818 | 1979 | -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
1819 | 1980 | *) set dummy "$_G_opt" ${1+"$@"}; shift |
1820 | 1981 | _G_match_parse_options=false |
1822 | 1983 | ;; |
1823 | 1984 | esac |
1824 | 1985 | |
1825 | $_G_match_parse_options && _G_rc_parse_options=: | |
1986 | if $_G_match_parse_options; then | |
1987 | _G_parse_options_requote=: | |
1988 | fi | |
1826 | 1989 | done |
1827 | 1990 | |
1828 | ||
1829 | if $_G_rc_parse_options; then | |
1991 | if $_G_parse_options_requote; then | |
1830 | 1992 | # save modified positional parameters for caller |
1831 | func_quote_for_eval ${1+"$@"} | |
1832 | func_parse_options_result=$func_quote_for_eval_result | |
1993 | func_quote eval ${1+"$@"} | |
1994 | func_parse_options_result=$func_quote_result | |
1833 | 1995 | fi |
1834 | ||
1835 | $_G_rc_parse_options | |
1836 | 1996 | } |
1837 | 1997 | |
1838 | 1998 | |
1845 | 2005 | { |
1846 | 2006 | $debug_cmd |
1847 | 2007 | |
1848 | _G_rc_validate_options=false | |
1849 | ||
1850 | 2008 | # Display all warnings if -W was not given. |
1851 | 2009 | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
1852 | 2010 | |
1853 | if func_run_hooks func_validate_options ${1+"$@"}; then | |
1854 | # save modified positional parameters for caller | |
1855 | func_validate_options_result=$func_run_hooks_result | |
1856 | _G_rc_validate_options=: | |
1857 | fi | |
2011 | func_run_hooks func_validate_options ${1+"$@"} | |
2012 | func_propagate_result func_run_hooks func_validate_options | |
1858 | 2013 | |
1859 | 2014 | # Bail if the options were screwed! |
1860 | 2015 | $exit_cmd $EXIT_FAILURE |
1861 | ||
1862 | $_G_rc_validate_options | |
1863 | 2016 | } |
1864 | 2017 | |
1865 | 2018 | |
1915 | 2068 | |
1916 | 2069 | # func_split_equals STRING |
1917 | 2070 | # ------------------------ |
1918 | # Set func_split_equals_lhs and func_split_equals_rhs shell variables after | |
1919 | # splitting STRING at the '=' sign. | |
2071 | # Set func_split_equals_lhs and func_split_equals_rhs shell variables | |
2072 | # after splitting STRING at the '=' sign. | |
1920 | 2073 | test -z "$_G_HAVE_XSI_OPS" \ |
1921 | 2074 | && (eval 'x=a/b/c; |
1922 | 2075 | test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ |
1931 | 2084 | |
1932 | 2085 | func_split_equals_lhs=${1%%=*} |
1933 | 2086 | func_split_equals_rhs=${1#*=} |
1934 | test "x$func_split_equals_lhs" = "x$1" \ | |
1935 | && func_split_equals_rhs= | |
2087 | if test "x$func_split_equals_lhs" = "x$1"; then | |
2088 | func_split_equals_rhs= | |
2089 | fi | |
1936 | 2090 | }' |
1937 | 2091 | else |
1938 | 2092 | # ...otherwise fall back to using expr, which is often a shell builtin. |
1942 | 2096 | |
1943 | 2097 | func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` |
1944 | 2098 | func_split_equals_rhs= |
1945 | test "x$func_split_equals_lhs" = "x$1" \ | |
2099 | test "x$func_split_equals_lhs=" = "x$1" \ | |
1946 | 2100 | || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` |
1947 | 2101 | } |
1948 | 2102 | fi #func_split_equals |
1968 | 2122 | { |
1969 | 2123 | $debug_cmd |
1970 | 2124 | |
1971 | func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` | |
2125 | func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` | |
1972 | 2126 | func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` |
1973 | 2127 | } |
1974 | 2128 | fi #func_split_short_opt |
2010 | 2164 | # func_version |
2011 | 2165 | # ------------ |
2012 | 2166 | # Echo version message to standard output and exit. |
2167 | # The version message is extracted from the calling file's header | |
2168 | # comments, with leading '# ' stripped: | |
2169 | # 1. First display the progname and version | |
2170 | # 2. Followed by the header comment line matching /^# Written by / | |
2171 | # 3. Then a blank line followed by the first following line matching | |
2172 | # /^# Copyright / | |
2173 | # 4. Immediately followed by any lines between the previous matches, | |
2174 | # except lines preceding the intervening completely blank line. | |
2175 | # For example, see the header comments of this file. | |
2013 | 2176 | func_version () |
2014 | 2177 | { |
2015 | 2178 | $debug_cmd |
2016 | 2179 | |
2017 | 2180 | printf '%s\n' "$progname $scriptversion" |
2018 | 2181 | $SED -n ' |
2019 | /(C)/!b go | |
2020 | :more | |
2021 | /\./!{ | |
2022 | N | |
2023 | s|\n# | | | |
2024 | b more | |
2182 | /^# Written by /!b | |
2183 | s|^# ||; p; n | |
2184 | ||
2185 | :fwd2blnk | |
2186 | /./ { | |
2187 | n | |
2188 | b fwd2blnk | |
2025 | 2189 | } |
2026 | :go | |
2027 | /^# Written by /,/# warranty; / { | |
2028 | s|^# || | |
2029 | s|^# *$|| | |
2030 | s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| | |
2031 | p | |
2190 | p; n | |
2191 | ||
2192 | :holdwrnt | |
2193 | s|^# || | |
2194 | s|^# *$|| | |
2195 | /^Copyright /!{ | |
2196 | /./H | |
2197 | n | |
2198 | b holdwrnt | |
2032 | 2199 | } |
2033 | /^# Written by / { | |
2034 | s|^# || | |
2035 | p | |
2036 | } | |
2037 | /^warranty; /q' < "$progpath" | |
2200 | ||
2201 | s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| | |
2202 | G | |
2203 | s|\(\n\)\n*|\1|g | |
2204 | p; q' < "$progpath" | |
2038 | 2205 | |
2039 | 2206 | exit $? |
2040 | 2207 | } |
2044 | 2211 | # mode: shell-script |
2045 | 2212 | # sh-indentation: 2 |
2046 | 2213 | # eval: (add-hook 'before-save-hook 'time-stamp) |
2047 | # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | |
2214 | # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" | |
2048 | 2215 | # time-stamp-time-zone: "UTC" |
2049 | 2216 | # End: |
2050 | 2217 | |
2051 | 2218 | # Set a version string. |
2052 | scriptversion='(GNU libtool) 2.4.6' | |
2219 | scriptversion='(GNU libtool) 2.4.7' | |
2053 | 2220 | |
2054 | 2221 | |
2055 | 2222 | # func_echo ARG... |
2140 | 2307 | compiler: $LTCC |
2141 | 2308 | compiler flags: $LTCFLAGS |
2142 | 2309 | linker: $LD (gnu? $with_gnu_ld) |
2143 | version: $progname $scriptversion Debian-2.4.6-15 | |
2310 | version: $progname $scriptversion Debian-2.4.7-4 | |
2144 | 2311 | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
2145 | 2312 | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
2146 | 2313 | |
2196 | 2363 | # a configuration failure hint, and exit. |
2197 | 2364 | func_fatal_configuration () |
2198 | 2365 | { |
2199 | func__fatal_error ${1+"$@"} \ | |
2366 | func_fatal_error ${1+"$@"} \ | |
2200 | 2367 | "See the $PACKAGE documentation for more information." \ |
2201 | 2368 | "Fatal configuration error." |
2202 | 2369 | } |
2341 | 2508 | |
2342 | 2509 | nonopt= |
2343 | 2510 | preserve_args= |
2511 | ||
2512 | _G_rc_lt_options_prep=: | |
2344 | 2513 | |
2345 | 2514 | _G_rc_lt_options_prep=: |
2346 | 2515 | |
2374 | 2543 | |
2375 | 2544 | if $_G_rc_lt_options_prep; then |
2376 | 2545 | # Pass back the list of options. |
2377 | func_quote_for_eval ${1+"$@"} | |
2378 | libtool_options_prep_result=$func_quote_for_eval_result | |
2546 | func_quote eval ${1+"$@"} | |
2547 | libtool_options_prep_result=$func_quote_result | |
2379 | 2548 | fi |
2380 | ||
2381 | $_G_rc_lt_options_prep | |
2382 | 2549 | } |
2383 | 2550 | func_add_hook func_options_prep libtool_options_prep |
2384 | 2551 | |
2481 | 2648 | |
2482 | 2649 | if $_G_rc_lt_parse_options; then |
2483 | 2650 | # save modified positional parameters for caller |
2484 | func_quote_for_eval ${1+"$@"} | |
2485 | libtool_parse_options_result=$func_quote_for_eval_result | |
2651 | func_quote eval ${1+"$@"} | |
2652 | libtool_parse_options_result=$func_quote_result | |
2486 | 2653 | fi |
2487 | ||
2488 | $_G_rc_lt_parse_options | |
2489 | 2654 | } |
2490 | 2655 | func_add_hook func_parse_options libtool_parse_options |
2491 | 2656 | |
2542 | 2707 | } |
2543 | 2708 | |
2544 | 2709 | # Pass back the unparsed argument list |
2545 | func_quote_for_eval ${1+"$@"} | |
2546 | libtool_validate_options_result=$func_quote_for_eval_result | |
2710 | func_quote eval ${1+"$@"} | |
2711 | libtool_validate_options_result=$func_quote_result | |
2547 | 2712 | } |
2548 | 2713 | func_add_hook func_validate_options libtool_validate_options |
2549 | 2714 | |
3509 | 3674 | esac |
3510 | 3675 | done |
3511 | 3676 | |
3512 | func_quote_for_eval "$libobj" | |
3513 | test "X$libobj" != "X$func_quote_for_eval_result" \ | |
3677 | func_quote_arg pretty "$libobj" | |
3678 | test "X$libobj" != "X$func_quote_arg_result" \ | |
3514 | 3679 | && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
3515 | 3680 | && func_warning "libobj name '$libobj' may not contain shell special characters." |
3516 | 3681 | func_dirname_and_basename "$obj" "/" "" |
3583 | 3748 | |
3584 | 3749 | func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 |
3585 | 3750 | srcfile=$func_to_tool_file_result |
3586 | func_quote_for_eval "$srcfile" | |
3587 | qsrcfile=$func_quote_for_eval_result | |
3751 | func_quote_arg pretty "$srcfile" | |
3752 | qsrcfile=$func_quote_arg_result | |
3588 | 3753 | |
3589 | 3754 | # Only build a PIC object if we are building libtool libraries. |
3590 | 3755 | if test yes = "$build_libtool_libs"; then |
3739 | 3904 | -prefer-non-pic try to build non-PIC objects only |
3740 | 3905 | -shared do not build a '.o' file suitable for static linking |
3741 | 3906 | -static only build a '.o' file suitable for static linking |
3742 | -Wc,FLAG pass FLAG directly to the compiler | |
3907 | -Wc,FLAG | |
3908 | -Xcompiler FLAG pass FLAG directly to the compiler | |
3743 | 3909 | |
3744 | 3910 | COMPILE-COMMAND is a command to be used in creating a 'standard' object file |
3745 | 3911 | from the given SOURCEFILE. |
3845 | 4011 | -weak LIBNAME declare that the target provides the LIBNAME interface |
3846 | 4012 | -Wc,FLAG |
3847 | 4013 | -Xcompiler FLAG pass linker-specific FLAG directly to the compiler |
4014 | -Wa,FLAG | |
4015 | -Xassembler FLAG pass linker-specific FLAG directly to the assembler | |
3848 | 4016 | -Wl,FLAG |
3849 | 4017 | -Xlinker FLAG pass linker-specific FLAG directly to the linker |
3850 | 4018 | -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) |
4187 | 4355 | case $nonopt in *shtool*) :;; *) false;; esac |
4188 | 4356 | then |
4189 | 4357 | # Aesthetically quote it. |
4190 | func_quote_for_eval "$nonopt" | |
4191 | install_prog="$func_quote_for_eval_result " | |
4358 | func_quote_arg pretty "$nonopt" | |
4359 | install_prog="$func_quote_arg_result " | |
4192 | 4360 | arg=$1 |
4193 | 4361 | shift |
4194 | 4362 | else |
4198 | 4366 | |
4199 | 4367 | # The real first argument should be the name of the installation program. |
4200 | 4368 | # Aesthetically quote it. |
4201 | func_quote_for_eval "$arg" | |
4202 | func_append install_prog "$func_quote_for_eval_result" | |
4369 | func_quote_arg pretty "$arg" | |
4370 | func_append install_prog "$func_quote_arg_result" | |
4203 | 4371 | install_shared_prog=$install_prog |
4204 | 4372 | case " $install_prog " in |
4205 | 4373 | *[\\\ /]cp\ *) install_cp=: ;; |
4256 | 4424 | esac |
4257 | 4425 | |
4258 | 4426 | # Aesthetically quote the argument. |
4259 | func_quote_for_eval "$arg" | |
4260 | func_append install_prog " $func_quote_for_eval_result" | |
4427 | func_quote_arg pretty "$arg" | |
4428 | func_append install_prog " $func_quote_arg_result" | |
4261 | 4429 | if test -n "$arg2"; then |
4262 | func_quote_for_eval "$arg2" | |
4430 | func_quote_arg pretty "$arg2" | |
4263 | 4431 | fi |
4264 | func_append install_shared_prog " $func_quote_for_eval_result" | |
4432 | func_append install_shared_prog " $func_quote_arg_result" | |
4265 | 4433 | done |
4266 | 4434 | |
4267 | 4435 | test -z "$install_prog" && \ |
4272 | 4440 | |
4273 | 4441 | if test -n "$install_override_mode" && $no_mode; then |
4274 | 4442 | if $install_cp; then :; else |
4275 | func_quote_for_eval "$install_override_mode" | |
4276 | func_append install_shared_prog " -m $func_quote_for_eval_result" | |
4443 | func_quote_arg pretty "$install_override_mode" | |
4444 | func_append install_shared_prog " -m $func_quote_arg_result" | |
4277 | 4445 | fi |
4278 | 4446 | fi |
4279 | 4447 | |
4569 | 4737 | relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
4570 | 4738 | |
4571 | 4739 | $opt_quiet || { |
4572 | func_quote_for_expand "$relink_command" | |
4573 | eval "func_echo $func_quote_for_expand_result" | |
4740 | func_quote_arg expand,pretty "$relink_command" | |
4741 | eval "func_echo $func_quote_arg_result" | |
4574 | 4742 | } |
4575 | 4743 | if eval "$relink_command"; then : |
4576 | 4744 | else |
5349 | 5517 | if test \"\$libtool_execute_magic\" != \"$magic\"; then |
5350 | 5518 | file=\"\$0\"" |
5351 | 5519 | |
5352 | qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` | |
5520 | func_quote_arg pretty "$ECHO" | |
5521 | qECHO=$func_quote_arg_result | |
5353 | 5522 | $ECHO "\ |
5354 | 5523 | |
5355 | 5524 | # A function that is used when there is no print builtin or printf. |
5359 | 5528 | \$1 |
5360 | 5529 | _LTECHO_EOF' |
5361 | 5530 | } |
5362 | ECHO=\"$qECHO\" | |
5531 | ECHO=$qECHO | |
5363 | 5532 | fi |
5364 | 5533 | |
5365 | 5534 | # Very basic option parsing. These options are (a) specific to |
6702 | 6871 | while test "$#" -gt 0; do |
6703 | 6872 | arg=$1 |
6704 | 6873 | shift |
6705 | func_quote_for_eval "$arg" | |
6706 | qarg=$func_quote_for_eval_unquoted_result | |
6707 | func_append libtool_args " $func_quote_for_eval_result" | |
6874 | func_quote_arg pretty,unquoted "$arg" | |
6875 | qarg=$func_quote_arg_unquoted_result | |
6876 | func_append libtool_args " $func_quote_arg_result" | |
6708 | 6877 | |
6709 | 6878 | # If the previous option needs an argument, assign it. |
6710 | 6879 | if test -n "$prev"; then |
6940 | 7109 | prev= |
6941 | 7110 | continue |
6942 | 7111 | ;; |
7112 | xassembler) | |
7113 | func_append compiler_flags " -Xassembler $qarg" | |
7114 | prev= | |
7115 | func_append compile_command " -Xassembler $qarg" | |
7116 | func_append finalize_command " -Xassembler $qarg" | |
7117 | continue | |
7118 | ;; | |
6943 | 7119 | xcclinker) |
6944 | 7120 | func_append linker_flags " $qarg" |
6945 | 7121 | func_append compiler_flags " $qarg" |
7110 | 7286 | # These systems don't actually have a C library (as such) |
7111 | 7287 | test X-lc = "X$arg" && continue |
7112 | 7288 | ;; |
7113 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | |
7289 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) | |
7114 | 7290 | # Do not include libc due to us having libc/libc_r. |
7115 | 7291 | test X-lc = "X$arg" && continue |
7116 | 7292 | ;; |
7130 | 7306 | esac |
7131 | 7307 | elif test X-lc_r = "X$arg"; then |
7132 | 7308 | case $host in |
7133 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | |
7309 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) | |
7134 | 7310 | # Do not include libc_r directly, use -pthread flag. |
7135 | 7311 | continue |
7136 | 7312 | ;; |
7160 | 7336 | prev=xcompiler |
7161 | 7337 | continue |
7162 | 7338 | ;; |
7163 | ||
7164 | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ | |
7339 | # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. | |
7340 | -pthread) | |
7341 | case $host in | |
7342 | *solaris2*) ;; | |
7343 | *) | |
7344 | case "$new_inherited_linker_flags " in | |
7345 | *" $arg "*) ;; | |
7346 | * ) func_append new_inherited_linker_flags " $arg" ;; | |
7347 | esac | |
7348 | ;; | |
7349 | esac | |
7350 | continue | |
7351 | ;; | |
7352 | -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ | |
7165 | 7353 | |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
7166 | 7354 | func_append compiler_flags " $arg" |
7167 | 7355 | func_append compile_command " $arg" |
7302 | 7490 | save_ifs=$IFS; IFS=, |
7303 | 7491 | for flag in $args; do |
7304 | 7492 | IFS=$save_ifs |
7305 | func_quote_for_eval "$flag" | |
7306 | func_append arg " $func_quote_for_eval_result" | |
7307 | func_append compiler_flags " $func_quote_for_eval_result" | |
7493 | func_quote_arg pretty "$flag" | |
7494 | func_append arg " $func_quote_arg_result" | |
7495 | func_append compiler_flags " $func_quote_arg_result" | |
7308 | 7496 | done |
7309 | 7497 | IFS=$save_ifs |
7310 | 7498 | func_stripname ' ' '' "$arg" |
7318 | 7506 | save_ifs=$IFS; IFS=, |
7319 | 7507 | for flag in $args; do |
7320 | 7508 | IFS=$save_ifs |
7321 | func_quote_for_eval "$flag" | |
7322 | func_append arg " $wl$func_quote_for_eval_result" | |
7323 | func_append compiler_flags " $wl$func_quote_for_eval_result" | |
7324 | func_append linker_flags " $func_quote_for_eval_result" | |
7509 | func_quote_arg pretty "$flag" | |
7510 | func_append arg " $wl$func_quote_arg_result" | |
7511 | func_append compiler_flags " $wl$func_quote_arg_result" | |
7512 | func_append linker_flags " $func_quote_arg_result" | |
7325 | 7513 | done |
7326 | 7514 | IFS=$save_ifs |
7327 | 7515 | func_stripname ' ' '' "$arg" |
7328 | 7516 | arg=$func_stripname_result |
7329 | 7517 | ;; |
7330 | 7518 | |
7519 | -Xassembler) | |
7520 | prev=xassembler | |
7521 | continue | |
7522 | ;; | |
7523 | ||
7331 | 7524 | -Xcompiler) |
7332 | 7525 | prev=xcompiler |
7333 | 7526 | continue |
7345 | 7538 | |
7346 | 7539 | # -msg_* for osf cc |
7347 | 7540 | -msg_*) |
7348 | func_quote_for_eval "$arg" | |
7349 | arg=$func_quote_for_eval_result | |
7541 | func_quote_arg pretty "$arg" | |
7542 | arg=$func_quote_arg_result | |
7350 | 7543 | ;; |
7351 | 7544 | |
7352 | 7545 | # Flags to be passed through unchanged, with rationale: |
7369 | 7562 | # -fuse-ld=* Linker select flags for GCC |
7370 | 7563 | # -static-* direct GCC to link specific libraries statically |
7371 | 7564 | # -fcilkplus Cilk Plus language extension features for C/C++ |
7565 | # -Wa,* Pass flags directly to the assembler | |
7372 | 7566 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
7373 | 7567 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
7374 | 7568 | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ |
7375 | -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) | |
7376 | func_quote_for_eval "$arg" | |
7377 | arg=$func_quote_for_eval_result | |
7569 | -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*) | |
7570 | func_quote_arg pretty "$arg" | |
7571 | arg=$func_quote_arg_result | |
7378 | 7572 | func_append compile_command " $arg" |
7379 | 7573 | func_append finalize_command " $arg" |
7380 | 7574 | func_append compiler_flags " $arg" |
7395 | 7589 | continue |
7396 | 7590 | else |
7397 | 7591 | # Otherwise treat like 'Some other compiler flag' below |
7398 | func_quote_for_eval "$arg" | |
7399 | arg=$func_quote_for_eval_result | |
7592 | func_quote_arg pretty "$arg" | |
7593 | arg=$func_quote_arg_result | |
7400 | 7594 | fi |
7401 | 7595 | ;; |
7402 | 7596 | |
7403 | 7597 | # Some other compiler flag. |
7404 | 7598 | -* | +*) |
7405 | func_quote_for_eval "$arg" | |
7406 | arg=$func_quote_for_eval_result | |
7599 | func_quote_arg pretty "$arg" | |
7600 | arg=$func_quote_arg_result | |
7407 | 7601 | ;; |
7408 | 7602 | |
7409 | 7603 | *.$objext) |
7523 | 7717 | *) |
7524 | 7718 | # Unknown arguments in both finalize_command and compile_command need |
7525 | 7719 | # to be aesthetically quoted because they are evaled later. |
7526 | func_quote_for_eval "$arg" | |
7527 | arg=$func_quote_for_eval_result | |
7720 | func_quote_arg pretty "$arg" | |
7721 | arg=$func_quote_arg_result | |
7528 | 7722 | ;; |
7529 | 7723 | esac # arg |
7530 | 7724 | |
8732 | 8926 | test CXX = "$tagname" && { |
8733 | 8927 | case $host_os in |
8734 | 8928 | linux*) |
8735 | case `$CC -V 2>&1 | sed 5q` in | |
8929 | case `$CC -V 2>&1 | $SED 5q` in | |
8736 | 8930 | *Sun\ C*) # Sun C++ 5.9 |
8737 | 8931 | func_suncc_cstd_abi |
8738 | 8932 | |
8905 | 9099 | # |
8906 | 9100 | case $version_type in |
8907 | 9101 | # correct linux to gnu/linux during the next big refactor |
8908 | darwin|freebsd-elf|linux|osf|windows|none) | |
9102 | darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) | |
8909 | 9103 | func_arith $number_major + $number_minor |
8910 | 9104 | current=$func_arith_result |
8911 | 9105 | age=$number_minor |
8999 | 9193 | versuffix=.$current.$revision |
9000 | 9194 | ;; |
9001 | 9195 | |
9002 | freebsd-elf) | |
9196 | freebsd-elf | midnightbsd-elf) | |
9003 | 9197 | func_arith $current - $age |
9004 | 9198 | major=.$func_arith_result |
9005 | 9199 | versuffix=$major.$age.$revision |
9225 | 9419 | *-*-netbsd*) |
9226 | 9420 | # Don't link with libc until the a.out ld.so is fixed. |
9227 | 9421 | ;; |
9228 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | |
9422 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) | |
9229 | 9423 | # Do not include libc due to us having libc/libc_r. |
9230 | 9424 | ;; |
9231 | 9425 | *-*-sco3.2v5* | *-*-sco5v6*) |
10036 | 10230 | for cmd in $concat_cmds; do |
10037 | 10231 | IFS=$save_ifs |
10038 | 10232 | $opt_quiet || { |
10039 | func_quote_for_expand "$cmd" | |
10040 | eval "func_echo $func_quote_for_expand_result" | |
10233 | func_quote_arg expand,pretty "$cmd" | |
10234 | eval "func_echo $func_quote_arg_result" | |
10041 | 10235 | } |
10042 | 10236 | $opt_dry_run || eval "$cmd" || { |
10043 | 10237 | lt_exit=$? |
10130 | 10324 | eval cmd=\"$cmd\" |
10131 | 10325 | IFS=$save_ifs |
10132 | 10326 | $opt_quiet || { |
10133 | func_quote_for_expand "$cmd" | |
10134 | eval "func_echo $func_quote_for_expand_result" | |
10327 | func_quote_arg expand,pretty "$cmd" | |
10328 | eval "func_echo $func_quote_arg_result" | |
10135 | 10329 | } |
10136 | 10330 | $opt_dry_run || eval "$cmd" || { |
10137 | 10331 | lt_exit=$? |
10605 | 10799 | elif eval var_value=\$$var; test -z "$var_value"; then |
10606 | 10800 | relink_command="$var=; export $var; $relink_command" |
10607 | 10801 | else |
10608 | func_quote_for_eval "$var_value" | |
10609 | relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
10802 | func_quote_arg pretty "$var_value" | |
10803 | relink_command="$var=$func_quote_arg_result; export $var; $relink_command" | |
10610 | 10804 | fi |
10611 | 10805 | done |
10612 | relink_command="(cd `pwd`; $relink_command)" | |
10613 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
10806 | func_quote eval cd "`pwd`" | |
10807 | func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" | |
10808 | relink_command=$func_quote_arg_unquoted_result | |
10614 | 10809 | fi |
10615 | 10810 | |
10616 | 10811 | # Only actually do things if not in dry run mode. |
10850 | 11045 | elif eval var_value=\$$var; test -z "$var_value"; then |
10851 | 11046 | relink_command="$var=; export $var; $relink_command" |
10852 | 11047 | else |
10853 | func_quote_for_eval "$var_value" | |
10854 | relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
11048 | func_quote_arg pretty,unquoted "$var_value" | |
11049 | relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" | |
10855 | 11050 | fi |
10856 | 11051 | done |
10857 | 11052 | # Quote the link command for shipping. |
10858 | relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | |
10859 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
11053 | func_quote eval cd "`pwd`" | |
11054 | relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | |
11055 | func_quote_arg pretty,unquoted "$relink_command" | |
11056 | relink_command=$func_quote_arg_unquoted_result | |
10860 | 11057 | if test yes = "$hardcode_automatic"; then |
10861 | 11058 | relink_command= |
10862 | 11059 | fi |
208 | 208 | ETAGS = @ETAGS@ |
209 | 209 | EXEEXT = @EXEEXT@ |
210 | 210 | FGREP = @FGREP@ |
211 | FILECMD = @FILECMD@ | |
211 | 212 | GREP = @GREP@ |
212 | 213 | GTK_CONFIG = @GTK_CONFIG@ |
213 | 214 | INSTALL = @INSTALL@ |
248 | 248 | ETAGS = @ETAGS@ |
249 | 249 | EXEEXT = @EXEEXT@ |
250 | 250 | FGREP = @FGREP@ |
251 | FILECMD = @FILECMD@ | |
251 | 252 | GREP = @GREP@ |
252 | 253 | GTK_CONFIG = @GTK_CONFIG@ |
253 | 254 | INSTALL = @INSTALL@ |