1225
1091
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1226
1092
AC_MSG_RESULT([$hard_links])
1227
1093
if test "$hard_links" = no; then
1228
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1094
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1229
1095
need_locks=warn
1235
if test "$GCC" = yes; then
1236
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1237
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1238
echo "int some_variable = 0;" > conftest.$ac_ext
1239
save_CFLAGS="$CFLAGS"
1240
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1241
compiler_rtti_exceptions=no
1242
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1243
# The compiler can only warn and ignore the option if not recognized
1244
# So say no if there are warnings
1245
if test -s conftest.err; then
1246
compiler_rtti_exceptions=no
1248
compiler_rtti_exceptions=yes
1251
CFLAGS="$save_CFLAGS"
1252
AC_MSG_RESULT([$compiler_rtti_exceptions])
1254
if test "$compiler_rtti_exceptions" = "yes"; then
1255
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1257
no_builtin_flag=' -fno-builtin'
1261
# See if the linker supports building shared libraries.
1262
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1264
allow_undefined_flag=
1266
need_lib_prefix=unknown
1267
need_version=unknown
1268
# when you set need_version to no, make sure it does not cause -set_version
1269
# flags to be left without arguments
1271
archive_expsym_cmds=
1272
old_archive_from_new_cmds=
1273
old_archive_from_expsyms_cmds=
1274
export_dynamic_flag_spec=
1275
whole_archive_flag_spec=
1276
thread_safe_flag_spec=
1277
hardcode_into_libs=no
1278
hardcode_libdir_flag_spec=
1279
hardcode_libdir_separator=
1282
hardcode_shlibpath_var=unsupported
1284
link_all_deplibs=unknown
1285
always_export_symbols=no
1286
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1287
# include_expsyms should be a list of space-separated symbols to be *always*
1288
# included in the symbol list
1290
# exclude_expsyms can be an egrep regular expression of symbols to exclude
1291
# it will be wrapped by ` (' and `)$', so one must not match beginning or
1292
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1293
# as well as any symbol that contains `d'.
1294
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1295
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1296
# platforms (ab)use it in PIC code, but their linkers get confused if
1297
# the symbol is explicitly referenced. Since portable code cannot
1298
# rely on this symbol name, it's probably fine to never include it in
1299
# preloaded symbol tables.
1300
extract_expsyms_cmds=
1303
cygwin* | mingw* | pw32*)
1304
# FIXME: the MSVC++ port hasn't been tested in a loooong time
1305
# When not using gcc, we currently assume that we are using
1306
# Microsoft Visual C++.
1307
if test "$GCC" != yes; then
1317
if test "$with_gnu_ld" = yes; then
1318
# If archive_cmds runs LD, not CC, wlarc should be empty
1321
# See if GNU ld supports shared libraries.
1323
aix3* | aix4* | aix5*)
1324
# On AIX, the GNU linker is very broken
1325
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1329
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1330
*** to be unable to reliably create shared libraries on AIX.
1331
*** Therefore, libtool is disabling shared libraries support. If you
1332
*** really care for shared libraries, you may want to modify your PATH
1333
*** so that a non-GNU linker is found, and then restart.
1339
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1340
hardcode_libdir_flag_spec='-L$libdir'
1341
hardcode_minus_L=yes
1343
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1344
# that the semantics of dynamic libraries on AmigaOS, at least up
1345
# to version 4, is to share data among multiple programs linked
1346
# with the same dynamic library. Since this doesn't match the
1347
# behavior of shared libraries on other platforms, we can use
1353
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1354
allow_undefined_flag=unsupported
1355
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1356
# support --undefined. This deserves some investigation. FIXME
1357
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1363
cygwin* | mingw* | pw32*)
1364
# hardcode_libdir_flag_spec is actually meaningless, as there is
1365
# no search path for DLLs.
1366
hardcode_libdir_flag_spec='-L$libdir'
1367
allow_undefined_flag=unsupported
1368
always_export_symbols=yes
1370
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1371
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1372
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1373
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1374
else $CC -o impgen impgen.c ; fi)~
1375
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1377
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1379
# cygwin and mingw dlls have different entry points and sets of symbols
1381
# FIXME: what about values for MSVC?
1382
dll_entry=__cygwin_dll_entry@12
1383
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1387
dll_entry=_DllMainCRTStartup@12
1388
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1392
# mingw and cygwin differ, and it's simplest to just exclude the union
1393
# of the two symbol sets.
1394
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1396
# recent cygwin and mingw systems supply a stub DllMain which the user
1397
# can override, but on older systems we have to supply one (in ltdll.c)
1398
if test "x$lt_cv_need_dllmain" = "xyes"; then
1399
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1400
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1401
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1407
# Extract the symbol export list from an `--export-all' def file,
1408
# then regenerate the def file from the symbol export list, so that
1409
# the compiled dll only exports the symbol export list.
1410
# Be careful not to strip the DATA tag left be newer dlltools.
1411
export_symbols_cmds="$ltdll_cmds"'
1412
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1413
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1415
# If the export-symbols file already is a .def file (1st line
1416
# is EXPORTS), use it as is.
1417
# If DATA tags from a recent dlltool are present, honour them!
1418
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1419
cp $export_symbols $output_objdir/$soname-def;
1421
echo EXPORTS > $output_objdir/$soname-def;
1423
cat $export_symbols | while read symbol; do
1426
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1427
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1428
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1430
_lt_hint=`expr 1 + \$_lt_hint`;
1434
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1435
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1436
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1437
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1438
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1442
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1443
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1446
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1447
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1452
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1456
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1457
*** create shared libraries on Solaris systems. Therefore, libtool
1458
*** is disabling shared libraries support. We urge you to upgrade GNU
1459
*** binutils to release 2.9.1 or newer. Another option is to modify
1460
*** your PATH or compiler configuration so that the native linker is
1461
*** used, and then restart.
1464
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1465
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1466
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1473
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1476
hardcode_shlibpath_var=no
1480
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1481
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1482
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1489
if test "$ld_shlibs" = yes; then
1490
runpath_var=LD_RUN_PATH
1491
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1492
export_dynamic_flag_spec='${wl}--export-dynamic'
1494
cygwin* | mingw* | pw32*)
1495
# dlltool doesn't understand --whole-archive et. al.
1496
whole_archive_flag_spec=
1499
# ancient GNU ld didn't support --whole-archive et. al.
1500
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1501
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1503
whole_archive_flag_spec=
1100
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1105
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1106
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107
[rm -f .libs 2>/dev/null
1108
mkdir .libs 2>/dev/null
1109
if test -d .libs; then
1509
# PORTME fill in a description of your system's linker (not GNU ld)
1512
allow_undefined_flag=unsupported
1513
always_export_symbols=yes
1514
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1515
# Note: this linker hardcodes the directories in LIBPATH if there
1516
# are no directories specified by -L.
1517
hardcode_minus_L=yes
1518
if test "$GCC" = yes && test -z "$link_static_flag"; then
1519
# Neither direct hardcoding nor static linking is supported with a
1521
hardcode_direct=unsupported
1526
if test "$host_cpu" = ia64; then
1527
# On IA64, the linker does run time linking by default, so we don't
1528
# have to do anything special.
1529
aix_use_runtimelinking=no
1530
exp_sym_flag='-Bexport'
1533
aix_use_runtimelinking=no
1535
# Test if we are trying to use run time linking or normal
1536
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
1537
# need to do runtime linking.
1538
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1539
for ld_flag in $LDFLAGS; do
1542
aix_use_runtimelinking=yes
1549
exp_sym_flag='-bexport'
1550
no_entry_flag='-bnoentry'
1553
# When large executables or shared objects are built, AIX ld can
1554
# have problems creating the table of contents. If linking a library
1555
# or program results in "error TOC overflow" add -mminimal-toc to
1556
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1557
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1561
hardcode_libdir_separator=':'
1562
if test "$GCC" = yes; then
1563
case $host_os in aix4.[[012]]|aix4.[[012]].*)
1564
collect2name=`${CC} -print-prog-name=collect2`
1565
if test -f "$collect2name" && \
1566
strings "$collect2name" | grep resolve_lib_name >/dev/null
1568
# We have reworked collect2
1571
# We have old collect2
1572
hardcode_direct=unsupported
1573
# It fails to find uninstalled libraries when the uninstalled
1574
# path is not listed in the libpath. Setting hardcode_minus_L
1575
# to unsupported forces relinking
1576
hardcode_minus_L=yes
1577
hardcode_libdir_flag_spec='-L$libdir'
1578
hardcode_libdir_separator=
1582
shared_flag='-shared'
1585
if test "$host_cpu" = ia64; then
1586
shared_flag='${wl}-G'
1588
if test "$aix_use_runtimelinking" = yes; then
1589
shared_flag='${wl}-G'
1591
shared_flag='${wl}-bM:SRE'
1596
# It seems that -bexpall can do strange things, so it is better to
1597
# generate a list of symbols to export.
1598
always_export_symbols=yes
1599
if test "$aix_use_runtimelinking" = yes; then
1600
# Warning - without using the other runtime loading flags (-brtl),
1601
# -berok will link without error, but may produce a broken library.
1602
allow_undefined_flag='-berok'
1603
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1604
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1606
if test "$host_cpu" = ia64; then
1607
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1608
allow_undefined_flag="-z nodefs"
1609
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1611
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1612
# Warning - without using the other run time loading flags,
1613
# -berok will link without error, but may produce a broken library.
1614
allow_undefined_flag='${wl}-berok'
1615
# This is a bit strange, but is similar to how AIX traditionally builds
1616
# it's shared libraries.
1617
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname'
1623
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1624
hardcode_libdir_flag_spec='-L$libdir'
1625
hardcode_minus_L=yes
1626
# see comment about different semantics on the GNU ld section
1630
cygwin* | mingw* | pw32*)
1631
# When not using gcc, we currently assume that we are using
1632
# Microsoft Visual C++.
1633
# hardcode_libdir_flag_spec is actually meaningless, as there is
1634
# no search path for DLLs.
1635
hardcode_libdir_flag_spec=' '
1636
allow_undefined_flag=unsupported
1637
# Tell ltmain to make .lib files, not .a files.
1639
# FIXME: Setting linknames here is a bad hack.
1640
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1641
# The linker will automatically build a .lib file if we build a DLL.
1642
old_archive_from_new_cmds='true'
1643
# FIXME: Should let the user specify the lib program.
1644
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1645
fix_srcfile_path='`cygpath -w "$srcfile"`'
1648
darwin* | rhapsody*)
1650
rhapsody* | darwin1.[[012]])
1651
allow_undefined_flag='-undefined suppress'
1654
allow_undefined_flag='-flat_namespace -undefined suppress'
1657
# FIXME: Relying on posixy $() will cause problems for
1658
# cross-compilation, but unfortunately the echo tests do not
1659
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
1660
# `"' quotes if we put them in here... so don't!
1661
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
1662
# We need to add '_' to the symbols in $export_symbols first
1663
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1665
hardcode_shlibpath_var=no
1666
whole_archive_flag_spec='-all_load $convenience'
1673
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1674
# support. Future versions do this automatically, but an explicit c++rt0.o
1675
# does not break anything, and helps significantly (at the cost of a little
1678
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1679
hardcode_libdir_flag_spec='-R$libdir'
1681
hardcode_shlibpath_var=no
1684
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
1686
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1688
hardcode_minus_L=yes
1689
hardcode_shlibpath_var=no
1692
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1694
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1695
hardcode_libdir_flag_spec='-R$libdir'
1697
hardcode_shlibpath_var=no
1700
hpux9* | hpux10* | hpux11*)
1702
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
1703
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1705
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1706
hardcode_libdir_separator=:
1708
hardcode_minus_L=yes # Not in the search PATH, but as the default
1709
# location of the library.
1710
export_dynamic_flag_spec='${wl}-E'
1713
irix5* | irix6* | nonstopux*)
1714
if test "$GCC" = yes; then
1715
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1716
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1718
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1719
hardcode_libdir_flag_spec='-rpath $libdir'
1721
hardcode_libdir_separator=:
1722
link_all_deplibs=yes
1726
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1727
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1729
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1731
hardcode_libdir_flag_spec='-R$libdir'
1733
hardcode_shlibpath_var=no
1737
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1739
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1740
hardcode_libdir_separator=:
1741
hardcode_shlibpath_var=no
1746
hardcode_shlibpath_var=no
1747
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1748
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1749
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1750
export_dynamic_flag_spec='${wl}-E'
1753
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1754
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1755
hardcode_libdir_flag_spec='-R$libdir'
1758
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1759
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1766
hardcode_libdir_flag_spec='-L$libdir'
1767
hardcode_minus_L=yes
1768
allow_undefined_flag=unsupported
1769
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
1770
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1774
if test "$GCC" = yes; then
1775
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1776
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1778
allow_undefined_flag=' -expect_unresolved \*'
1779
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1781
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1782
hardcode_libdir_separator=:
1785
osf4* | osf5*) # as osf3* with the addition of -msym flag
1786
if test "$GCC" = yes; then
1787
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1788
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1789
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1791
allow_undefined_flag=' -expect_unresolved \*'
1792
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1793
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1794
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
1796
#Both c and cxx compiler support -rpath directly
1797
hardcode_libdir_flag_spec='-rpath $libdir'
1799
hardcode_libdir_separator=:
1803
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1804
hardcode_shlibpath_var=no
1805
runpath_var=LD_RUN_PATH
1806
hardcode_runpath_var=yes
1807
export_dynamic_flag_spec='${wl}-Bexport'
1811
# gcc --version < 3.0 without binutils cannot create self contained
1812
# shared libraries reliably, requiring libgcc.a to resolve some of
1813
# the object symbols generated in some cases. Libraries that use
1814
# assert need libgcc.a to resolve __eprintf, for example. Linking
1815
# a copy of libgcc.a into every shared library to guarantee resolving
1816
# such symbols causes other problems: According to Tim Van Holder
1817
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
1818
# (to the application) exception stack for one thing.
1819
no_undefined_flag=' -z defs'
1820
if test "$GCC" = yes; then
1821
case `$CC --version 2>/dev/null` in
1825
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
1826
*** create self contained shared libraries on Solaris systems, without
1827
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
1828
*** -no-undefined support, which will at least allow you to build shared
1829
*** libraries. However, you may find that when you link such libraries
1830
*** into an application without using GCC, you have to manually add
1831
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
1832
*** upgrade to a newer version of GCC. Another option is to rebuild your
1833
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
1840
# $CC -shared without GNU ld will not create a library from C++
1841
# object files and a static libstdc++, better avoid it by now
1842
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1843
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1844
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1845
hardcode_libdir_flag_spec='-R$libdir'
1846
hardcode_shlibpath_var=no
1848
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1849
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
1850
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1852
link_all_deplibs=yes
1856
if test "x$host_vendor" = xsequent; then
1857
# Use $CC to link under sequent, because it throws in some extra .o
1858
# files that make .init and .fini sections work.
1859
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1861
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1863
hardcode_libdir_flag_spec='-L$libdir'
1865
hardcode_minus_L=yes
1866
hardcode_shlibpath_var=no
1870
case $host_vendor in
1872
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1873
hardcode_direct=yes # is this really true???
1876
## LD is ld it makes a PLAMLIB
1877
## CC just makes a GrossModule.
1878
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1879
reload_cmds='$CC -r -o $output$reload_objs'
1883
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1884
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1887
runpath_var='LD_RUN_PATH'
1888
hardcode_shlibpath_var=no
1892
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1893
hardcode_shlibpath_var=no
1894
export_dynamic_flag_spec='-Bexport'
1898
no_undefined_flag=' -z text'
1899
# $CC -shared without GNU ld will not create a library from C++
1900
# object files and a static libstdc++, better avoid it by now
1901
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1902
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1903
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1904
hardcode_libdir_flag_spec=
1905
hardcode_shlibpath_var=no
1906
runpath_var='LD_RUN_PATH'
1910
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1911
hardcode_libdir_flag_spec='-L$libdir'
1912
hardcode_shlibpath_var=no
1916
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1917
hardcode_libdir_flag_spec='-L$libdir'
1918
hardcode_shlibpath_var=no
1922
if test -d /usr/nec; then
1923
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1924
hardcode_shlibpath_var=no
1925
runpath_var=LD_RUN_PATH
1926
hardcode_runpath_var=yes
1932
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1935
hardcode_shlibpath_var=no
1936
hardcode_runpath_var=yes
1937
runpath_var=LD_RUN_PATH
1940
sysv5uw7* | unixware7*)
1941
no_undefined_flag='${wl}-z ${wl}text'
1942
if test "$GCC" = yes; then
1943
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1945
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1947
runpath_var='LD_RUN_PATH'
1948
hardcode_shlibpath_var=no
1112
# MS-DOS does not allow filenames that begin with a dot.
1956
AC_MSG_RESULT([$ld_shlibs])
1957
test "$ld_shlibs" = no && can_build_shared=no
1115
rmdir .libs 2>/dev/null])
1116
objdir=$lt_cv_objdir
1117
])# AC_LIBTOOL_OBJDIR
1120
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121
# ----------------------------------------------
1959
1122
# Check hardcoding attributes.
1960
AC_MSG_CHECKING([how to hardcode library paths into programs])
1962
if test -n "$hardcode_libdir_flag_spec" || \
1963
test -n "$runpath_var"; then
1123
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1125
_LT_AC_TAGVAR(hardcode_action, $1)=
1126
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1965
1130
# We can hardcode non-existant directories.
1966
if test "$hardcode_direct" != no &&
1131
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1967
1132
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1968
1133
# have to relink, otherwise we might link with an installed library
1969
1134
# when we should be linking with a yet-to-be-installed one
1970
## test "$hardcode_shlibpath_var" != no &&
1971
test "$hardcode_minus_L" != no; then
1135
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1972
1137
# Linking always hardcodes the temporary library directory.
1973
hardcode_action=relink
1138
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1975
1140
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1976
hardcode_action=immediate
1141
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1979
1144
# We cannot hardcode anything, or else we can only hardcode existing
1981
hardcode_action=unsupported
1983
AC_MSG_RESULT([$hardcode_action])
1146
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1148
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1150
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151
# Fast installation is not supported
1152
enable_fast_install=no
1153
elif test "$shlibpath_overrides_runpath" = yes ||
1154
test "$enable_shared" = no; then
1155
# Fast installation is not necessary
1156
enable_fast_install=needless
1158
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1161
# AC_LIBTOOL_SYS_LIB_STRIP
1162
# ------------------------
1163
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1987
1166
AC_MSG_CHECKING([whether stripping libraries is possible])
1988
1167
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2428
1781
AC_MSG_RESULT([$dynamic_linker])
2429
1782
test "$dynamic_linker" = no && can_build_shared=no
2431
# Report the final consequences.
2432
AC_MSG_CHECKING([if libtool supports shared libraries])
2433
AC_MSG_RESULT([$can_build_shared])
2435
AC_MSG_CHECKING([whether to build shared libraries])
2436
test "$can_build_shared" = "no" && enable_shared=no
2438
# On AIX, shared libraries and static libraries use the same namespace, and
2439
# are all built from PIC.
2442
test "$enable_shared" = yes && enable_static=no
2443
if test -n "$RANLIB"; then
2444
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2445
postinstall_cmds='$RANLIB $lib'
2450
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2451
test "$enable_shared" = yes && enable_static=no
2455
AC_MSG_RESULT([$enable_shared])
2457
AC_MSG_CHECKING([whether to build static libraries])
2458
# Make sure either enable_shared or enable_static is yes.
2459
test "$enable_shared" = yes || enable_static=yes
2460
AC_MSG_RESULT([$enable_static])
2462
if test "$hardcode_action" = relink; then
2463
# Fast installation is not supported
2464
enable_fast_install=no
2465
elif test "$shlibpath_overrides_runpath" = yes ||
2466
test "$enable_shared" = no; then
2467
# Fast installation is not necessary
2468
enable_fast_install=needless
2471
1784
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2472
1785
if test "$GCC" = yes; then
2473
1786
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1788
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1793
AC_DEFUN([_LT_AC_TAGCONFIG],
1794
[AC_ARG_WITH([tags],
1795
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1796
[include additional configurations @<:@automatic@:>@])],
1797
[tagnames="$withval"])
1799
if test -f "$ltmain" && test -n "$tagnames"; then
1800
if test ! -f "${ofile}"; then
1801
AC_MSG_WARN([output file `$ofile' does not exist])
1804
if test -z "$LTCC"; then
1805
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1806
if test -z "$LTCC"; then
1807
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1809
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1812
if test -z "$LTCFLAGS"; then
1813
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1816
# Extract list of available tagged configurations in $ofile.
1817
# Note that this assumes the entire list is on one line.
1818
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1820
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1821
for tagname in $tagnames; do
1823
# Check whether tagname contains only valid characters
1824
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1826
*) AC_MSG_ERROR([invalid tag name: $tagname])
1830
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1832
AC_MSG_ERROR([tag name \"$tagname\" already exists])
1835
# Update the list of available tags.
1836
if test -n "$tagname"; then
1837
echo appending configuration tag \"$tagname\" to $ofile
1841
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1842
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1843
(test "X$CXX" != "Xg++"))) ; then
1844
AC_LIBTOOL_LANG_CXX_CONFIG
1851
if test -n "$F77" && test "X$F77" != "Xno"; then
1852
AC_LIBTOOL_LANG_F77_CONFIG
1859
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1860
AC_LIBTOOL_LANG_GCJ_CONFIG
1867
AC_LIBTOOL_LANG_RC_CONFIG
1871
AC_MSG_ERROR([Unsupported tag name: $tagname])
1875
# Append the new tag name to the list of available tags.
1876
if test -n "$tagname" ; then
1877
available_tags="$available_tags $tagname"
1883
# Now substitute the updated list of available tags.
1884
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1885
mv "${ofile}T" "$ofile"
1889
AC_MSG_ERROR([unable to update list of available tagged configurations.])
1892
])# _LT_AC_TAGCONFIG
1897
# enable checks for dlopen support
1898
AC_DEFUN([AC_LIBTOOL_DLOPEN],
1899
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1900
])# AC_LIBTOOL_DLOPEN
1903
# AC_LIBTOOL_WIN32_DLL
1904
# --------------------
1905
# declare package support for building win32 DLLs
1906
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1907
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1908
])# AC_LIBTOOL_WIN32_DLL
1911
# AC_ENABLE_SHARED([DEFAULT])
1912
# ---------------------------
1913
# implement the --enable-shared flag
1914
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1915
AC_DEFUN([AC_ENABLE_SHARED],
1916
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1917
AC_ARG_ENABLE([shared],
1918
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1919
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1920
[p=${PACKAGE-default}
1922
yes) enable_shared=yes ;;
1923
no) enable_shared=no ;;
1926
# Look at the argument we got. We use all the common list separators.
1927
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1928
for pkg in $enableval; do
1930
if test "X$pkg" = "X$p"; then
1937
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1938
])# AC_ENABLE_SHARED
1943
# set the default shared flag to --disable-shared
1944
AC_DEFUN([AC_DISABLE_SHARED],
1945
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1946
AC_ENABLE_SHARED(no)
1947
])# AC_DISABLE_SHARED
1950
# AC_ENABLE_STATIC([DEFAULT])
1951
# ---------------------------
1952
# implement the --enable-static flag
1953
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1954
AC_DEFUN([AC_ENABLE_STATIC],
1955
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1956
AC_ARG_ENABLE([static],
1957
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1958
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1959
[p=${PACKAGE-default}
1961
yes) enable_static=yes ;;
1962
no) enable_static=no ;;
1965
# Look at the argument we got. We use all the common list separators.
1966
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1967
for pkg in $enableval; do
1969
if test "X$pkg" = "X$p"; then
1976
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
1977
])# AC_ENABLE_STATIC
1982
# set the default static flag to --disable-static
1983
AC_DEFUN([AC_DISABLE_STATIC],
1984
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1985
AC_ENABLE_STATIC(no)
1986
])# AC_DISABLE_STATIC
1989
# AC_ENABLE_FAST_INSTALL([DEFAULT])
1990
# ---------------------------------
1991
# implement the --enable-fast-install flag
1992
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1993
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1994
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1995
AC_ARG_ENABLE([fast-install],
1996
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1997
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1998
[p=${PACKAGE-default}
2000
yes) enable_fast_install=yes ;;
2001
no) enable_fast_install=no ;;
2003
enable_fast_install=no
2004
# Look at the argument we got. We use all the common list separators.
2005
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2006
for pkg in $enableval; do
2008
if test "X$pkg" = "X$p"; then
2009
enable_fast_install=yes
2015
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2016
])# AC_ENABLE_FAST_INSTALL
2019
# AC_DISABLE_FAST_INSTALL
2020
# -----------------------
2021
# set the default to --disable-fast-install
2022
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2023
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2024
AC_ENABLE_FAST_INSTALL(no)
2025
])# AC_DISABLE_FAST_INSTALL
2028
# AC_LIBTOOL_PICMODE([MODE])
2029
# --------------------------
2030
# implement the --with-pic flag
2031
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2032
AC_DEFUN([AC_LIBTOOL_PICMODE],
2033
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2034
pic_mode=ifelse($#,1,$1,default)
2035
])# AC_LIBTOOL_PICMODE
2040
# This is predefined starting with Autoconf 2.54, so this conditional
2041
# definition can be removed once we require Autoconf 2.54 or later.
2042
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2043
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2044
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2045
then ac_cv_prog_egrep='grep -E'
2046
else ac_cv_prog_egrep='egrep'
2048
EGREP=$ac_cv_prog_egrep
2053
# AC_PATH_TOOL_PREFIX
2054
# -------------------
2055
# find a file program which can recognise shared library
2056
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2057
[AC_REQUIRE([AC_PROG_EGREP])dnl
2058
AC_MSG_CHECKING([for $1])
2059
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2061
[[\\/*] | ?:[\\/]*])
2062
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2065
lt_save_MAGIC_CMD="$MAGIC_CMD"
2066
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2067
dnl $ac_dummy forces splitting on constant user-supplied paths.
2068
dnl POSIX.2 word splitting is done only on the output of word expansions,
2069
dnl not every word. This closes a longstanding sh security hole.
2070
ac_dummy="ifelse([$2], , $PATH, [$2])"
2071
for ac_dir in $ac_dummy; do
2073
test -z "$ac_dir" && ac_dir=.
2074
if test -f $ac_dir/$1; then
2075
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2076
if test -n "$file_magic_test_file"; then
2077
case $deplibs_check_method in
2079
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2080
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2081
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2082
$EGREP "$file_magic_regex" > /dev/null; then
2087
*** Warning: the command libtool uses to detect shared libraries,
2088
*** $file_magic_cmd, produces output that libtool cannot recognize.
2089
*** The result is that libtool may fail to recognize shared libraries
2090
*** as such. This will affect the creation of libtool libraries that
2091
*** depend on shared libraries, but programs linked with such libtool
2092
*** libraries will work regardless of this problem. Nevertheless, you
2093
*** may want to report the problem to your system manager and/or to
2094
*** bug-libtool@gnu.org
2104
MAGIC_CMD="$lt_save_MAGIC_CMD"
2107
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2108
if test -n "$MAGIC_CMD"; then
2109
AC_MSG_RESULT($MAGIC_CMD)
2113
])# AC_PATH_TOOL_PREFIX
2118
# find a file program which can recognise a shared library
2119
AC_DEFUN([AC_PATH_MAGIC],
2120
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2121
if test -z "$lt_cv_path_MAGIC_CMD"; then
2122
if test -n "$ac_tool_prefix"; then
2123
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2133
# find the pathname to the GNU or non-GNU linker
2134
AC_DEFUN([AC_PROG_LD],
2135
[AC_ARG_WITH([gnu-ld],
2136
[AC_HELP_STRING([--with-gnu-ld],
2137
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2138
[test "$withval" = no || with_gnu_ld=yes],
2140
AC_REQUIRE([LT_AC_PROG_SED])dnl
2141
AC_REQUIRE([AC_PROG_CC])dnl
2142
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2143
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2145
if test "$GCC" = yes; then
2146
# Check if gcc -print-prog-name=ld gives a path.
2147
AC_MSG_CHECKING([for ld used by $CC])
2150
# gcc leaves a trailing carriage return which upsets mingw
2151
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2153
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2156
# Accept absolute paths.
2157
[[\\/]]* | ?:[[\\/]]*)
2158
re_direlt='/[[^/]][[^/]]*/\.\./'
2159
# Canonicalize the pathname of ld
2160
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2161
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2162
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2164
test -z "$LD" && LD="$ac_prog"
2167
# If it fails, then pretend we aren't using GCC.
2171
# If it is relative, then search for the first ld in PATH.
2175
elif test "$with_gnu_ld" = yes; then
2176
AC_MSG_CHECKING([for GNU ld])
2178
AC_MSG_CHECKING([for non-GNU ld])
2180
AC_CACHE_VAL(lt_cv_path_LD,
2181
[if test -z "$LD"; then
2182
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2183
for ac_dir in $PATH; do
2185
test -z "$ac_dir" && ac_dir=.
2186
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2187
lt_cv_path_LD="$ac_dir/$ac_prog"
2188
# Check to see if the program is GNU ld. I'd rather use --version,
2189
# but apparently some variants of GNU ld only accept -v.
2190
# Break only if it was the GNU/non-GNU ld that we prefer.
2191
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2192
*GNU* | *'with BFD'*)
2193
test "$with_gnu_ld" != no && break
2196
test "$with_gnu_ld" != yes && break
2203
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2206
if test -n "$LD"; then
2211
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2218
AC_DEFUN([AC_PROG_LD_GNU],
2219
[AC_REQUIRE([AC_PROG_EGREP])dnl
2220
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2221
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2222
case `$LD -v 2>&1 </dev/null` in
2223
*GNU* | *'with BFD'*)
2224
lt_cv_prog_gnu_ld=yes
2227
lt_cv_prog_gnu_ld=no
2230
with_gnu_ld=$lt_cv_prog_gnu_ld
2234
# AC_PROG_LD_RELOAD_FLAG
2235
# ----------------------
2236
# find reload flag for linker
2237
# -- PORTME Some linkers may need a different reload flag.
2238
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2239
[AC_CACHE_CHECK([for $LD option to reload object files],
2240
lt_cv_ld_reload_flag,
2241
[lt_cv_ld_reload_flag='-r'])
2242
reload_flag=$lt_cv_ld_reload_flag
2243
case $reload_flag in
2245
*) reload_flag=" $reload_flag" ;;
2247
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2250
if test "$GCC" = yes; then
2251
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2253
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2257
])# AC_PROG_LD_RELOAD_FLAG
2260
# AC_DEPLIBS_CHECK_METHOD
2261
# -----------------------
2262
# how to check for library dependencies
2263
# -- PORTME fill in with the dynamic library characteristics
2264
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2265
[AC_CACHE_CHECK([how to recognise dependent libraries],
2266
lt_cv_deplibs_check_method,
2267
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2268
lt_cv_file_magic_test_file=
2269
lt_cv_deplibs_check_method='unknown'
2270
# Need to set the preceding variable on all platforms that support
2271
# interlibrary dependencies.
2272
# 'none' -- dependencies not supported.
2273
# `unknown' -- same as none, but documents that we really don't know.
2274
# 'pass_all' -- all dependencies passed with no checks.
2275
# 'test_compile' -- check by making test program.
2276
# 'file_magic [[regex]]' -- check by looking for files in library path
2277
# which responds to the $file_magic_cmd with a given extended regex.
2278
# If you have `file' or equivalent on your system and you're not sure
2279
# whether `pass_all' will *always* work, you probably want this one.
2283
lt_cv_deplibs_check_method=pass_all
2287
lt_cv_deplibs_check_method=pass_all
2291
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2292
lt_cv_file_magic_cmd='/usr/bin/file -L'
2293
lt_cv_file_magic_test_file=/shlib/libc.so
2297
# func_win32_libid is a shell function defined in ltmain.sh
2298
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2299
lt_cv_file_magic_cmd='func_win32_libid'
2303
# Base MSYS/MinGW do not provide the 'file' command needed by
2304
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2305
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2306
lt_cv_file_magic_cmd='$OBJDUMP -f'
2309
darwin* | rhapsody*)
2310
lt_cv_deplibs_check_method=pass_all
2313
freebsd* | kfreebsd*-gnu | dragonfly*)
2314
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2317
# Not sure whether the presence of OpenBSD here was a mistake.
2318
# Let's accept both of them until this is cleared up.
2319
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2320
lt_cv_file_magic_cmd=/usr/bin/file
2321
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2325
lt_cv_deplibs_check_method=pass_all
2330
lt_cv_deplibs_check_method=pass_all
2333
hpux10.20* | hpux11*)
2334
lt_cv_file_magic_cmd=/usr/bin/file
2337
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2338
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2341
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2342
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2345
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2346
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2352
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2353
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2356
irix5* | irix6* | nonstopux*)
2358
*-32|*"-32 ") libmagic=32-bit;;
2359
*-n32|*"-n32 ") libmagic=N32;;
2360
*-64|*"-64 ") libmagic=64-bit;;
2361
*) libmagic=never-match;;
2363
lt_cv_deplibs_check_method=pass_all
2366
# This must be Linux ELF.
2368
lt_cv_deplibs_check_method=pass_all
2372
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2373
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2375
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2380
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2381
lt_cv_file_magic_cmd=/usr/bin/file
2382
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2386
lt_cv_deplibs_check_method=unknown
2390
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2391
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2393
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2397
osf3* | osf4* | osf5*)
2398
lt_cv_deplibs_check_method=pass_all
2402
lt_cv_deplibs_check_method=pass_all
2406
case $host_vendor in
2408
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
2409
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2412
lt_cv_deplibs_check_method=pass_all
2415
lt_cv_file_magic_cmd='/bin/file'
2416
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2419
lt_cv_file_magic_cmd='/bin/file'
2420
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2421
lt_cv_file_magic_test_file=/lib/libc.so
2424
lt_cv_deplibs_check_method=pass_all
2427
lt_cv_deplibs_check_method=pass_all
2432
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2433
lt_cv_deplibs_check_method=pass_all
2437
file_magic_cmd=$lt_cv_file_magic_cmd
2438
deplibs_check_method=$lt_cv_deplibs_check_method
2439
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2440
])# AC_DEPLIBS_CHECK_METHOD
2445
# find the pathname to a BSD-compatible name lister
2446
AC_DEFUN([AC_PROG_NM],
2447
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2448
[if test -n "$NM"; then
2449
# Let the user override the test.
2452
lt_nm_to_check="${ac_tool_prefix}nm"
2453
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2454
lt_nm_to_check="$lt_nm_to_check nm"
2456
for lt_tmp_nm in $lt_nm_to_check; do
2457
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2458
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2460
test -z "$ac_dir" && ac_dir=.
2461
tmp_nm="$ac_dir/$lt_tmp_nm"
2462
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2463
# Check to see if the nm accepts a BSD-compat flag.
2464
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2465
# nm: unknown option "B" ignored
2466
# Tru64's nm complains that /dev/null is an invalid object file
2467
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2468
*/dev/null* | *'Invalid file or object type'*)
2469
lt_cv_path_NM="$tmp_nm -B"
2473
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2475
lt_cv_path_NM="$tmp_nm -p"
2479
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2480
continue # so that we can try to find one that supports BSD flags
2489
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2497
# check for math library
2498
AC_DEFUN([AC_CHECK_LIBM],
2499
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2502
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2503
# These system don't have libm, or don't need it
2506
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2507
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2510
AC_CHECK_LIB(m, cos, LIBM="-lm")
2516
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2517
# -----------------------------------
2518
# sets LIBLTDL to the link flags for the libltdl convenience library and
2519
# LTDLINCL to the include flags for the libltdl header and adds
2520
# --enable-ltdl-convenience to the configure arguments. Note that
2521
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2522
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2523
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2524
# (note the single quotes!). If your package is not flat and you're not
2525
# using automake, define top_builddir and top_srcdir appropriately in
2527
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2528
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2529
case $enable_ltdl_convenience in
2530
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2531
"") enable_ltdl_convenience=yes
2532
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2534
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2535
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2536
# For backwards non-gettext consistent compatibility...
2538
])# AC_LIBLTDL_CONVENIENCE
2541
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2542
# -----------------------------------
2543
# sets LIBLTDL to the link flags for the libltdl installable library and
2544
# LTDLINCL to the include flags for the libltdl header and adds
2545
# --enable-ltdl-install to the configure arguments. Note that
2546
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2547
# and an installed libltdl is not found, it is assumed to be `libltdl'.
2548
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2549
# '${top_srcdir}/' (note the single quotes!). If your package is not
2550
# flat and you're not using automake, define top_builddir and top_srcdir
2551
# appropriately in the Makefiles.
2552
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2553
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2554
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2555
AC_CHECK_LIB(ltdl, lt_dlinit,
2556
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2557
[if test x"$enable_ltdl_install" = xno; then
2558
AC_MSG_WARN([libltdl not installed, but installation disabled])
2560
enable_ltdl_install=yes
2563
if test x"$enable_ltdl_install" = x"yes"; then
2564
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2565
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2566
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2568
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2572
# For backwards non-gettext consistent compatibility...
2574
])# AC_LIBLTDL_INSTALLABLE
2579
# enable support for C++ libraries
2580
AC_DEFUN([AC_LIBTOOL_CXX],
2581
[AC_REQUIRE([_LT_AC_LANG_CXX])
2587
AC_DEFUN([_LT_AC_LANG_CXX],
2588
[AC_REQUIRE([AC_PROG_CXX])
2589
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2590
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2593
# _LT_AC_PROG_CXXCPP
2594
# ------------------
2595
AC_DEFUN([_LT_AC_PROG_CXXCPP],
2597
AC_REQUIRE([AC_PROG_CXX])
2598
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2599
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2600
(test "X$CXX" != "Xg++"))) ; then
2603
])# _LT_AC_PROG_CXXCPP
2607
# enable support for Fortran 77 libraries
2608
AC_DEFUN([AC_LIBTOOL_F77],
2609
[AC_REQUIRE([_LT_AC_LANG_F77])
2615
AC_DEFUN([_LT_AC_LANG_F77],
2616
[AC_REQUIRE([AC_PROG_F77])
2617
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2623
# enable support for GCJ libraries
2624
AC_DEFUN([AC_LIBTOOL_GCJ],
2625
[AC_REQUIRE([_LT_AC_LANG_GCJ])
2631
AC_DEFUN([_LT_AC_LANG_GCJ],
2632
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2633
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2634
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2635
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2636
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2637
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2638
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2644
# enable support for Windows resource files
2645
AC_DEFUN([AC_LIBTOOL_RC],
2646
[AC_REQUIRE([LT_AC_PROG_RC])
2647
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2651
# AC_LIBTOOL_LANG_C_CONFIG
2652
# ------------------------
2653
# Ensure that the configuration vars for the C compiler are
2654
# suitably defined. Those variables are subsequently used by
2655
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2656
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2657
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2661
# Source file extension for C test sources.
2664
# Object file extension for compiled C test sources.
2666
_LT_AC_TAGVAR(objext, $1)=$objext
2668
# Code to be used in simple compile tests
2669
lt_simple_compile_test_code="int some_variable = 0;\n"
2671
# Code to be used in simple link tests
2672
lt_simple_link_test_code='int main(){return(0);}\n'
2676
# save warnings/boilerplate of simple test code
2677
_LT_COMPILER_BOILERPLATE
2678
_LT_LINKER_BOILERPLATE
2680
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2681
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2682
AC_LIBTOOL_PROG_CC_C_O($1)
2683
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2684
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2685
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2686
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2687
AC_LIBTOOL_SYS_LIB_STRIP
2476
2688
AC_LIBTOOL_DLOPEN_SELF
2478
if test "$enable_shared" = yes && test "$GCC" = yes; then
2479
case $archive_cmds in
2481
# FIXME: we may have to deal with multi-command sequences.
2484
# Test whether the compiler implicitly links with -lc since on some
2485
# systems, -lgcc has to come before -lc. If gcc already passes -lc
2486
# to ld, don't add -lc before -lgcc.
2487
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2488
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2490
echo 'static int dummy;' > conftest.$ac_ext
2492
if AC_TRY_EVAL(ac_compile); then
2495
libobjs=conftest.$ac_objext
2497
wl=$lt_cv_prog_cc_wl
2503
save_allow_undefined_flag=$allow_undefined_flag
2504
allow_undefined_flag=
2505
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2507
lt_cv_archive_cmds_need_lc=no
2509
lt_cv_archive_cmds_need_lc=yes
2511
allow_undefined_flag=$save_allow_undefined_flag
2513
cat conftest.err 1>&5
2515
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2690
# Report which library types will actually be built
2691
AC_MSG_CHECKING([if libtool supports shared libraries])
2692
AC_MSG_RESULT([$can_build_shared])
2694
AC_MSG_CHECKING([whether to build shared libraries])
2695
test "$can_build_shared" = "no" && enable_shared=no
2697
# On AIX, shared libraries and static libraries use the same namespace, and
2698
# are all built from PIC.
2701
test "$enable_shared" = yes && enable_static=no
2702
if test -n "$RANLIB"; then
2703
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2704
postinstall_cmds='$RANLIB $lib'
2709
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2710
test "$enable_shared" = yes && enable_static=no
2714
AC_MSG_RESULT([$enable_shared])
2716
AC_MSG_CHECKING([whether to build static libraries])
2717
# Make sure either enable_shared or enable_static is yes.
2718
test "$enable_shared" = yes || enable_static=yes
2719
AC_MSG_RESULT([$enable_static])
2721
AC_LIBTOOL_CONFIG($1)
2725
])# AC_LIBTOOL_LANG_C_CONFIG
2728
# AC_LIBTOOL_LANG_CXX_CONFIG
2729
# --------------------------
2730
# Ensure that the configuration vars for the C compiler are
2731
# suitably defined. Those variables are subsequently used by
2732
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2733
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2734
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2736
AC_REQUIRE([AC_PROG_CXX])
2737
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2739
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2740
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2741
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2742
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2743
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2744
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2745
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2746
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2747
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2748
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2749
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2750
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2751
_LT_AC_TAGVAR(module_cmds, $1)=
2752
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2753
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2754
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2755
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2756
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2757
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2759
# Dependencies to place before and after the object being linked:
2760
_LT_AC_TAGVAR(predep_objects, $1)=
2761
_LT_AC_TAGVAR(postdep_objects, $1)=
2762
_LT_AC_TAGVAR(predeps, $1)=
2763
_LT_AC_TAGVAR(postdeps, $1)=
2764
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2766
# Source file extension for C++ test sources.
2769
# Object file extension for compiled C++ test sources.
2771
_LT_AC_TAGVAR(objext, $1)=$objext
2773
# Code to be used in simple compile tests
2774
lt_simple_compile_test_code="int some_variable = 0;\n"
2776
# Code to be used in simple link tests
2777
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2779
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2782
# save warnings/boilerplate of simple test code
2783
_LT_COMPILER_BOILERPLATE
2784
_LT_LINKER_BOILERPLATE
2786
# Allow CC to be a program name with arguments.
2791
lt_save_with_gnu_ld=$with_gnu_ld
2792
lt_save_path_LD=$lt_cv_path_LD
2793
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2794
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2796
$as_unset lt_cv_prog_gnu_ld
2798
if test -n "${lt_cv_path_LDCXX+set}"; then
2799
lt_cv_path_LD=$lt_cv_path_LDCXX
2801
$as_unset lt_cv_path_LD
2803
test -z "${LDCXX+set}" || LD=$LDCXX
2806
_LT_AC_TAGVAR(compiler, $1)=$CC
2807
_LT_CC_BASENAME([$compiler])
2809
# We don't want -fno-exception wen compiling C++ code, so set the
2810
# no_builtin_flag separately
2811
if test "$GXX" = yes; then
2812
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2814
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2817
if test "$GXX" = yes; then
2818
# Set up default GNU C++ configuration
2822
# Check if GNU C++ uses GNU ld as the underlying linker, since the
2823
# archiving commands below assume that GNU ld is being used.
2824
if test "$with_gnu_ld" = yes; then
2825
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2826
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2828
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2829
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2831
# If archive_cmds runs LD, not CC, wlarc should be empty
2832
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2833
# investigate it a little bit more. (MM)
2836
# ancient GNU ld didn't support --whole-archive et. al.
2837
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2838
grep 'no-whole-archive' > /dev/null; then
2839
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2841
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2847
# A generic and very simple default shared library creation
2848
# command for GNU C++ for the case where it uses the native
2849
# linker, instead of GNU ld. If possible, this setting should
2850
# overridden to take advantage of the native linker features on
2851
# the platform it is being used on.
2852
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2855
# Commands to make compiler produce verbose output that lists
2856
# what "hidden" libraries, object files and flags are used when
2857
# linking a shared library.
2858
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2866
# PORTME: fill in a description of your system's C++ link characteristics
2867
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2868
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2871
# FIXME: insert proper C++ library support
2872
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2875
if test "$host_cpu" = ia64; then
2876
# On IA64, the linker does run time linking by default, so we don't
2877
# have to do anything special.
2878
aix_use_runtimelinking=no
2879
exp_sym_flag='-Bexport'
2882
aix_use_runtimelinking=no
2884
# Test if we are trying to use run time linking or normal
2885
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2886
# need to do runtime linking.
2887
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2888
for ld_flag in $LDFLAGS; do
2891
aix_use_runtimelinking=yes
2899
exp_sym_flag='-bexport'
2900
no_entry_flag='-bnoentry'
2903
# When large executables or shared objects are built, AIX ld can
2904
# have problems creating the table of contents. If linking a library
2905
# or program results in "error TOC overflow" add -mminimal-toc to
2906
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2907
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2909
_LT_AC_TAGVAR(archive_cmds, $1)=''
2910
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2911
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2912
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2914
if test "$GXX" = yes; then
2915
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2916
# We only want to do this on AIX 4.2 and lower, the check
2917
# below for broken collect2 doesn't work under 4.3+
2918
collect2name=`${CC} -print-prog-name=collect2`
2919
if test -f "$collect2name" && \
2920
strings "$collect2name" | grep resolve_lib_name >/dev/null
2922
# We have reworked collect2
2923
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2925
# We have old collect2
2926
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2927
# It fails to find uninstalled libraries when the uninstalled
2928
# path is not listed in the libpath. Setting hardcode_minus_L
2929
# to unsupported forces relinking
2930
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2931
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2932
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2936
shared_flag='-shared'
2937
if test "$aix_use_runtimelinking" = yes; then
2938
shared_flag="$shared_flag "'${wl}-G'
2942
if test "$host_cpu" = ia64; then
2943
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2944
# chokes on -Wl,-G. The following line is correct:
2947
if test "$aix_use_runtimelinking" = yes; then
2948
shared_flag='${wl}-G'
2950
shared_flag='${wl}-bM:SRE'
2955
# It seems that -bexpall does not export symbols beginning with
2956
# underscore (_), so it is better to generate a list of symbols to export.
2957
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
2958
if test "$aix_use_runtimelinking" = yes; then
2959
# Warning - without using the other runtime loading flags (-brtl),
2960
# -berok will link without error, but may produce a broken library.
2961
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2962
# Determine the default libpath from the value encoded in an empty executable.
2963
_LT_AC_SYS_LIBPATH_AIX
2964
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2966
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2968
if test "$host_cpu" = ia64; then
2969
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2970
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2971
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
2973
# Determine the default libpath from the value encoded in an empty executable.
2974
_LT_AC_SYS_LIBPATH_AIX
2975
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2976
# Warning - without using the other run time loading flags,
2977
# -berok will link without error, but may produce a broken library.
2978
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2979
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2980
# Exported symbols can be pulled into shared objects from archives
2981
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2982
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2983
# This is similar to how AIX traditionally builds its shared libraries.
2984
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2990
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2991
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2992
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2993
# support --undefined. This deserves some investigation. FIXME
2994
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2996
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3001
case $cc_basename in
3003
# FIXME: insert proper C++ library support
3004
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3009
cygwin* | mingw* | pw32*)
3010
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3011
# as there is no search path for DLLs.
3012
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3013
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3014
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3015
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3017
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3018
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3019
# If the export-symbols file already is a .def file (1st line
3020
# is EXPORTS), use it as is; otherwise, prepend...
3021
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3022
cp $export_symbols $output_objdir/$soname.def;
3024
echo EXPORTS > $output_objdir/$soname.def;
3025
cat $export_symbols >> $output_objdir/$soname.def;
3027
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3029
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3032
darwin* | rhapsody*)
3034
rhapsody* | darwin1.[[012]])
3035
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3038
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3039
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3041
case ${MACOSX_DEPLOYMENT_TARGET} in
3043
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3046
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3052
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3053
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3054
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3055
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3056
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3057
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3059
if test "$GXX" = yes ; then
3060
lt_int_apple_cc_single_mod=no
3061
output_verbose_link_cmd='echo'
3062
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3063
lt_int_apple_cc_single_mod=yes
3065
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3066
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3068
_LT_AC_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'
3070
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3071
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3072
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3073
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3075
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3077
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3079
case $cc_basename in
3081
output_verbose_link_cmd='echo'
3082
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3083
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3084
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3085
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3086
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3089
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3096
case $cc_basename in
3098
# FIXME: insert proper C++ library support
3099
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3102
# Green Hills C++ Compiler
3103
# FIXME: insert proper C++ library support
3104
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3107
# FIXME: insert proper C++ library support
3108
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3113
# C++ shared libraries reported to be fairly broken before switch to ELF
3114
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3117
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3119
freebsd* | kfreebsd*-gnu | dragonfly*)
3120
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3122
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3127
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3128
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3129
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3130
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3131
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3132
# but as the default
3133
# location of the library.
3135
case $cc_basename in
3137
# FIXME: insert proper C++ library support
3138
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3141
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3142
# Commands to make compiler produce verbose output that lists
3143
# what "hidden" libraries, object files and flags are used when
3144
# linking a shared library.
3146
# There doesn't appear to be a way to prevent this compiler from
3147
# explicitly linking system object files so we need to strip them
3148
# from the output so that they don't get included in the library
3150
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3153
if test "$GXX" = yes; then
3154
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3156
# FIXME: insert proper C++ library support
3157
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3163
if test $with_gnu_ld = no; then
3164
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3165
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3169
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3172
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3178
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3179
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3182
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3183
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3184
# but as the default
3185
# location of the library.
3189
case $cc_basename in
3191
# FIXME: insert proper C++ library support
3192
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3197
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3200
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3203
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3206
# Commands to make compiler produce verbose output that lists
3207
# what "hidden" libraries, object files and flags are used when
3208
# linking a shared library.
3210
# There doesn't appear to be a way to prevent this compiler from
3211
# explicitly linking system object files so we need to strip them
3212
# from the output so that they don't get included in the library
3214
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3217
if test "$GXX" = yes; then
3218
if test $with_gnu_ld = no; then
3221
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3224
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3227
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3232
# FIXME: insert proper C++ library support
3233
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3239
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3240
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3241
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3242
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3243
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3244
# Instead, shared libraries are loaded at an image base (0x10000000 by
3245
# default) and relocated if they conflict, which is a slow very memory
3246
# consuming and fragmenting process. To avoid this, we pick a random,
3247
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3248
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
3249
_LT_AC_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'
3250
_LT_AC_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'
3253
case $cc_basename in
3256
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3258
# Archives containing C++ object files must be created using
3259
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3260
# necessary to make sure instantiated templates are included
3262
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3265
if test "$GXX" = yes; then
3266
if test "$with_gnu_ld" = no; then
3267
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3269
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3272
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3275
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3276
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3279
case $cc_basename in
3281
# Kuck and Associates, Inc. (KAI) C++ Compiler
3283
# KCC will only create a shared library if the output file
3284
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3285
# to its proper name (with version) after linking.
3286
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3287
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3288
# Commands to make compiler produce verbose output that lists
3289
# what "hidden" libraries, object files and flags are used when
3290
# linking a shared library.
3292
# There doesn't appear to be a way to prevent this compiler from
3293
# explicitly linking system object files so we need to strip them
3294
# from the output so that they don't get included in the library
3296
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3298
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3299
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3301
# Archives containing C++ object files must be created using
3302
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3303
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3308
# version 8.0 and above of icpc choke on multiply defined symbols
3309
# if we add $predep_objects and $postdep_objects, however 7.1 and
3310
# earlier do not add the objects themselves.
3311
case `$CC -V 2>&1` in
3313
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3314
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3316
*) # Version 8.0 or newer
3319
ia64*) tmp_idyn=' -i_dynamic';;
3321
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3322
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3325
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3326
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3327
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3328
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3331
# Portland Group C++ compiler
3332
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3333
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3335
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3336
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3337
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3341
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3342
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3344
runpath_var=LD_RUN_PATH
3345
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3346
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3348
# Commands to make compiler produce verbose output that lists
3349
# what "hidden" libraries, object files and flags are used when
3350
# linking a shared library.
3352
# There doesn't appear to be a way to prevent this compiler from
3353
# explicitly linking system object files so we need to strip them
3354
# from the output so that they don't get included in the library
3356
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3361
# FIXME: insert proper C++ library support
3362
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3365
# FIXME: insert proper C++ library support
3366
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3369
case $cc_basename in
3371
# FIXME: insert proper C++ library support
3372
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3375
# FIXME: insert proper C++ library support
3376
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3381
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3382
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3384
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3385
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3386
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3388
# Workaround some broken pre-1.5 toolchains
3389
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3392
# C++ shared libraries are fairly broken
3393
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3396
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3397
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3398
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3399
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3400
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3401
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3402
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3403
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3405
output_verbose_link_cmd='echo'
3408
case $cc_basename in
3410
# Kuck and Associates, Inc. (KAI) C++ Compiler
3412
# KCC will only create a shared library if the output file
3413
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3414
# to its proper name (with version) after linking.
3415
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3417
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3418
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3420
# Archives containing C++ object files must be created using
3421
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3422
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3426
# Rational C++ 2.4.1
3427
# FIXME: insert proper C++ library support
3428
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3431
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3432
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3434
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3435
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3437
# Commands to make compiler produce verbose output that lists
3438
# what "hidden" libraries, object files and flags are used when
3439
# linking a shared library.
3441
# There doesn't appear to be a way to prevent this compiler from
3442
# explicitly linking system object files so we need to strip them
3443
# from the output so that they don't get included in the library
3445
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3448
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3449
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3450
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3452
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3453
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3455
# Commands to make compiler produce verbose output that lists
3456
# what "hidden" libraries, object files and flags are used when
3457
# linking a shared library.
3458
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3461
# FIXME: insert proper C++ library support
3462
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3468
case $cc_basename in
3470
# Kuck and Associates, Inc. (KAI) C++ Compiler
3472
# KCC will only create a shared library if the output file
3473
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3474
# to its proper name (with version) after linking.
3475
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3477
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3478
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3480
# Archives containing C++ object files must be created using
3481
# the KAI C++ compiler.
3482
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3485
# Rational C++ 2.4.1
3486
# FIXME: insert proper C++ library support
3487
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3490
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3491
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3492
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3493
echo "-hidden">> $lib.exp~
3494
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3497
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3498
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3500
# Commands to make compiler produce verbose output that lists
3501
# what "hidden" libraries, object files and flags are used when
3502
# linking a shared library.
3504
# There doesn't appear to be a way to prevent this compiler from
3505
# explicitly linking system object files so we need to strip them
3506
# from the output so that they don't get included in the library
3508
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3511
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3512
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3513
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3515
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3516
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3518
# Commands to make compiler produce verbose output that lists
3519
# what "hidden" libraries, object files and flags are used when
3520
# linking a shared library.
3521
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3524
# FIXME: insert proper C++ library support
3525
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3531
# FIXME: insert proper C++ library support
3532
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3535
case $cc_basename in
3538
# FIXME: insert proper C++ library support
3539
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3543
# FIXME: insert proper C++ library support
3544
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3547
# FIXME: insert proper C++ library support
3548
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3553
case $cc_basename in
3555
# Sun C++ 4.2, 5.x and Centerline C++
3556
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3557
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3558
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3559
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3560
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3562
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3563
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3565
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3567
# The C++ compiler is used as linker so we must use $wl
3568
# flag to pass the commands to the underlying system
3569
# linker. We must also pass each convience library through
3570
# to the system linker between allextract/defaultextract.
3571
# The C++ compiler will combine linker options so we
3572
# cannot just pass the convience library names through
3574
# Supported since Solaris 2.6 (maybe 2.5.1?)
3575
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3578
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3580
output_verbose_link_cmd='echo'
3582
# Archives containing C++ object files must be created using
3583
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3584
# necessary to make sure instantiated templates are included
3586
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3589
# Green Hills C++ Compiler
3590
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3592
# The C++ compiler must be used to create the archive.
3593
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3596
# GNU C++ compiler with Solaris linker
3597
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3598
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3599
if $CC --version | grep -v '^2\.7' > /dev/null; then
3600
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3601
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3602
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3604
# Commands to make compiler produce verbose output that lists
3605
# what "hidden" libraries, object files and flags are used when
3606
# linking a shared library.
3607
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3609
# g++ 2.7 appears to require `-G' NOT `-shared' on this
3611
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3612
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3613
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3615
# Commands to make compiler produce verbose output that lists
3616
# what "hidden" libraries, object files and flags are used when
3617
# linking a shared library.
3618
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3621
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3626
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3627
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3628
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3629
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3630
runpath_var='LD_RUN_PATH'
3632
case $cc_basename in
3634
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3635
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3638
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3639
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3643
sysv5* | sco3.2v5* | sco5v6*)
3644
# Note: We can NOT use -z defs as we might desire, because we do not
3645
# link with -lc, and that would cause any symbols used from libc to
3646
# always be unresolved, which means just about no library would
3647
# ever link correctly. If we're not using GNU ld we use -z text
3648
# though, which does catch some bad symbols but isn't as heavy-handed
3650
# For security reasons, it is highly recommended that you always
3651
# use absolute paths for naming shared libraries, and exclude the
3652
# DT_RUNPATH tag from executables and libraries. But doing so
3653
# requires that you compile everything twice, which is a pain.
3654
# So that behaviour is only enabled if SCOABSPATH is set to a
3655
# non-empty value in the environment. Most likely only useful for
3656
# creating official distributions of packages.
3657
# This is a hack until libtool officially supports absolute path
3658
# names for shared libraries.
3659
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3660
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3661
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3662
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3663
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3664
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3665
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3666
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3667
runpath_var='LD_RUN_PATH'
3669
case $cc_basename in
3671
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3672
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3675
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3676
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3681
case $cc_basename in
3683
# NonStop-UX NCC 3.20
3684
# FIXME: insert proper C++ library support
3685
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3688
# FIXME: insert proper C++ library support
3689
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3694
# FIXME: insert proper C++ library support
3695
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3698
# FIXME: insert proper C++ library support
3699
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3702
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3703
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3705
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3706
_LT_AC_TAGVAR(LD, $1)="$LD"
3708
AC_LIBTOOL_POSTDEP_PREDEP($1)
3709
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3710
AC_LIBTOOL_PROG_CC_C_O($1)
3711
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3712
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3713
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3714
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3716
AC_LIBTOOL_CONFIG($1)
3723
with_gnu_ldcxx=$with_gnu_ld
3724
with_gnu_ld=$lt_save_with_gnu_ld
3725
lt_cv_path_LDCXX=$lt_cv_path_LD
3726
lt_cv_path_LD=$lt_save_path_LD
3727
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3728
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3729
])# AC_LIBTOOL_LANG_CXX_CONFIG
3731
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3732
# ------------------------------------
3733
# Figure out "hidden" library dependencies from verbose
3734
# compiler output when linking a shared library.
3735
# Parse the compiler output and extract the necessary
3736
# objects, libraries and library flags.
3737
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3738
dnl we can't use the lt_simple_compile_test_code here,
3739
dnl because it contains code intended for an executable,
3740
dnl not a library. It's possible we should let each
3741
dnl tag define a new lt_????_link_test_code variable,
3742
dnl but it's only used here...
3743
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3745
void foo (void) { a = 0; }
3747
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3751
Foo (void) { a = 0; }
3756
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3764
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3767
public void bar (void) {
3773
dnl Parse the compiler output and extract the necessary
3774
dnl objects, libraries and library flags.
3775
if AC_TRY_EVAL(ac_compile); then
3776
# Parse the compiler output and extract the necessary
3777
# objects, libraries and library flags.
3779
# Sentinel used to keep track of whether or not we are before
3780
# the conftest object file.
3781
pre_test_object_deps_done=no
3783
# The `*' in the case matches for architectures that use `case' in
3784
# $output_verbose_cmd can trigger glob expansion during the loop
3785
# eval without this substitution.
3786
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3788
for p in `eval $output_verbose_link_cmd`; do
3792
# Some compilers place space between "-{L,R}" and the path.
3795
|| test $p = "-R"; then
3802
if test "$pre_test_object_deps_done" = no; then
3805
# Internal compiler library paths should come after those
3806
# provided the user. The postdeps already come after the
3807
# user supplied libs so there is no need to process them.
3808
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3809
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3811
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3814
# The "-l" case would never come before the object being
3815
# linked, so don't bother handling this case.
3818
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3819
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3821
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3827
# This assumes that the test object file only shows up
3828
# once in the compiler output.
3829
if test "$p" = "conftest.$objext"; then
3830
pre_test_object_deps_done=yes
3834
if test "$pre_test_object_deps_done" = no; then
3835
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3836
_LT_AC_TAGVAR(predep_objects, $1)="$p"
3838
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3841
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3842
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
3844
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3849
*) ;; # Ignore the rest.
3857
echo "libtool.m4: error: problem compiling $1 test program"
3860
$rm -f confest.$objext
3862
# PORTME: override above test on systems where it is broken
3866
# Interix 3.5 installs completely hosed .la files for C++, so rather than
3867
# hack all around it, let's just trust "g++" to DTRT.
3868
_LT_AC_TAGVAR(predep_objects,$1)=
3869
_LT_AC_TAGVAR(postdep_objects,$1)=
3870
_LT_AC_TAGVAR(postdeps,$1)=
3874
case $cc_basename in
3876
# Adding this requires a known-good setup of shared libraries for
3877
# Sun compiler versions before 5.6, else PIC objects from an old
3878
# archive will be linked into the output, leading to subtle bugs.
3879
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
2519
need_lc=${lt_cv_archive_cmds_need_lc-yes}
2521
# The second clause should only fire when bootstrapping the
3886
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3887
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3889
])# AC_LIBTOOL_POSTDEP_PREDEP
3891
# AC_LIBTOOL_LANG_F77_CONFIG
3892
# --------------------------
3893
# Ensure that the configuration vars for the C compiler are
3894
# suitably defined. Those variables are subsequently used by
3895
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3896
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3897
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3898
[AC_REQUIRE([AC_PROG_F77])
3899
AC_LANG_PUSH(Fortran 77)
3901
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3902
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3903
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3904
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3905
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3906
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3907
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3908
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3909
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3910
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3911
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3912
_LT_AC_TAGVAR(module_cmds, $1)=
3913
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3914
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3915
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3916
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3917
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3918
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3920
# Source file extension for f77 test sources.
3923
# Object file extension for compiled f77 test sources.
3925
_LT_AC_TAGVAR(objext, $1)=$objext
3927
# Code to be used in simple compile tests
3928
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3930
# Code to be used in simple link tests
3931
lt_simple_link_test_code=" program t\n end\n"
3933
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3936
# save warnings/boilerplate of simple test code
3937
_LT_COMPILER_BOILERPLATE
3938
_LT_LINKER_BOILERPLATE
3940
# Allow CC to be a program name with arguments.
3944
_LT_AC_TAGVAR(compiler, $1)=$CC
3945
_LT_CC_BASENAME([$compiler])
3947
AC_MSG_CHECKING([if libtool supports shared libraries])
3948
AC_MSG_RESULT([$can_build_shared])
3950
AC_MSG_CHECKING([whether to build shared libraries])
3951
test "$can_build_shared" = "no" && enable_shared=no
3953
# On AIX, shared libraries and static libraries use the same namespace, and
3954
# are all built from PIC.
3957
test "$enable_shared" = yes && enable_static=no
3958
if test -n "$RANLIB"; then
3959
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3960
postinstall_cmds='$RANLIB $lib'
3964
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3965
test "$enable_shared" = yes && enable_static=no
3969
AC_MSG_RESULT([$enable_shared])
3971
AC_MSG_CHECKING([whether to build static libraries])
3972
# Make sure either enable_shared or enable_static is yes.
3973
test "$enable_shared" = yes || enable_static=yes
3974
AC_MSG_RESULT([$enable_static])
3976
_LT_AC_TAGVAR(GCC, $1)="$G77"
3977
_LT_AC_TAGVAR(LD, $1)="$LD"
3979
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3980
AC_LIBTOOL_PROG_CC_C_O($1)
3981
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3982
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3983
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3984
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3986
AC_LIBTOOL_CONFIG($1)
3990
])# AC_LIBTOOL_LANG_F77_CONFIG
3993
# AC_LIBTOOL_LANG_GCJ_CONFIG
3994
# --------------------------
3995
# Ensure that the configuration vars for the C compiler are
3996
# suitably defined. Those variables are subsequently used by
3997
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3998
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3999
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4002
# Source file extension for Java test sources.
4005
# Object file extension for compiled Java test sources.
4007
_LT_AC_TAGVAR(objext, $1)=$objext
4009
# Code to be used in simple compile tests
4010
lt_simple_compile_test_code="class foo {}\n"
4012
# Code to be used in simple link tests
4013
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4015
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4018
# save warnings/boilerplate of simple test code
4019
_LT_COMPILER_BOILERPLATE
4020
_LT_LINKER_BOILERPLATE
4022
# Allow CC to be a program name with arguments.
4026
_LT_AC_TAGVAR(compiler, $1)=$CC
4027
_LT_CC_BASENAME([$compiler])
4029
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4030
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4032
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4034
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4035
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4036
AC_LIBTOOL_PROG_CC_C_O($1)
4037
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4038
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4039
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4040
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4042
AC_LIBTOOL_CONFIG($1)
4046
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4049
# AC_LIBTOOL_LANG_RC_CONFIG
4050
# -------------------------
4051
# Ensure that the configuration vars for the Windows resource compiler are
4052
# suitably defined. Those variables are subsequently used by
4053
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4054
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4055
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4058
# Source file extension for RC test sources.
4061
# Object file extension for compiled RC test sources.
4063
_LT_AC_TAGVAR(objext, $1)=$objext
4065
# Code to be used in simple compile tests
4066
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4068
# Code to be used in simple link tests
4069
lt_simple_link_test_code="$lt_simple_compile_test_code"
4071
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4074
# save warnings/boilerplate of simple test code
4075
_LT_COMPILER_BOILERPLATE
4076
_LT_LINKER_BOILERPLATE
4078
# Allow CC to be a program name with arguments.
4082
_LT_AC_TAGVAR(compiler, $1)=$CC
4083
_LT_CC_BASENAME([$compiler])
4084
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4086
AC_LIBTOOL_CONFIG($1)
4090
])# AC_LIBTOOL_LANG_RC_CONFIG
4093
# AC_LIBTOOL_CONFIG([TAGNAME])
4094
# ----------------------------
4095
# If TAGNAME is not passed, then create an initial libtool script
4096
# with a default configuration from the untagged config vars. Otherwise
4097
# add code to config.status for appending the configuration named by
4098
# TAGNAME from the matching tagged config vars.
4099
AC_DEFUN([AC_LIBTOOL_CONFIG],
4100
[# The else clause should only fire when bootstrapping the
2522
4101
# libtool distribution, otherwise you forgot to ship ltmain.sh
2523
4102
# with your package, and you will get complaints that there are
2524
4103
# no rules to generate ltmain.sh.
2525
4104
if test -f "$ltmain"; then
2528
# If there is no Makefile yet, we rely on a make rule to execute
2529
# `config.status --recheck' to rerun these tests and create the
2530
# libtool script then.
2531
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
2532
if test -f "$ltmain_in"; then
2533
test -f Makefile && make "$ltmain"
4105
# See if we are running on zsh, and set the options which allow our commands through
4106
# without removal of \ escapes.
4107
if test -n "${ZSH_VERSION+set}" ; then
4108
setopt NO_GLOB_SUBST
2537
if test -f "$ltmain"; then
2538
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2541
echo creating $ofile
2543
4110
# Now quote all the things that may contain metacharacters while being
2544
4111
# careful not to overquote the AC_SUBSTed values. We take copies of the
2545
4112
# variables and quote the copies for generation of the libtool script.
2546
for var in echo old_CC old_CFLAGS SED \
2547
AR AR_FLAGS CC LD LN_S NM SHELL STRIP \
2548
reload_flag reload_cmds wl \
2549
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2550
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2551
library_names_spec soname_spec \
2552
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2553
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2554
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2555
old_striplib striplib file_magic_cmd export_symbols_cmds \
2556
deplibs_check_method allow_undefined_flag no_undefined_flag \
2557
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2558
global_symbol_to_c_name_address \
2559
hardcode_libdir_flag_spec hardcode_libdir_separator \
4113
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4115
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4116
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4117
deplibs_check_method reload_flag reload_cmds need_locks \
4118
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4119
lt_cv_sys_global_symbol_to_c_name_address \
2560
4120
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2561
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4121
old_postinstall_cmds old_postuninstall_cmds \
4122
_LT_AC_TAGVAR(compiler, $1) \
4123
_LT_AC_TAGVAR(CC, $1) \
4124
_LT_AC_TAGVAR(LD, $1) \
4125
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4126
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4127
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4128
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4129
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4130
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4131
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4132
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4133
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4134
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4135
_LT_AC_TAGVAR(predep_objects, $1) \
4136
_LT_AC_TAGVAR(postdep_objects, $1) \
4137
_LT_AC_TAGVAR(predeps, $1) \
4138
_LT_AC_TAGVAR(postdeps, $1) \
4139
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4140
_LT_AC_TAGVAR(archive_cmds, $1) \
4141
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4142
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4143
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4144
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4145
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4146
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4147
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4148
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4149
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4150
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4151
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4152
_LT_AC_TAGVAR(module_cmds, $1) \
4153
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4154
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4155
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4156
_LT_AC_TAGVAR(include_expsyms, $1); do
2564
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4159
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4160
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4161
_LT_AC_TAGVAR(archive_cmds, $1) | \
4162
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4163
_LT_AC_TAGVAR(module_cmds, $1) | \
4164
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4165
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4166
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4167
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4168
postinstall_cmds | postuninstall_cmds | \
2565
4169
old_postinstall_cmds | old_postuninstall_cmds | \
2566
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2567
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2568
postinstall_cmds | postuninstall_cmds | \
2569
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4170
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2570
4171
# Double-quote double-evaled strings.
2571
4172
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2887
cygwin* | mingw* | pw32* | os2*)
2888
cat <<'EOF' >> "${ofile}T"
2889
# This is a source program that is used to create dlls on Windows
2890
# Don't remove nor modify the starting and closing comments
4565
# We use sed instead of cat because bash on DJGPP gets confused if
4566
# if finds mixed CR/LF and LF-only lines. Since sed operates in
4567
# text mode, it properly converts lines to CR/LF. This bash problem
4568
# is reportedly fixed, but why not run on old versions too?
4569
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4571
mv -f "$cfgfile" "$ofile" || \
4572
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4576
# If there is no Makefile yet, we rely on a make rule to execute
4577
# `config.status --recheck' to rerun these tests and create the
4578
# libtool script then.
4579
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4580
if test -f "$ltmain_in"; then
4581
test -f Makefile && make "$ltmain"
4584
])# AC_LIBTOOL_CONFIG
4587
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4588
# -------------------------------------------
4589
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4590
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4592
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4594
if test "$GCC" = yes; then
4595
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4597
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4598
lt_cv_prog_compiler_rtti_exceptions,
4599
[-fno-rtti -fno-exceptions], [],
4600
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4602
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4605
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4606
# ---------------------------------
4607
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4608
[AC_REQUIRE([AC_CANONICAL_HOST])
4609
AC_REQUIRE([AC_PROG_NM])
4610
AC_REQUIRE([AC_OBJEXT])
4611
# Check for command to grab the raw symbol name followed by C symbol from nm.
4612
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4613
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4615
# These are sane defaults that work on at least a few old systems.
4616
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4618
# Character class describing NM global symbol codes.
4619
symcode='[[BCDEGRST]]'
4621
# Regexp to match symbols that can be accessed directly from C.
4622
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4624
# Transform an extracted symbol line into a proper C declaration
4625
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4627
# Transform an extracted symbol line into symbol name and symbol address
4628
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4630
# Define system-specific variables.
4635
cygwin* | mingw* | pw32*)
4636
symcode='[[ABCDGISTW]]'
4638
hpux*) # Its linker distinguishes data from code symbols
4639
if test "$host_cpu" = ia64; then
4640
symcode='[[ABCDEGRST]]'
4642
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4643
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4646
if test "$host_cpu" = ia64; then
4647
symcode='[[ABCDGIRSTW]]'
4648
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4649
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4653
symcode='[[BCDEGRST]]'
4656
symcode='[[BCDEGQRST]]'
4667
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4671
symcode='[[DFNSTU]]'
4675
# Handle CRLF in mingw tool chain
4679
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4683
# If we're using GNU nm, then use its standard symbol codes.
4684
case `$NM -V 2>&1` in
4685
*GNU* | *'with BFD'*)
4686
symcode='[[ABCDGIRSTW]]' ;;
4689
# Try without a prefix undercore, then with it.
4690
for ac_symprfx in "" "_"; do
4692
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4693
symxfrm="\\1 $ac_symprfx\\2 \\2"
4695
# Write the raw and C identifiers.
4696
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4698
# Check to see that the pipe works correctly.
4702
cat > conftest.$ac_ext <<EOF
4707
void nm_test_func(){}
4711
int main(){nm_test_var='a';nm_test_func();return(0);}
4714
if AC_TRY_EVAL(ac_compile); then
4715
# Now try to grab the symbols.
4717
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4718
# Try sorting and uniquifying the output.
4719
if sort "$nlist" | uniq > "$nlist"T; then
4720
mv -f "$nlist"T "$nlist"
4725
# Make sure that we snagged all the symbols we need.
4726
if grep ' nm_test_var$' "$nlist" >/dev/null; then
4727
if grep ' nm_test_func$' "$nlist" >/dev/null; then
4728
cat <<EOF > conftest.$ac_ext
4734
# Now generate the symbol file.
4735
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4737
cat <<EOF >> conftest.$ac_ext
4738
#if defined (__STDC__) && __STDC__
4739
# define lt_ptr_t void *
4741
# define lt_ptr_t char *
4745
/* The mapping between symbol names and symbols. */
4750
lt_preloaded_symbols[[]] =
4753
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4754
cat <<\EOF >> conftest.$ac_ext
4762
# Now try linking the two files.
4763
mv conftest.$ac_objext conftstm.$ac_objext
4764
lt_save_LIBS="$LIBS"
4765
lt_save_CFLAGS="$CFLAGS"
4766
LIBS="conftstm.$ac_objext"
4767
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4768
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4771
LIBS="$lt_save_LIBS"
4772
CFLAGS="$lt_save_CFLAGS"
4774
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4777
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4780
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4783
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4784
cat conftest.$ac_ext >&5
4786
rm -f conftest* conftst*
4788
# Do not use the global_symbol_pipe unless it works.
4789
if test "$pipe_works" = yes; then
4792
lt_cv_sys_global_symbol_pipe=
4796
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4797
lt_cv_sys_global_symbol_to_cdecl=
4799
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4800
AC_MSG_RESULT(failed)
4804
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4807
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4808
# ---------------------------------------
4809
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4810
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4811
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4812
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4814
AC_MSG_CHECKING([for $compiler option to produce PIC])
4816
# C++ specific cases for pic, static, wl, etc.
4817
if test "$GXX" = yes; then
4818
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4823
# All AIX code is PIC.
4824
if test "$host_cpu" = ia64; then
4825
# AIX 5 now supports IA64 processor
4826
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830
# FIXME: we need at least 68020 code to build shared libraries, but
4831
# adding the `-m68020' flag to GCC prevents building anything better,
4833
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4835
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4836
# PIC is the default for these OSes.
4838
mingw* | os2* | pw32*)
4839
# This hack is so that the source file can tell whether it is being
4840
# built for inclusion in a dll (and should export symbols for example).
4841
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4843
darwin* | rhapsody*)
4844
# PIC is the default on this platform
4845
# Common symbols not allowed in MH_DYLIB files
4846
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4849
# DJGPP does not support shared libraries at all
4850
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4853
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4854
# Instead, we relocate shared libraries at runtime.
4857
if test -d /usr/nec; then
4858
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4862
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4868
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4873
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4879
# All AIX code is PIC.
4880
if test "$host_cpu" = ia64; then
4881
# AIX 5 now supports IA64 processor
4882
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4884
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4888
case $cc_basename in
4890
# Green Hills C++ Compiler
4891
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4896
# PIC is the default on this platform
4897
# Common symbols not allowed in MH_DYLIB files
4898
case $cc_basename in
4900
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4901
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4906
case $cc_basename in
4908
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4911
# Green Hills C++ Compiler
4912
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4918
freebsd* | kfreebsd*-gnu | dragonfly*)
4919
# FreeBSD uses GNU C++
4921
hpux9* | hpux10* | hpux11*)
4922
case $cc_basename in
4924
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4925
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4926
if test "$host_cpu" != ia64; then
4927
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4931
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4932
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4938
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4947
# This is c89, which is MS Visual C++ (no shared libs)
4948
# Anyone wants to do a port?
4950
irix5* | irix6* | nonstopux*)
4951
case $cc_basename in
4953
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4954
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4955
# CC pic flag -KPIC is the default.
4962
case $cc_basename in
4965
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4966
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4970
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4972
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4975
# Portland Group C++ compiler.
4976
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4977
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4978
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4982
# Make sure the PIC flag is empty. It appears that all Alpha
4983
# Linux and Compaq Tru64 Unix objects are PIC.
4984
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4985
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4996
case $cc_basename in
4998
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5006
osf3* | osf4* | osf5*)
5007
case $cc_basename in
5009
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5012
# Rational C++ 2.4.1
5013
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5016
# Digital/Compaq C++
5017
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5018
# Make sure the PIC flag is empty. It appears that all Alpha
5019
# Linux and Compaq Tru64 Unix objects are PIC.
5020
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5021
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5030
case $cc_basename in
5032
# Sun C++ 4.2, 5.x and Centerline C++
5033
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5034
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5035
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5038
# Green Hills C++ Compiler
5039
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5046
case $cc_basename in
5049
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5050
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5054
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5061
case $cc_basename in
5063
# NonStop-UX NCC 3.20
5064
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5070
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5071
case $cc_basename in
5073
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5074
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5075
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5082
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5088
if test "$GCC" = yes; then
5089
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5094
# All AIX code is PIC.
5095
if test "$host_cpu" = ia64; then
5096
# AIX 5 now supports IA64 processor
5097
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5102
# FIXME: we need at least 68020 code to build shared libraries, but
5103
# adding the `-m68020' flag to GCC prevents building anything better,
5105
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5108
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5109
# PIC is the default for these OSes.
5112
mingw* | pw32* | os2*)
5113
# This hack is so that the source file can tell whether it is being
5114
# built for inclusion in a dll (and should export symbols for example).
5115
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5118
darwin* | rhapsody*)
5119
# PIC is the default on this platform
5120
# Common symbols not allowed in MH_DYLIB files
5121
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5125
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5126
# Instead, we relocate shared libraries at runtime.
5130
# Just because we use GCC doesn't mean we suddenly get shared libraries
5131
# on systems that don't support them.
5132
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5137
if test -d /usr/nec; then
5138
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5143
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5150
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5156
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5160
# PORTME Check for flag to pass linker flags through the system compiler.
5163
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5164
if test "$host_cpu" = ia64; then
5165
# AIX 5 now supports IA64 processor
5166
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5168
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5172
# PIC is the default on this platform
5173
# Common symbols not allowed in MH_DYLIB files
5174
case $cc_basename in
5176
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5177
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5182
mingw* | pw32* | os2*)
5183
# This hack is so that the source file can tell whether it is being
5184
# built for inclusion in a dll (and should export symbols for example).
5185
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5188
hpux9* | hpux10* | hpux11*)
5189
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5190
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5197
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5200
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5201
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5204
irix5* | irix6* | nonstopux*)
5205
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206
# PIC (with -KPIC) is the default.
5207
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5211
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5212
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5216
case $cc_basename in
5218
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5219
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5220
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5222
pgcc* | pgf77* | pgf90* | pgf95*)
5223
# Portland Group compilers (*not* the Pentium gcc compiler,
5224
# which looks to be a dead project)
5225
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5226
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5227
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5230
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231
# All Alpha code is PIC.
5232
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5237
osf3* | osf4* | osf5*)
5238
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5239
# All OSF/1 code is PIC.
5240
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5244
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5245
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5246
case $cc_basename in
5248
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5250
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5255
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5256
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5257
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5260
sysv4 | sysv4.2uw2* | sysv4.3*)
5261
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5262
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5263
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5267
if test -d /usr/nec ;then
5268
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5269
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5273
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5274
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5275
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5276
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5280
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5281
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5285
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5286
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5290
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5295
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5298
# Check to make sure the PIC flag actually works.
5300
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5301
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5302
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5303
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5304
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5306
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5308
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5309
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5312
# For platforms which do not support PIC, -DPIC is meaningless:
5314
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5317
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5322
# Check to make sure the static flag actually works.
5324
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5325
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5326
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5327
$lt_tmp_static_flag,
5329
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5333
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5334
# ------------------------------------
5335
# See if the linker supports building shared libraries.
5336
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5337
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5339
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5342
# If we're using GNU nm, then we don't want the "-C" option.
5343
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5344
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5345
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5347
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5351
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5354
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5357
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5362
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5363
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5364
_LT_AC_TAGVAR(archive_cmds, $1)=
5365
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5366
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5367
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5368
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5369
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5370
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5371
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5372
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5373
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5374
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5375
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5376
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5377
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5378
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5379
_LT_AC_TAGVAR(module_cmds, $1)=
5380
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5381
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5382
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5383
# include_expsyms should be a list of space-separated symbols to be *always*
5384
# included in the symbol list
5385
_LT_AC_TAGVAR(include_expsyms, $1)=
5386
# exclude_expsyms can be an extended regexp of symbols to exclude
5387
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5388
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5389
# as well as any symbol that contains `d'.
5390
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5391
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5392
# platforms (ab)use it in PIC code, but their linkers get confused if
5393
# the symbol is explicitly referenced. Since portable code cannot
5394
# rely on this symbol name, it's probably fine to never include it in
5395
# preloaded symbol tables.
5396
extract_expsyms_cmds=
5397
# Just being paranoid about ensuring that cc_basename is set.
5398
_LT_CC_BASENAME([$compiler])
5400
cygwin* | mingw* | pw32*)
5401
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5402
# When not using gcc, we currently assume that we are using
5403
# Microsoft Visual C++.
5404
if test "$GCC" != yes; then
5409
# we just hope/assume this is gcc and not c89 (= MSVC++)
5417
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5418
if test "$with_gnu_ld" = yes; then
5419
# If archive_cmds runs LD, not CC, wlarc should be empty
5422
# Set some defaults for GNU ld with shared library support. These
5423
# are reset later if shared libraries are not supported. Putting them
5424
# here allows them to be overridden if necessary.
5425
runpath_var=LD_RUN_PATH
5426
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5427
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5428
# ancient GNU ld didn't support --whole-archive et. al.
5429
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5430
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5432
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5434
supports_anon_versioning=no
5435
case `$LD -v 2>/dev/null` in
5436
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5437
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5438
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5439
*\ 2.11.*) ;; # other 2.11 versions
5440
*) supports_anon_versioning=yes ;;
5443
# See if GNU ld supports shared libraries.
5445
aix3* | aix4* | aix5*)
5446
# On AIX/PPC, the GNU linker is very broken
5447
if test "$host_cpu" != ia64; then
5448
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5451
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5452
*** to be unable to reliably create shared libraries on AIX.
5453
*** Therefore, libtool is disabling shared libraries support. If you
5454
*** really care for shared libraries, you may want to modify your PATH
5455
*** so that a non-GNU linker is found, and then restart.
5462
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5463
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5464
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5466
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5467
# that the semantics of dynamic libraries on AmigaOS, at least up
5468
# to version 4, is to share data among multiple programs linked
5469
# with the same dynamic library. Since this doesn't match the
5470
# behavior of shared libraries on other platforms, we can't use
5472
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5476
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5477
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5478
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5479
# support --undefined. This deserves some investigation. FIXME
5480
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5482
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5486
cygwin* | mingw* | pw32*)
5487
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5488
# as there is no search path for DLLs.
5489
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5490
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5491
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5492
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5493
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5495
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5496
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5497
# If the export-symbols file already is a .def file (1st line
5498
# is EXPORTS), use it as is; otherwise, prepend...
5499
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5500
cp $export_symbols $output_objdir/$soname.def;
5502
echo EXPORTS > $output_objdir/$soname.def;
5503
cat $export_symbols >> $output_objdir/$soname.def;
5505
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5507
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5512
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5513
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5514
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5515
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5516
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5517
# Instead, shared libraries are loaded at an image base (0x10000000 by
5518
# default) and relocated if they conflict, which is a slow very memory
5519
# consuming and fragmenting process. To avoid this, we pick a random,
5520
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5521
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5522
_LT_AC_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'
5523
_LT_AC_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'
5527
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5529
case $cc_basename,$host_cpu in
5530
pgcc*) # Portland Group C compiler
5531
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5532
tmp_addflag=' $pic_flag'
5534
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5535
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5536
tmp_addflag=' $pic_flag -Mnomain' ;;
5537
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5538
tmp_addflag=' -i_dynamic' ;;
5539
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5540
tmp_addflag=' -i_dynamic -nofor_main' ;;
5541
ifc* | ifort*) # Intel Fortran compiler
5542
tmp_addflag=' -nofor_main' ;;
5544
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5546
if test $supports_anon_versioning = yes; then
5547
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5548
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5549
$echo "local: *; };" >> $output_objdir/$libname.ver~
5550
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5553
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5558
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5559
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5562
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5563
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5568
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5569
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5572
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5573
*** create shared libraries on Solaris systems. Therefore, libtool
5574
*** is disabling shared libraries support. We urge you to upgrade GNU
5575
*** binutils to release 2.9.1 or newer. Another option is to modify
5576
*** your PATH or compiler configuration so that the native linker is
5577
*** used, and then restart.
5580
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5581
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5582
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5584
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5588
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5589
case `$LD -v 2>&1` in
5590
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5591
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5594
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5595
*** reliably create shared libraries on SCO systems. Therefore, libtool
5596
*** is disabling shared libraries support. We urge you to upgrade GNU
5597
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5598
*** your PATH or compiler configuration so that the native linker is
5599
*** used, and then restart.
5604
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5605
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5606
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5607
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5609
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5616
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5618
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5619
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5623
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5624
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5625
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5627
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5632
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5634
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5635
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5636
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5639
# PORTME fill in a description of your system's linker (not GNU ld)
5642
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5643
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5644
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5645
# Note: this linker hardcodes the directories in LIBPATH if there
5646
# are no directories specified by -L.
5647
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5648
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5649
# Neither direct hardcoding nor static linking is supported with a
5651
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5656
if test "$host_cpu" = ia64; then
5657
# On IA64, the linker does run time linking by default, so we don't
5658
# have to do anything special.
5659
aix_use_runtimelinking=no
5660
exp_sym_flag='-Bexport'
5663
# If we're using GNU nm, then we don't want the "-C" option.
5664
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5665
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5666
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5668
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5670
aix_use_runtimelinking=no
5672
# Test if we are trying to use run time linking or normal
5673
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5674
# need to do runtime linking.
5675
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5676
for ld_flag in $LDFLAGS; do
5677
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5678
aix_use_runtimelinking=yes
5685
exp_sym_flag='-bexport'
5686
no_entry_flag='-bnoentry'
5689
# When large executables or shared objects are built, AIX ld can
5690
# have problems creating the table of contents. If linking a library
5691
# or program results in "error TOC overflow" add -mminimal-toc to
5692
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5693
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5695
_LT_AC_TAGVAR(archive_cmds, $1)=''
5696
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5697
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5698
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5700
if test "$GCC" = yes; then
5701
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5702
# We only want to do this on AIX 4.2 and lower, the check
5703
# below for broken collect2 doesn't work under 4.3+
5704
collect2name=`${CC} -print-prog-name=collect2`
5705
if test -f "$collect2name" && \
5706
strings "$collect2name" | grep resolve_lib_name >/dev/null
5708
# We have reworked collect2
5709
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5711
# We have old collect2
5712
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5713
# It fails to find uninstalled libraries when the uninstalled
5714
# path is not listed in the libpath. Setting hardcode_minus_L
5715
# to unsupported forces relinking
5716
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5717
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5718
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5722
shared_flag='-shared'
5723
if test "$aix_use_runtimelinking" = yes; then
5724
shared_flag="$shared_flag "'${wl}-G'
5728
if test "$host_cpu" = ia64; then
5729
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5730
# chokes on -Wl,-G. The following line is correct:
5733
if test "$aix_use_runtimelinking" = yes; then
5734
shared_flag='${wl}-G'
5736
shared_flag='${wl}-bM:SRE'
5741
# It seems that -bexpall does not export symbols beginning with
5742
# underscore (_), so it is better to generate a list of symbols to export.
5743
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5744
if test "$aix_use_runtimelinking" = yes; then
5745
# Warning - without using the other runtime loading flags (-brtl),
5746
# -berok will link without error, but may produce a broken library.
5747
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5748
# Determine the default libpath from the value encoded in an empty executable.
5749
_LT_AC_SYS_LIBPATH_AIX
5750
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5751
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5753
if test "$host_cpu" = ia64; then
5754
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5755
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5756
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5758
# Determine the default libpath from the value encoded in an empty executable.
5759
_LT_AC_SYS_LIBPATH_AIX
5760
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5761
# Warning - without using the other run time loading flags,
5762
# -berok will link without error, but may produce a broken library.
5763
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5764
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5765
# Exported symbols can be pulled into shared objects from archives
5766
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5767
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5768
# This is similar to how AIX traditionally builds its shared libraries.
5769
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5775
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5776
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5777
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5778
# see comment about different semantics on the GNU ld section
5779
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5783
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5786
cygwin* | mingw* | pw32*)
5787
# When not using gcc, we currently assume that we are using
5788
# Microsoft Visual C++.
5789
# hardcode_libdir_flag_spec is actually meaningless, as there is
5790
# no search path for DLLs.
5791
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5792
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5793
# Tell ltmain to make .lib files, not .a files.
5795
# Tell ltmain to make .dll files, not .so files.
5797
# FIXME: Setting linknames here is a bad hack.
5798
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5799
# The linker will automatically build a .lib file if we build a DLL.
5800
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5801
# FIXME: Should let the user specify the lib program.
5802
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5803
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5804
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5807
darwin* | rhapsody*)
5809
rhapsody* | darwin1.[[012]])
5810
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5813
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5814
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5816
case ${MACOSX_DEPLOYMENT_TARGET} in
5818
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5821
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5827
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5828
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5829
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5830
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5831
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5832
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5833
if test "$GCC" = yes ; then
5834
output_verbose_link_cmd='echo'
5835
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5836
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5837
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5838
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5839
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5841
case $cc_basename in
5843
output_verbose_link_cmd='echo'
5844
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5845
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5846
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5847
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5848
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5851
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5858
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5860
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5864
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5867
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5868
# support. Future versions do this automatically, but an explicit c++rt0.o
5869
# does not break anything, and helps significantly (at the cost of a little
5872
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5873
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5874
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5875
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5878
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5880
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5881
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5882
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5883
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5886
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5887
freebsd* | kfreebsd*-gnu | dragonfly*)
5888
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5889
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5890
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5891
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5895
if test "$GCC" = yes; then
5896
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5898
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5900
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5901
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5902
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5904
# hardcode_minus_L: Not really in the search PATH,
5905
# but as the default location of the library.
5906
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5907
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5911
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5912
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5914
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5916
if test "$with_gnu_ld" = no; then
5917
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5918
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5920
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5921
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5923
# hardcode_minus_L: Not really in the search PATH,
5924
# but as the default location of the library.
5925
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5930
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5933
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5936
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5939
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5945
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5948
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5951
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5955
if test "$with_gnu_ld" = no; then
5956
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5957
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5961
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5962
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5963
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5966
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5967
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5969
# hardcode_minus_L: Not really in the search PATH,
5970
# but as the default location of the library.
5971
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5977
irix5* | irix6* | nonstopux*)
5978
if test "$GCC" = yes; then
5979
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5981
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5982
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5984
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5985
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5986
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5990
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5991
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5993
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5995
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5996
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5997
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6001
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6004
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6005
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6009
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6010
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6011
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6012
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6013
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6014
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6015
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6018
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6019
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6020
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6023
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6024
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6031
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6032
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6033
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6034
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6035
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6039
if test "$GCC" = yes; then
6040
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6041
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6043
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6044
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6046
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6047
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6050
osf4* | osf5*) # as osf3* with the addition of -msym flag
6051
if test "$GCC" = yes; then
6052
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6053
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6054
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6056
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6057
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6058
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6059
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6061
# Both c and cxx compiler support -rpath directly
6062
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6064
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6068
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6069
if test "$GCC" = yes; then
6071
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6072
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6073
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6076
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6077
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6078
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6080
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6081
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6083
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6085
# The compiler driver will combine linker options so we
6086
# cannot just pass the convience library names through
6087
# without $wl, iff we do not link with $LD.
6088
# Luckily, gcc supports the same syntax we need for Sun Studio.
6089
# Supported since Solaris 2.6 (maybe 2.5.1?)
6092
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6094
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6097
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6101
if test "x$host_vendor" = xsequent; then
6102
# Use $CC to link under sequent, because it throws in some extra .o
6103
# files that make .init and .fini sections work.
6104
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6106
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6108
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6109
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6110
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6111
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6115
case $host_vendor in
6117
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6118
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6121
## LD is ld it makes a PLAMLIB
6122
## CC just makes a GrossModule.
6123
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6124
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6125
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6128
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6129
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6132
runpath_var='LD_RUN_PATH'
6133
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6137
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6139
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6143
if test -d /usr/nec; then
6144
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6146
runpath_var=LD_RUN_PATH
6147
hardcode_runpath_var=yes
6148
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6152
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6153
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6154
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6155
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6156
runpath_var='LD_RUN_PATH'
6158
if test "$GCC" = yes; then
6159
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6160
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6162
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6163
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6167
sysv5* | sco3.2v5* | sco5v6*)
6168
# Note: We can NOT use -z defs as we might desire, because we do not
6169
# link with -lc, and that would cause any symbols used from libc to
6170
# always be unresolved, which means just about no library would
6171
# ever link correctly. If we're not using GNU ld we use -z text
6172
# though, which does catch some bad symbols but isn't as heavy-handed
6174
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6175
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6176
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6177
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6178
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6179
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6180
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6181
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6182
runpath_var='LD_RUN_PATH'
6184
if test "$GCC" = yes; then
6185
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6186
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6188
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6189
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6194
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6195
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6196
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6200
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6205
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6206
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6209
# Do we need to explicitly link libc?
6211
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6213
# Assume -lc should be added
6214
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6216
if test "$enable_shared" = yes && test "$GCC" = yes; then
6217
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6219
# FIXME: we may have to deal with multi-command sequences.
6222
# Test whether the compiler implicitly links with -lc since on some
6223
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6224
# to ld, don't add -lc before -lgcc.
6225
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6227
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6229
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6232
libobjs=conftest.$ac_objext
6234
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6235
pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6241
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6242
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6243
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6245
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6247
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6249
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6251
cat conftest.err 1>&5
6254
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6260
])# AC_LIBTOOL_PROG_LD_SHLIBS
6263
# _LT_AC_FILE_LTDLL_C
6264
# -------------------
6265
# Be careful that the start marker always follows a newline.
6266
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
2891
6267
# /* ltdll.c starts here */
2892
6268
# #define WIN32_LEAN_AND_MEAN
2893
6269
# #include <windows.h>
2923
6299
# /* ltdll.c ends here */
2924
# This is a source program that is used to create import libraries
2925
# on Windows for dlls which lack them. Don't remove nor modify the
2926
# starting and closing comments
2927
# /* impgen.c starts here */
2928
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2930
# This file is part of GNU libtool.
2932
# This program is free software; you can redistribute it and/or modify
2933
# it under the terms of the GNU General Public License as published by
2934
# the Free Software Foundation; either version 2 of the License, or
2935
# (at your option) any later version.
2937
# This program is distributed in the hope that it will be useful,
2938
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2939
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2940
# GNU General Public License for more details.
2942
# You should have received a copy of the GNU General Public License
2943
# along with this program; if not, write to the Free Software
2944
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2947
# #include <stdio.h> /* for printf() */
2948
# #include <unistd.h> /* for open(), lseek(), read() */
2949
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2950
# #include <string.h> /* for strdup() */
2952
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
2954
# #define O_BINARY 0
2957
# static unsigned int
2958
# pe_get16 (fd, offset)
2962
# unsigned char b[2];
2963
# lseek (fd, offset, SEEK_SET);
2965
# return b[0] + (b[1]<<8);
2968
# static unsigned int
2969
# pe_get32 (fd, offset)
2973
# unsigned char b[4];
2974
# lseek (fd, offset, SEEK_SET);
2976
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2979
# static unsigned int
2983
# unsigned char *b = ptr;
2984
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2993
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2994
# unsigned long export_rva, export_size, nsections, secptr, expptr;
2995
# unsigned long name_rvas, nexp;
2996
# unsigned char *expdata, *erva;
2997
# char *filename, *dll_name;
2999
# filename = argv[1];
3001
# dll = open(filename, O_RDONLY|O_BINARY);
3005
# dll_name = filename;
3007
# for (i=0; filename[i]; i++)
3008
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3009
# dll_name = filename + i +1;
3011
# pe_header_offset = pe_get32 (dll, 0x3c);
3012
# opthdr_ofs = pe_header_offset + 4 + 20;
3013
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3015
# if (num_entries < 1) /* no exports */
3018
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3019
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3020
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3021
# secptr = (pe_header_offset + 4 + 20 +
3022
# pe_get16 (dll, pe_header_offset + 4 + 16));
3025
# for (i = 0; i < nsections; i++)
3028
# unsigned long secptr1 = secptr + 40 * i;
3029
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3030
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3031
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3032
# lseek(dll, secptr1, SEEK_SET);
3033
# read(dll, sname, 8);
3034
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3036
# expptr = fptr + (export_rva - vaddr);
3037
# if (export_rva + export_size > vaddr + vsize)
3038
# export_size = vsize - (export_rva - vaddr);
3043
# expdata = (unsigned char*)malloc(export_size);
3044
# lseek (dll, expptr, SEEK_SET);
3045
# read (dll, expdata, export_size);
3046
# erva = expdata - export_rva;
3048
# nexp = pe_as32 (expdata+24);
3049
# name_rvas = pe_as32 (expdata+32);
3051
# printf ("EXPORTS\n");
3052
# for (i = 0; i<nexp; i++)
3054
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3055
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3060
# /* impgen.c ends here */
3066
# We use sed instead of cat because bash on DJGPP gets confused if
3067
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3068
# text mode, it properly converts lines to CR/LF. This bash problem
3069
# is reportedly fixed, but why not run on old versions too?
3070
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3072
mv -f "${ofile}T" "$ofile" || \
3073
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3077
])# _LT_AC_LTCONFIG_HACK
3079
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3080
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3082
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3083
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3085
# AC_ENABLE_SHARED - implement the --enable-shared flag
3086
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3087
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3089
AC_DEFUN([AC_ENABLE_SHARED],
3090
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3091
AC_ARG_ENABLE(shared,
3092
changequote(<<, >>)dnl
3093
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3094
changequote([, ])dnl
3095
[p=${PACKAGE-default}
3097
yes) enable_shared=yes ;;
3098
no) enable_shared=no ;;
3101
# Look at the argument we got. We use all the common list separators.
3102
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3103
for pkg in $enableval; do
3104
if test "X$pkg" = "X$p"; then
3111
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3114
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3115
AC_DEFUN([AC_DISABLE_SHARED],
3116
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3117
AC_ENABLE_SHARED(no)])
3119
# AC_ENABLE_STATIC - implement the --enable-static flag
3120
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3121
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3123
AC_DEFUN([AC_ENABLE_STATIC],
3124
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3125
AC_ARG_ENABLE(static,
3126
changequote(<<, >>)dnl
3127
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3128
changequote([, ])dnl
3129
[p=${PACKAGE-default}
3131
yes) enable_static=yes ;;
3132
no) enable_static=no ;;
3135
# Look at the argument we got. We use all the common list separators.
3136
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3137
for pkg in $enableval; do
3138
if test "X$pkg" = "X$p"; then
3145
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3148
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3149
AC_DEFUN([AC_DISABLE_STATIC],
3150
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3151
AC_ENABLE_STATIC(no)])
3154
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3155
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3156
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3158
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3159
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3160
AC_ARG_ENABLE(fast-install,
3161
changequote(<<, >>)dnl
3162
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3163
changequote([, ])dnl
3164
[p=${PACKAGE-default}
3166
yes) enable_fast_install=yes ;;
3167
no) enable_fast_install=no ;;
3169
enable_fast_install=no
3170
# Look at the argument we got. We use all the common list separators.
3171
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3172
for pkg in $enableval; do
3173
if test "X$pkg" = "X$p"; then
3174
enable_fast_install=yes
3180
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3183
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3184
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3185
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3186
AC_ENABLE_FAST_INSTALL(no)])
3188
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3189
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3190
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3192
AC_DEFUN([AC_LIBTOOL_PICMODE],
3193
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3194
pic_mode=ifelse($#,1,$1,default)])
3197
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3198
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3199
[AC_MSG_CHECKING([for $1])
3200
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3203
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3206
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3209
ac_save_MAGIC_CMD="$MAGIC_CMD"
3210
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3211
dnl $ac_dummy forces splitting on constant user-supplied paths.
3212
dnl POSIX.2 word splitting is done only on the output of word expansions,
3213
dnl not every word. This closes a longstanding sh security hole.
3214
ac_dummy="ifelse([$2], , $PATH, [$2])"
3215
for ac_dir in $ac_dummy; do
3216
test -z "$ac_dir" && ac_dir=.
3217
if test -f $ac_dir/$1; then
3218
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3219
if test -n "$file_magic_test_file"; then
3220
case $deplibs_check_method in
3222
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3223
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3224
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3225
egrep "$file_magic_regex" > /dev/null; then
3230
*** Warning: the command libtool uses to detect shared libraries,
3231
*** $file_magic_cmd, produces output that libtool cannot recognize.
3232
*** The result is that libtool may fail to recognize shared libraries
3233
*** as such. This will affect the creation of libtool libraries that
3234
*** depend on shared libraries, but programs linked with such libtool
3235
*** libraries will work regardless of this problem. Nevertheless, you
3236
*** may want to report the problem to your system manager and/or to
3237
*** bug-libtool@gnu.org
3247
MAGIC_CMD="$ac_save_MAGIC_CMD"
3250
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3251
if test -n "$MAGIC_CMD"; then
3252
AC_MSG_RESULT($MAGIC_CMD)
3259
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3260
AC_DEFUN([AC_PATH_MAGIC],
3261
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3262
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3263
if test -z "$lt_cv_path_MAGIC_CMD"; then
3264
if test -n "$ac_tool_prefix"; then
3265
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3273
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3274
AC_DEFUN([AC_PROG_LD],
3275
[AC_ARG_WITH(gnu-ld,
3276
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3277
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3278
AC_REQUIRE([AC_PROG_CC])dnl
3279
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3280
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3281
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3283
if test "$GCC" = yes; then
3284
# Check if gcc -print-prog-name=ld gives a path.
3285
AC_MSG_CHECKING([for ld used by GCC])
3288
# gcc leaves a trailing carriage return which upsets mingw
3289
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3291
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3294
# Accept absolute paths.
3295
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3296
re_direlt='/[[^/]][[^/]]*/\.\./'
3297
# Canonicalize the path of ld
3298
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3299
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3300
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3302
test -z "$LD" && LD="$ac_prog"
3305
# If it fails, then pretend we aren't using GCC.
3309
# If it is relative, then search for the first ld in PATH.
3313
elif test "$with_gnu_ld" = yes; then
3314
AC_MSG_CHECKING([for GNU ld])
3316
AC_MSG_CHECKING([for non-GNU ld])
3318
AC_CACHE_VAL(lt_cv_path_LD,
3319
[if test -z "$LD"; then
3320
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3321
for ac_dir in $PATH; do
3322
test -z "$ac_dir" && ac_dir=.
3323
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3324
lt_cv_path_LD="$ac_dir/$ac_prog"
3325
# Check to see if the program is GNU ld. I'd rather use --version,
3326
# but apparently some GNU ld's only accept -v.
3327
# Break only if it was the GNU/non-GNU ld that we prefer.
3328
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3329
test "$with_gnu_ld" != no && break
3331
test "$with_gnu_ld" != yes && break
3337
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3340
if test -n "$LD"; then
3345
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3350
AC_DEFUN([AC_PROG_LD_GNU],
3351
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3352
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3353
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3354
lt_cv_prog_gnu_ld=yes
3356
lt_cv_prog_gnu_ld=no
3358
with_gnu_ld=$lt_cv_prog_gnu_ld
3361
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3362
# -- PORTME Some linkers may need a different reload flag.
3363
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3364
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3365
[lt_cv_ld_reload_flag='-r'])
3366
reload_flag=$lt_cv_ld_reload_flag
3367
test -n "$reload_flag" && reload_flag=" $reload_flag"
3370
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3371
# -- PORTME fill in with the dynamic library characteristics
3372
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3373
[AC_CACHE_CHECK([how to recognise dependent libraries],
3374
lt_cv_deplibs_check_method,
3375
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3376
lt_cv_file_magic_test_file=
3377
lt_cv_deplibs_check_method='unknown'
3378
# Need to set the preceding variable on all platforms that support
3379
# interlibrary dependencies.
3380
# 'none' -- dependencies not supported.
3381
# `unknown' -- same as none, but documents that we really don't know.
3382
# 'pass_all' -- all dependencies passed with no checks.
3383
# 'test_compile' -- check by making test program.
3384
# 'file_magic [[regex]]' -- check by looking for files in library path
3385
# which responds to the $file_magic_cmd with a given egrep regex.
3386
# If you have `file' or equivalent on your system and you're not sure
3387
# whether `pass_all' will *always* work, you probably want this one.
3391
lt_cv_deplibs_check_method=pass_all
3395
lt_cv_deplibs_check_method=pass_all
3399
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3400
lt_cv_file_magic_cmd='/usr/bin/file -L'
3401
lt_cv_file_magic_test_file=/shlib/libc.so
3404
cygwin* | mingw* | pw32*)
3405
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3406
lt_cv_file_magic_cmd='$OBJDUMP -f'
3409
darwin* | rhapsody*)
3410
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3411
lt_cv_file_magic_cmd='/usr/bin/file -L'
3413
rhapsody* | darwin1.[[012]])
3414
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3417
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3423
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3426
# Not sure whether the presence of OpenBSD here was a mistake.
3427
# Let's accept both of them until this is cleared up.
3428
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3429
lt_cv_file_magic_cmd=/usr/bin/file
3430
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3434
lt_cv_deplibs_check_method=pass_all
3439
lt_cv_deplibs_check_method=pass_all
3443
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3444
lt_cv_file_magic_cmd=/usr/bin/file
3445
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3448
irix5* | irix6* | nonstopux*)
3450
*-32|*"-32 ") libmagic=32-bit;;
3451
*-n32|*"-n32 ") libmagic=N32;;
3452
*-64|*"-64 ") libmagic=64-bit;;
3453
*) libmagic=never-match;;
3455
lt_cv_deplibs_check_method=pass_all
3458
# This must be Linux ELF.
3460
lt_cv_deplibs_check_method=pass_all
3464
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3465
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3467
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3472
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3473
lt_cv_file_magic_cmd=/usr/bin/file
3474
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3478
lt_cv_file_magic_cmd=/usr/bin/file
3479
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3480
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3481
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3483
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3487
osf3* | osf4* | osf5*)
3488
lt_cv_deplibs_check_method=pass_all
3492
lt_cv_deplibs_check_method=pass_all
3496
lt_cv_deplibs_check_method=pass_all
3499
sysv5uw[[78]]* | sysv4*uw2*)
3500
lt_cv_deplibs_check_method=pass_all
3503
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3504
case $host_vendor in
3506
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3507
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3510
lt_cv_deplibs_check_method=pass_all
3513
lt_cv_file_magic_cmd='/bin/file'
3514
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3517
lt_cv_file_magic_cmd='/bin/file'
3518
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3519
lt_cv_file_magic_test_file=/lib/libc.so
3522
lt_cv_deplibs_check_method=pass_all
3528
file_magic_cmd=$lt_cv_file_magic_cmd
3529
deplibs_check_method=$lt_cv_deplibs_check_method
3533
# AC_PROG_NM - find the path to a BSD-compatible name lister
3534
AC_DEFUN([AC_PROG_NM],
3535
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3536
AC_MSG_CHECKING([for BSD-compatible nm])
3537
AC_CACHE_VAL(lt_cv_path_NM,
3538
[if test -n "$NM"; then
3539
# Let the user override the test.
3542
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3543
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3544
test -z "$ac_dir" && ac_dir=.
3545
tmp_nm=$ac_dir/${ac_tool_prefix}nm
3546
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3547
# Check to see if the nm accepts a BSD-compat flag.
3548
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3549
# nm: unknown option "B" ignored
3550
# Tru64's nm complains that /dev/null is an invalid object file
3551
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3552
lt_cv_path_NM="$tmp_nm -B"
3554
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3555
lt_cv_path_NM="$tmp_nm -p"
3558
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3559
continue # so that we can try to find one that supports BSD flags
3564
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3567
AC_MSG_RESULT([$NM])
3570
# AC_CHECK_LIBM - check for math library
3571
AC_DEFUN([AC_CHECK_LIBM],
3572
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3575
*-*-beos* | *-*-cygwin* | *-*-pw32*)
3576
# These system don't have libm
3579
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3580
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3583
AC_CHECK_LIB(m, main, LIBM="-lm")
3588
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3589
# the libltdl convenience library and LTDLINCL to the include flags for
3590
# the libltdl header and adds --enable-ltdl-convenience to the
3591
# configure arguments. Note that LIBLTDL and LTDLINCL are not
3592
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3593
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3594
# with '${top_builddir}/' and LTDLINCL will be prefixed with
3595
# '${top_srcdir}/' (note the single quotes!). If your package is not
3596
# flat and you're not using automake, define top_builddir and
3597
# top_srcdir appropriately in the Makefiles.
3598
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3599
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3600
case $enable_ltdl_convenience in
3601
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3602
"") enable_ltdl_convenience=yes
3603
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3605
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3606
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3607
# For backwards non-gettext consistent compatibility...
3611
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3612
# the libltdl installable library and LTDLINCL to the include flags for
3613
# the libltdl header and adds --enable-ltdl-install to the configure
3614
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3615
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3616
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3617
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3618
# with '${top_srcdir}/' (note the single quotes!). If your package is
3619
# not flat and you're not using automake, define top_builddir and
3620
# top_srcdir appropriately in the Makefiles.
3621
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3622
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3623
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3624
AC_CHECK_LIB(ltdl, main,
3625
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3626
[if test x"$enable_ltdl_install" = xno; then
3627
AC_MSG_WARN([libltdl not installed, but installation disabled])
3629
enable_ltdl_install=yes
3632
if test x"$enable_ltdl_install" = x"yes"; then
3633
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3634
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3635
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3637
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3641
# For backwards non-gettext consistent compatibility...
6300
])# _LT_AC_FILE_LTDLL_C
6303
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6304
# ---------------------------------
6305
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
3646
6309
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3667
6340
AC_CACHE_VAL(lt_cv_path_SED,
3668
6341
[# Loop through the user's path and test for sed and gsed.
3669
6342
# Then use that list of sed's as ones to test for truncation.
3670
as_executable_p="test -f"
3671
6343
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672
6344
for as_dir in $PATH
3674
6346
IFS=$as_save_IFS
3675
6347
test -z "$as_dir" && as_dir=.
3676
for ac_prog in sed gsed; do
6348
for lt_ac_prog in sed gsed; do
3677
6349
for ac_exec_ext in '' $ac_executable_extensions; do
3678
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3679
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
6350
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6351
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
3685
# Create a temporary directory, and hook for its removal unless debugging.
3688
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3689
trap '{ (exit 1); exit 1; }' 1 2 13 15
3692
# Create a (secure) tmp directory for tmp files.
3695
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3696
test -n "$tmp" && test -d "$tmp"
3699
tmp=$TMPDIR/sed$$-$RANDOM
3700
(umask 077 && mkdir $tmp)
3703
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3704
{ (exit 1); exit 1; }
3708
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
3709
# along with /bin/sed that truncates output.
3710
for _sed in $_sed_list /usr/xpg4/bin/sed; do
3711
test ! -f ${_sed} && break
3712
cat /dev/null > "$tmp/sed.in"
3714
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3715
# Check for GNU sed and select it if it is found.
3716
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3717
lt_cv_path_SED=${_sed}
6358
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6359
# along with /bin/sed that truncates output.
6360
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6361
test ! -f $lt_ac_sed && continue
6362
cat /dev/null > conftest.in
6364
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6365
# Check for GNU sed and select it if it is found.
6366
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6367
lt_cv_path_SED=$lt_ac_sed
6371
cat conftest.in conftest.in >conftest.tmp
6372
mv conftest.tmp conftest.in
6373
cp conftest.in conftest.nl
6375
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6376
cmp -s conftest.out conftest.nl || break
6377
# 10000 chars as input seems more than enough
6378
test $lt_ac_count -gt 10 && break
6379
lt_ac_count=`expr $lt_ac_count + 1`
6380
if test $lt_ac_count -gt $lt_ac_max; then
6381
lt_ac_max=$lt_ac_count
6382
lt_cv_path_SED=$lt_ac_sed
3721
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3722
mv "$tmp/sed.tmp" "$tmp/sed.in"
3723
cp "$tmp/sed.in" "$tmp/sed.nl"
3724
echo >>"$tmp/sed.nl"
3725
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3726
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3727
# 40000 chars as input seems more than enough
3728
test $_count -gt 10 && break
3729
_count=`expr $_count + 1`
3730
if test $_count -gt $_max; then
3732
lt_cv_path_SED=$_sed
3738
if test "X$SED" != "X"; then
3743
6388
AC_MSG_RESULT([$SED])
3746
# serial 5 AC_LIB_LTDL
3751
# Clients of libltdl can use this macro to allow the installer to
3752
# choose between a shipped copy of the ltdl sources or a preinstalled
3753
# version of the library.
3754
AC_DEFUN([AC_WITH_LTDL],
3755
[AC_REQUIRE([AC_LIB_LTDL])
3759
# Unless the user asks us to check, assume no installed ltdl exists.
3760
use_installed_libltdl=no
3762
AC_ARG_WITH([included_ltdl],
3763
[ --with-included-ltdl use the GNU ltdl sources included here])
3765
if test "x$with_included_ltdl" != xyes; then
3766
# We are not being forced to use the included libltdl sources, so
3767
# decide whether there is a useful installed version we can use.
3768
AC_CHECK_HEADER([ltdl.h],
3769
[AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
3770
[with_included_ltdl=no],
3771
[with_included_ltdl=yes])
3775
if test "x$enable_ltdl_install" != xyes; then
3776
# If the user did not specify an installable libltdl, then default
3777
# to a convenience lib.
3778
AC_LIBLTDL_CONVENIENCE
3781
if test "x$with_included_ltdl" = xno; then
3782
# If the included ltdl is not to be used. then Use the
3783
# preinstalled libltdl we found.
3784
AC_DEFINE([HAVE_LTDL], 1,
3785
[Define this if a modern libltdl is already installed])
3789
# Report our decision...
3790
AC_MSG_CHECKING([whether to use included libltdl])
3791
AC_MSG_RESULT([$with_included_ltdl])
3793
AC_CONFIG_SUBDIRS([libltdl])
3799
# Perform all the checks necessary for compilation of the ltdl objects
3800
# -- including compiler checks and header checks.
3801
AC_DEFUN([AC_LIB_LTDL],
3803
AC_REQUIRE([AC_PROG_CC])
3804
AC_REQUIRE([AC_C_CONST])
3805
AC_REQUIRE([AC_HEADER_STDC])
3806
AC_REQUIRE([AC_HEADER_DIRENT])
3807
AC_REQUIRE([AC_LIBTOOL_HEADER_ASSERT])
3808
AC_REQUIRE([_LT_AC_CHECK_DLFCN])
3809
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
3810
AC_REQUIRE([AC_LTDL_SHLIBEXT])
3811
AC_REQUIRE([AC_LTDL_SHLIBPATH])
3812
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
3813
AC_REQUIRE([AC_LTDL_OBJDIR])
3814
AC_REQUIRE([AC_LTDL_DLPREOPEN])
3815
AC_REQUIRE([AC_LTDL_DLLIB])
3816
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
3817
AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
3818
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
3819
AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
3821
AC_CHECK_HEADERS([errno.h malloc.h memory.h stdlib.h stdio.h ctype.h unistd.h])
3822
AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
3823
AC_CHECK_HEADERS([string.h strings.h], break)
3825
AC_CHECK_FUNCS([strchr index], break)
3826
AC_CHECK_FUNCS([strrchr rindex], break)
3827
AC_CHECK_FUNCS([memcpy bcopy], break)
3828
AC_CHECK_FUNCS([memmove strcmp])
3832
# AC_LTDL_ENABLE_INSTALL
3833
# ----------------------
3834
AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
3835
[AC_ARG_ENABLE(ltdl-install,
3836
[ --enable-ltdl-install install libltdl])
3838
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
3839
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
3840
])])# AC_LTDL_ENABLE_INSTALL
3842
# AC_LTDL_SYS_DLOPEN_DEPLIBS
3843
# --------------------------
3844
AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
3845
[AC_REQUIRE([AC_CANONICAL_HOST])
3846
AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
3847
libltdl_cv_sys_dlopen_deplibs, [dnl
3848
# PORTME does your system automatically load deplibs for dlopen()?
3849
libltdl_cv_sys_dlopen_deplibs=unknown
3852
libltdl_cv_sys_dlopen_deplibs=yes
3854
linux*|kfreebsd*-gnu*)
3855
libltdl_cv_sys_dlopen_deplibs=yes
3858
libltdl_cv_sys_dlopen_deplibs=yes
3861
libltdl_cv_sys_dlopen_deplibs=yes
3864
libltdl_cv_sys_dlopen_deplibs=yes
3868
if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
3869
AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1,
3870
[Define if the OS needs help to load dependent libraries for dlopen(). ])
3872
])# AC_LTDL_SYS_DLOPEN_DEPLIBS
3876
AC_DEFUN([AC_LTDL_SHLIBEXT],
3877
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3878
AC_CACHE_CHECK([which extension is used for shared libraries],
3879
libltdl_cv_shlibext,
3881
for ac_spec in $library_names_spec; do
3884
echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
3885
libltdl_cv_shlibext=`cat conftest`
3888
if test -n "$libltdl_cv_shlibext"; then
3889
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
3890
[Define to the extension used for shared libraries, say, ".so". ])
3892
])# AC_LTDL_SHLIBEXT
3896
AC_DEFUN([AC_LTDL_SHLIBPATH],
3897
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3898
AC_CACHE_CHECK([which variable specifies run-time library path],
3899
libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
3900
if test -n "$libltdl_cv_shlibpath_var"; then
3901
AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
3902
[Define to the name of the environment variable that determines the dynamic library search path. ])
3904
])# AC_LTDL_SHLIBPATH
3906
# AC_LTDL_SYSSEARCHPATH
3907
# ---------------------
3908
AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
3909
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3910
AC_CACHE_CHECK([for the default library search path],
3911
libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
3912
if test -n "$libltdl_cv_sys_search_path"; then
3914
*-*-mingw*) pathsep=";" ;;
3918
for dir in $libltdl_cv_sys_search_path; do
3919
if test -z "$sys_search_path"; then
3920
sys_search_path="$dir"
3922
sys_search_path="$sys_search_path$pathsep$dir"
3925
AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
3926
[Define to the system default library search path. ])
3928
])# AC_LTDL_SYSSEARCHPATH
3932
AC_DEFUN([AC_LTDL_OBJDIR],
3933
[AC_CACHE_CHECK([for objdir],
3934
libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
3935
if test -n "$objdir"; then
3938
rm -f .libs 2>/dev/null
3939
mkdir .libs 2>/dev/null
3940
if test -d .libs; then
3941
libltdl_cv_objdir=.libs
3943
# MS-DOS does not allow filenames that begin with a dot.
3944
libltdl_cv_objdir=_libs
3946
rmdir .libs 2>/dev/null
3948
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
3949
[Define to the sub-directory in which libtool stores uninstalled libraries. ])
3954
AC_DEFUN([AC_LTDL_DLPREOPEN],
3955
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3956
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
3957
libltdl_cv_preloaded_symbols, [dnl
3958
if test -n "$global_symbol_pipe"; then
3959
libltdl_cv_preloaded_symbols=yes
3961
libltdl_cv_preloaded_symbols=no
3964
if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
3965
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
3966
[Define if libtool can extract symbol lists from object files. ])
3968
])# AC_LTDL_DLPREOPEN
3972
AC_DEFUN([AC_LTDL_DLLIB],
3976
AC_CHECK_FUNC([shl_load],
3977
[AC_DEFINE([HAVE_SHL_LOAD], [1],
3978
[Define if you have the shl_load function.])],
3979
[AC_CHECK_LIB([dld], [shl_load],
3980
[AC_DEFINE([HAVE_SHL_LOAD], [1],
3981
[Define if you have the shl_load function.])
3982
LIBADD_DL="$LIBADD_DL -ldld"],
3983
[AC_CHECK_LIB([dl], [dlopen],
3984
[AC_DEFINE([HAVE_LIBDL], [1],
3985
[Define if you have the libdl library or equivalent.])
3987
[AC_TRY_LINK([#if HAVE_DLFCN_H
3992
[AC_DEFINE([HAVE_LIBDL], [1],
3993
[Define if you have the libdl library or equivalent.])],
3994
[AC_CHECK_LIB([svld], [dlopen],
3995
[AC_DEFINE([HAVE_LIBDL], [1],
3996
[Define if you have the libdl library or equivalent.])
3997
LIBADD_DL="-lsvld"],
3998
[AC_CHECK_LIB([dld], [dld_link],
3999
[AC_DEFINE([HAVE_DLD], [1],
4000
[Define if you have the GNU dld library.])
4001
LIBADD_DL="$LIBADD_DL -ldld"
4009
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
4011
LIBS="$LIBS $LIBADD_DL"
4012
AC_CHECK_FUNCS(dlerror)
4017
# AC_LTDL_SYMBOL_USCORE
4018
# ---------------------
4019
AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
4020
[dnl does the compiler prefix global symbols with an underscore?
4021
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
4022
AC_MSG_CHECKING([for _ prefix in compiled symbols])
4023
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
4024
[ac_cv_sys_symbol_underscore=no
4025
cat > conftest.$ac_ext <<EOF
4026
void nm_test_func(){}
4027
int main(){nm_test_func;return 0;}
4029
if AC_TRY_EVAL(ac_compile); then
4030
# Now try to grab the symbols.
4031
ac_nlist=conftest.nm
4032
if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
4033
# See whether the symbols have a leading underscore.
4034
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
4035
ac_cv_sys_symbol_underscore=yes
4037
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
4040
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
4044
echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
4047
echo "configure: failed program was:" >&AC_FD_CC
4048
cat conftest.c >&AC_FD_CC
4052
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
4053
])# AC_LTDL_SYMBOL_USCORE
4056
# AC_LTDL_DLSYM_USCORE
4057
# --------------------
4058
AC_DEFUN([AC_LTDL_DLSYM_USCORE],
4059
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
4060
if test x"$ac_cv_sys_symbol_underscore" = xyes; then
4061
if test x"$ac_cv_func_dlopen" = xyes ||
4062
test x"$ac_cv_lib_dl_dlopen" = xyes ; then
4063
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
4064
libltdl_cv_need_uscore, [dnl
4065
libltdl_cv_need_uscore=unknown
4067
LIBS="$LIBS $LIBADD_DL"
4068
_LT_AC_TRY_DLOPEN_SELF(
4069
libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
4070
[], libltdl_cv_need_uscore=cross)
4076
if test x"$libltdl_cv_need_uscore" = xyes; then
4077
AC_DEFINE(NEED_USCORE, 1,
4078
[Define if dlsym() requires a leading underscore in symbol names. ])
4080
])# AC_LTDL_DLSYM_USCORE
4083
# AC_CHECK_TYPES(TYPES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
4085
# ---------------------------------------------------------------
4086
# This macro did not exist in Autoconf 2.13, which we do still support
4087
ifdef([AC_CHECK_TYPES], [],
4088
[define([AC_CHECK_TYPES],
4089
[AC_CACHE_CHECK([for $1], ac_Type,
4097
if test "x$ac_Type" = xyes; then
4098
ifelse([$2], [], [:], [$2])
4100
ifelse([$3], [], [:], [$3])
4107
AC_DEFUN([AC_LTDL_FUNC_ARGZ],
4108
[AC_CHECK_HEADERS([argz.h])
4110
AC_CHECK_TYPES([error_t],
4112
[AC_DEFINE([error_t], [int],
4113
[Define to a type to use for \`error_t' if it is not otherwise available.])],
4118
AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
4119
])# AC_LTDL_FUNC_ARGZ
4121
AC_DEFUN([AC_CC_CAN_INT64],
4122
[AC_MSG_CHECKING(whether CC thinks type $GGI_64 is a fully working 64-bit int)
4123
AC_TRY_LINK([#include <stdio.h>],[
4124
unsigned $GGI_64 u64;
4126
u64 = 0x123456789abcdef0 ;
4127
u64 <<= 1; printf("%llx", u64);
4128
u64 *= 17; printf("%llx", u64);
4129
u64 += 300; printf("%llx", u64);
4130
u64 -= 300; printf("%llx", u64);
4131
u64 /= 17; printf("%%llx", u64);
4132
u64 ^= 0xfefefefefefefefe; printf("%llx", u64);
4133
u64 %= 3; printf("%%llx", u64);
4134
s64 = -0x123456789abcdef0;
4135
s64 <<= 1; printf("%llx", s64);
4136
s64 *= 17; printf("%llx", s64);
4137
s64 += 300; printf("%llx", s64);
4138
s64 -= 300; printf("%llx", s64);
4139
s64 /= 17; printf("%%llx", s64);
4140
s64 ^= 0xfefefefefefefefe; printf("%llx", s64);
4141
s64 %= 3; printf("%%llx", s64);
4142
s64 *= u64; printf("%%llx", s64);
4144
[ AC_MSG_RESULT(yes)
4145
ac_cc_can_int64="yes" ],
4146
[ AC_MSG_RESULT(nope)
4147
ac_cc_can_int64="no" ])
4150
AC_DEFUN([AC_CC_CAN_CPUID],
4151
[AC_CACHE_CHECK(whether CC can assemble cpuid instruction, ac_cc_can_cpuid,
4152
[ AC_TRY_LINK(,[unsigned long a,b,c,d,in;
4153
asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in));
4155
ac_cc_can_cpuid="yes", ac_cc_can_cpuid="no")])
4156
if test "x$ac_cc_can_cpuid" = "xyes"; then
4157
AC_DEFINE(CC_CAN_CPUID)
4161
AC_DEFUN([AC_CC_CAN_AMASK],
4162
[AC_CACHE_CHECK(whether CC can assemble amask instruction, ac_cc_can_amask,
4163
[ AC_TRY_LINK(,[unsigned long a,b;
4164
asm("amask %1, %0": "=r" (a) : "ri" (b));
4166
ac_cc_can_amask="yes", ac_cc_can_amask="no")])
4167
if test "x$ac_cc_can_amask" = "xyes"; then
4168
AC_DEFINE(CC_CAN_AMASK)
4171
dnl AC_CHECK_WINFUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
4172
AC_DEFUN(AC_CHECK_WINFUNC,
4174
AC_MSG_CHECKING([for $1 (winfunc)])
4175
if eval "test \"`echo 'x$ac_cv_func_'$1`\" = xno"; then
4176
eval "unset ac_cv_func_$1"
4178
AC_CACHE_VAL(ac_cv_func_$1,
4181
#include <windows.h>
4182
]ifelse(test, test, [#ifdef __cplusplus
4188
void *foopointer = NULL;
4190
], eval "ac_cv_func_$1=yes", AC_TRY_LINK([
4192
#include <windows.h>
4193
]ifelse(test, test, [#ifdef __cplusplus
4200
], eval "ac_cv_func_$1=yes", AC_TRY_LINK([
4202
#include <windows.h>
4203
]ifelse(test, test, [#ifdef __cplusplus
4211
], eval "ac_cv_func_$1=yes", AC_TRY_LINK([
4213
#include <windows.h>
4214
]ifelse(test, test, [#ifdef __cplusplus
4220
void *foopointer = NULL;
4221
$1(foopointer,foopointer);
4222
], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no"))))])
4223
if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
4225
ifelse([$2], , :, [$2])
4228
ifelse([$3], , , [$3
4233
dnl AC_CHECK_WINFUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
4234
AC_DEFUN(AC_CHECK_WINFUNCS,
4235
[AC_CHECK_FUNCS([$1],[$2],[$3])
4236
if test "x$ac_cv_header_windows_h" = "xyes"; then
4239
AC_CHECK_WINFUNC($ac_func,
4241
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4242
changequote([, ])dnl
4243
AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
4248
# AM_CONDITIONAL -*- Autoconf -*-
4250
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
4252
# This program is free software; you can redistribute it and/or modify
4253
# it under the terms of the GNU General Public License as published by
4254
# the Free Software Foundation; either version 2, or (at your option)
4255
# any later version.
4257
# This program is distributed in the hope that it will be useful,
4258
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4259
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4260
# GNU General Public License for more details.
4262
# You should have received a copy of the GNU General Public License
4263
# along with this program; if not, write to the Free Software
4264
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4271
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
4272
# -------------------------------------
4273
# Define a conditional.
4274
AC_DEFUN([AM_CONDITIONAL],
4275
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
4276
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
4278
AC_SUBST([$1_FALSE])
4286
AC_CONFIG_COMMANDS_PRE(
4287
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
4288
AC_MSG_ERROR([conditional "$1" was never defined.
4289
Usually this means the macro was only invoked conditionally.])
4292
# Do all the work for Automake. -*- Autoconf -*-
4294
# This macro actually does too much some checks are only needed if
4295
# your package does certain things. But this isn't really a big deal.
4297
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4298
# Free Software Foundation, Inc.
4300
# This program is free software; you can redistribute it and/or modify
4301
# it under the terms of the GNU General Public License as published by
4302
# the Free Software Foundation; either version 2, or (at your option)
4303
# any later version.
4305
# This program is distributed in the hope that it will be useful,
4306
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4307
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4308
# GNU General Public License for more details.
4310
# You should have received a copy of the GNU General Public License
4311
# along with this program; if not, write to the Free Software
4312
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4319
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
4320
# the ones we care about.
4321
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4323
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4324
# AM_INIT_AUTOMAKE([OPTIONS])
4325
# -----------------------------------------------
4326
# The call with PACKAGE and VERSION arguments is the old style
4327
# call (pre autoconf-2.50), which is being phased out. PACKAGE
4328
# and VERSION should now be passed to AC_INIT and removed from
4329
# the call to AM_INIT_AUTOMAKE.
4330
# We support both call styles for the transition. After
4331
# the next Automake release, Autoconf can make the AC_INIT
4332
# arguments mandatory, and then we can depend on a new Autoconf
4333
# release and drop the old call support.
4334
AC_DEFUN([AM_INIT_AUTOMAKE],
4335
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4336
AC_REQUIRE([AC_PROG_INSTALL])dnl
4337
# test to see if srcdir already configured
4338
if test "`cd $srcdir && pwd`" != "`pwd`" &&
4339
test -f $srcdir/config.status; then
4340
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4343
# test whether we have cygpath
4344
if test -z "$CYGPATH_W"; then
4345
if (cygpath --version) >/dev/null 2>/dev/null; then
4346
CYGPATH_W='cygpath -w'
4351
AC_SUBST([CYGPATH_W])
4353
# Define the identity of the package.
4354
dnl Distinguish between old-style and new-style calls.
4356
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4357
AC_SUBST([PACKAGE], [$1])dnl
4358
AC_SUBST([VERSION], [$2])],
4359
[_AM_SET_OPTIONS([$1])dnl
4360
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4361
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4363
_AM_IF_OPTION([no-define],,
4364
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4365
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4367
# Some tools Automake needs.
4368
AC_REQUIRE([AM_SANITY_CHECK])dnl
4369
AC_REQUIRE([AC_ARG_PROGRAM])dnl
4370
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4371
AM_MISSING_PROG(AUTOCONF, autoconf)
4372
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4373
AM_MISSING_PROG(AUTOHEADER, autoheader)
4374
AM_MISSING_PROG(MAKEINFO, makeinfo)
4375
AM_MISSING_PROG(AMTAR, tar)
4377
AM_PROG_INSTALL_STRIP
4378
# We need awk for the "check" target. The system "awk" is bad on
4380
AC_REQUIRE([AC_PROG_AWK])dnl
4381
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4382
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
4384
_AM_IF_OPTION([no-dependencies],,
4385
[AC_PROVIDE_IFELSE([AC_PROG_CC],
4386
[_AM_DEPENDENCIES(CC)],
4387
[define([AC_PROG_CC],
4388
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
4389
AC_PROVIDE_IFELSE([AC_PROG_CXX],
4390
[_AM_DEPENDENCIES(CXX)],
4391
[define([AC_PROG_CXX],
4392
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
4397
# When config.status generates a header, we must update the stamp-h file.
4398
# This file resides in the same directory as the config header
4399
# that is generated. The stamp files are numbered to have different names.
4401
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
4402
# loop where config.status creates the headers, so we can generate
4403
# our stamp files there.
4404
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
4405
[# Compute $1's index in $config_headers.
4407
for _am_header in $config_headers :; do
4412
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
4415
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
4417
# Copyright 2002 Free Software Foundation, Inc.
4419
# This program is free software; you can redistribute it and/or modify
4420
# it under the terms of the GNU General Public License as published by
4421
# the Free Software Foundation; either version 2, or (at your option)
4422
# any later version.
4424
# This program is distributed in the hope that it will be useful,
4425
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4426
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4427
# GNU General Public License for more details.
4429
# You should have received a copy of the GNU General Public License
4430
# along with this program; if not, write to the Free Software
4431
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6391
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6393
# This file is free software; the Free Software Foundation
6394
# gives unlimited permission to copy and/or distribute it,
6395
# with or without modifications, as long as this notice is preserved.
4433
6397
# AM_AUTOMAKE_VERSION(VERSION)
4434
6398
# ----------------------------
4435
6399
# Automake X.Y traces this macro to ensure aclocal.m4 has been
4436
6400
# generated from the m4 files accompanying Automake X.Y.
4437
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
6401
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
4439
6403
# AM_SET_CURRENT_AUTOMAKE_VERSION
4440
6404
# -------------------------------
4441
6405
# Call AM_AUTOMAKE_VERSION so it can be traced.
4442
6406
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
4443
6407
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
4444
[AM_AUTOMAKE_VERSION([1.7.6])])
4446
# Helper functions for option handling. -*- Autoconf -*-
4448
# Copyright 2001, 2002 Free Software Foundation, Inc.
4450
# This program is free software; you can redistribute it and/or modify
4451
# it under the terms of the GNU General Public License as published by
4452
# the Free Software Foundation; either version 2, or (at your option)
4453
# any later version.
4455
# This program is distributed in the hope that it will be useful,
4456
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4457
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4458
# GNU General Public License for more details.
4460
# You should have received a copy of the GNU General Public License
4461
# along with this program; if not, write to the Free Software
4462
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4467
# _AM_MANGLE_OPTION(NAME)
4468
# -----------------------
4469
AC_DEFUN([_AM_MANGLE_OPTION],
4470
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
4472
# _AM_SET_OPTION(NAME)
4473
# ------------------------------
4474
# Set option NAME. Presently that only means defining a flag for this option.
4475
AC_DEFUN([_AM_SET_OPTION],
4476
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
4478
# _AM_SET_OPTIONS(OPTIONS)
4479
# ----------------------------------
4480
# OPTIONS is a space-separated list of Automake options.
4481
AC_DEFUN([_AM_SET_OPTIONS],
4482
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
4484
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
4485
# -------------------------------------------
4486
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
4487
AC_DEFUN([_AM_IF_OPTION],
4488
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
4491
# Check to make sure that the build environment is sane.
4494
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
4496
# This program is free software; you can redistribute it and/or modify
4497
# it under the terms of the GNU General Public License as published by
4498
# the Free Software Foundation; either version 2, or (at your option)
4499
# any later version.
4501
# This program is distributed in the hope that it will be useful,
4502
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4503
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4504
# GNU General Public License for more details.
4506
# You should have received a copy of the GNU General Public License
4507
# along with this program; if not, write to the Free Software
4508
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4515
AC_DEFUN([AM_SANITY_CHECK],
4516
[AC_MSG_CHECKING([whether build environment is sane])
4519
echo timestamp > conftest.file
4520
# Do `set' in a subshell so we don't clobber the current shell's
4521
# arguments. Must try -L first in case configure is actually a
4522
# symlink; some systems play weird games with the mod time of symlinks
4523
# (eg FreeBSD returns the mod time of the symlink's containing
4526
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
4527
if test "$[*]" = "X"; then
4529
set X `ls -t $srcdir/configure conftest.file`
4532
if test "$[*]" != "X $srcdir/configure conftest.file" \
4533
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
4535
# If neither matched, then we have a broken ls. This can happen
4536
# if, for instance, CONFIG_SHELL is bash and it inherits a
4537
# broken ls alias from the environment. This has actually
4538
# happened. Such a system could not be considered "sane".
4539
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4540
alias in your environment])
4543
test "$[2]" = conftest.file
4549
AC_MSG_ERROR([newly created file is older than distributed files!
4550
Check your system clock])
4552
AC_MSG_RESULT(yes)])
4557
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
4559
# This program is free software; you can redistribute it and/or modify
4560
# it under the terms of the GNU General Public License as published by
4561
# the Free Software Foundation; either version 2, or (at your option)
4562
# any later version.
4564
# This program is distributed in the hope that it will be useful,
4565
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4566
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4567
# GNU General Public License for more details.
4569
# You should have received a copy of the GNU General Public License
4570
# along with this program; if not, write to the Free Software
4571
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4576
# AM_MISSING_PROG(NAME, PROGRAM)
4577
# ------------------------------
4578
AC_DEFUN([AM_MISSING_PROG],
4579
[AC_REQUIRE([AM_MISSING_HAS_RUN])
4580
$1=${$1-"${am_missing_run}$2"}
4584
# AM_MISSING_HAS_RUN
4585
# ------------------
4586
# Define MISSING if not defined so far and test if it supports --run.
4587
# If it does, set am_missing_run to use it, otherwise, to nothing.
4588
AC_DEFUN([AM_MISSING_HAS_RUN],
4589
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4590
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
4591
# Use eval to expand $SHELL
4592
if eval "$MISSING --run true"; then
4593
am_missing_run="$MISSING --run "
4596
AC_MSG_WARN([`missing' script is too old or missing])
4602
# Copyright 2001 Free Software Foundation, Inc.
4604
# This program is free software; you can redistribute it and/or modify
4605
# it under the terms of the GNU General Public License as published by
4606
# the Free Software Foundation; either version 2, or (at your option)
4607
# any later version.
4609
# This program is distributed in the hope that it will be useful,
4610
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4611
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4612
# GNU General Public License for more details.
4614
# You should have received a copy of the GNU General Public License
4615
# along with this program; if not, write to the Free Software
4616
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6408
[AM_AUTOMAKE_VERSION([1.9.6])])
6410
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
6412
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6414
# This file is free software; the Free Software Foundation
6415
# gives unlimited permission to copy and/or distribute it,
6416
# with or without modifications, as long as this notice is preserved.
4619
6418
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
4620
6419
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to