1342
1113
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1343
1114
AC_MSG_RESULT([$hard_links])
1344
1115
if test "$hard_links" = no; then
1345
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1116
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1346
1117
need_locks=warn
1354
## FIXME: this should be a separate macro
1356
if test "$GCC" = yes; then
1357
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1358
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1359
echo "int some_variable = 0;" > conftest.$ac_ext
1360
save_CFLAGS="$CFLAGS"
1361
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1362
compiler_rtti_exceptions=no
1363
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1364
# The compiler can only warn and ignore the option if not recognized
1365
# So say no if there are warnings
1366
if test -s conftest.err; then
1367
compiler_rtti_exceptions=no
1369
compiler_rtti_exceptions=yes
1372
CFLAGS="$save_CFLAGS"
1373
AC_MSG_RESULT([$compiler_rtti_exceptions])
1375
if test "$compiler_rtti_exceptions" = "yes"; then
1376
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1378
no_builtin_flag=' -fno-builtin'
1384
## FIXME: this should be a separate macro
1386
# See if the linker supports building shared libraries.
1387
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1389
allow_undefined_flag=
1391
need_lib_prefix=unknown
1392
need_version=unknown
1393
# when you set need_version to no, make sure it does not cause -set_version
1394
# flags to be left without arguments
1396
archive_expsym_cmds=
1397
old_archive_from_new_cmds=
1398
old_archive_from_expsyms_cmds=
1399
export_dynamic_flag_spec=
1400
whole_archive_flag_spec=
1401
thread_safe_flag_spec=
1402
hardcode_into_libs=no
1403
hardcode_libdir_flag_spec=
1404
hardcode_libdir_separator=
1407
hardcode_shlibpath_var=unsupported
1409
link_all_deplibs=unknown
1410
always_export_symbols=no
1411
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1412
# include_expsyms should be a list of space-separated symbols to be *always*
1413
# included in the symbol list
1415
# exclude_expsyms can be an egrep regular expression of symbols to exclude
1416
# it will be wrapped by ` (' and `)$', so one must not match beginning or
1417
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1418
# as well as any symbol that contains `d'.
1419
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1420
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1421
# platforms (ab)use it in PIC code, but their linkers get confused if
1422
# the symbol is explicitly referenced. Since portable code cannot
1423
# rely on this symbol name, it's probably fine to never include it in
1424
# preloaded symbol tables.
1425
extract_expsyms_cmds=
1428
cygwin* | mingw* | pw32*)
1429
# FIXME: the MSVC++ port hasn't been tested in a loooong time
1430
# When not using gcc, we currently assume that we are using
1431
# Microsoft Visual C++.
1432
if test "$GCC" != yes; then
1442
if test "$with_gnu_ld" = yes; then
1443
# If archive_cmds runs LD, not CC, wlarc should be empty
1446
# See if GNU ld supports shared libraries.
1448
aix3* | aix4* | aix5*)
1449
# On AIX, the GNU linker is very broken
1450
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1454
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1455
*** to be unable to reliably create shared libraries on AIX.
1456
*** Therefore, libtool is disabling shared libraries support. If you
1457
*** really care for shared libraries, you may want to modify your PATH
1458
*** so that a non-GNU linker is found, and then restart.
1464
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)'
1465
hardcode_libdir_flag_spec='-L$libdir'
1466
hardcode_minus_L=yes
1468
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1469
# that the semantics of dynamic libraries on AmigaOS, at least up
1470
# to version 4, is to share data among multiple programs linked
1471
# with the same dynamic library. Since this doesn't match the
1472
# behavior of shared libraries on other platforms, we can use
1478
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1479
allow_undefined_flag=unsupported
1480
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1481
# support --undefined. This deserves some investigation. FIXME
1482
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1488
cygwin* | mingw* | pw32*)
1489
# hardcode_libdir_flag_spec is actually meaningless, as there is
1490
# no search path for DLLs.
1491
hardcode_libdir_flag_spec='-L$libdir'
1492
allow_undefined_flag=unsupported
1493
always_export_symbols=yes
1495
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1496
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1497
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1498
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1499
else $CC -o impgen impgen.c ; fi)~
1500
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1502
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1504
# cygwin and mingw dlls have different entry points and sets of symbols
1506
# FIXME: what about values for MSVC?
1507
dll_entry=__cygwin_dll_entry@12
1508
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1512
dll_entry=_DllMainCRTStartup@12
1513
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1517
# mingw and cygwin differ, and it's simplest to just exclude the union
1518
# of the two symbol sets.
1519
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1521
# recent cygwin and mingw systems supply a stub DllMain which the user
1522
# can override, but on older systems we have to supply one (in ltdll.c)
1523
if test "x$lt_cv_need_dllmain" = "xyes"; then
1524
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1525
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~
1526
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1532
# Extract the symbol export list from an `--export-all' def file,
1533
# then regenerate the def file from the symbol export list, so that
1534
# the compiled dll only exports the symbol export list.
1535
# Be careful not to strip the DATA tag left be newer dlltools.
1536
export_symbols_cmds="$ltdll_cmds"'
1537
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1538
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1540
# If the export-symbols file already is a .def file (1st line
1541
# is EXPORTS), use it as is.
1542
# If DATA tags from a recent dlltool are present, honour them!
1543
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1544
cp $export_symbols $output_objdir/$soname-def;
1546
echo EXPORTS > $output_objdir/$soname-def;
1548
cat $export_symbols | while read symbol; do
1551
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1552
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1553
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1555
_lt_hint=`expr 1 + \$_lt_hint`;
1559
$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~
1560
$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~
1561
$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~
1562
$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~
1563
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1567
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1568
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1571
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1572
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1577
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1581
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1582
*** create shared libraries on Solaris systems. Therefore, libtool
1583
*** is disabling shared libraries support. We urge you to upgrade GNU
1584
*** binutils to release 2.9.1 or newer. Another option is to modify
1585
*** your PATH or compiler configuration so that the native linker is
1586
*** used, and then restart.
1589
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1590
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1591
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1598
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1601
hardcode_shlibpath_var=no
1605
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1606
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1607
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1614
if test "$ld_shlibs" = yes; then
1615
runpath_var=LD_RUN_PATH
1616
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1617
export_dynamic_flag_spec='${wl}--export-dynamic'
1619
cygwin* | mingw* | pw32*)
1620
# dlltool doesn't understand --whole-archive et. al.
1621
whole_archive_flag_spec=
1624
# ancient GNU ld didn't support --whole-archive et. al.
1625
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1626
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1628
whole_archive_flag_spec=
1122
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1127
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1128
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1129
[rm -f .libs 2>/dev/null
1130
mkdir .libs 2>/dev/null
1131
if test -d .libs; then
1634
# PORTME fill in a description of your system's linker (not GNU ld)
1637
allow_undefined_flag=unsupported
1638
always_export_symbols=yes
1639
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'
1640
# Note: this linker hardcodes the directories in LIBPATH if there
1641
# are no directories specified by -L.
1642
hardcode_minus_L=yes
1643
if test "$GCC" = yes && test -z "$link_static_flag"; then
1644
# Neither direct hardcoding nor static linking is supported with a
1646
hardcode_direct=unsupported
1651
if test "$host_cpu" = ia64; then
1652
# On IA64, the linker does run time linking by default, so we don't
1653
# have to do anything special.
1654
aix_use_runtimelinking=no
1655
exp_sym_flag='-Bexport'
1658
aix_use_runtimelinking=no
1660
# Test if we are trying to use run time linking or normal
1661
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
1662
# need to do runtime linking.
1663
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1664
for ld_flag in $LDFLAGS; do
1667
aix_use_runtimelinking=yes
1674
exp_sym_flag='-bexport'
1675
no_entry_flag='-bnoentry'
1678
# When large executables or shared objects are built, AIX ld can
1679
# have problems creating the table of contents. If linking a library
1680
# or program results in "error TOC overflow" add -mminimal-toc to
1681
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1682
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1686
hardcode_libdir_separator=':'
1687
if test "$GCC" = yes; then
1688
case $host_os in aix4.[[012]]|aix4.[[012]].*)
1689
collect2name=`${CC} -print-prog-name=collect2`
1690
if test -f "$collect2name" && \
1691
strings "$collect2name" | grep resolve_lib_name >/dev/null
1693
# We have reworked collect2
1696
# We have old collect2
1697
hardcode_direct=unsupported
1698
# It fails to find uninstalled libraries when the uninstalled
1699
# path is not listed in the libpath. Setting hardcode_minus_L
1700
# to unsupported forces relinking
1701
hardcode_minus_L=yes
1702
hardcode_libdir_flag_spec='-L$libdir'
1703
hardcode_libdir_separator=
1707
shared_flag='-shared'
1710
if test "$host_cpu" = ia64; then
1711
shared_flag='${wl}-G'
1713
if test "$aix_use_runtimelinking" = yes; then
1714
shared_flag='${wl}-G'
1716
shared_flag='${wl}-bM:SRE'
1721
# It seems that -bexpall can do strange things, so it is better to
1722
# generate a list of symbols to export.
1723
always_export_symbols=yes
1724
if test "$aix_use_runtimelinking" = yes; then
1725
# Warning - without using the other runtime loading flags (-brtl),
1726
# -berok will link without error, but may produce a broken library.
1727
allow_undefined_flag='-berok'
1728
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1729
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"
1731
if test "$host_cpu" = ia64; then
1732
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1733
allow_undefined_flag="-z nodefs"
1734
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"
1736
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1737
# Warning - without using the other run time loading flags,
1738
# -berok will link without error, but may produce a broken library.
1739
allow_undefined_flag='${wl}-berok'
1740
# This is a bit strange, but is similar to how AIX traditionally builds
1741
# it's shared libraries.
1742
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 $objdir/$libname$release.a $objdir/$soname'
1748
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)'
1749
hardcode_libdir_flag_spec='-L$libdir'
1750
hardcode_minus_L=yes
1751
# see comment about different semantics on the GNU ld section
1755
cygwin* | mingw* | pw32*)
1756
# When not using gcc, we currently assume that we are using
1757
# Microsoft Visual C++.
1758
# hardcode_libdir_flag_spec is actually meaningless, as there is
1759
# no search path for DLLs.
1760
hardcode_libdir_flag_spec=' '
1761
allow_undefined_flag=unsupported
1762
# Tell ltmain to make .lib files, not .a files.
1764
# FIXME: Setting linknames here is a bad hack.
1765
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1766
# The linker will automatically build a .lib file if we build a DLL.
1767
old_archive_from_new_cmds='true'
1768
# FIXME: Should let the user specify the lib program.
1769
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1770
fix_srcfile_path='`cygpath -w "$srcfile"`'
1773
darwin* | rhapsody*)
1775
rhapsody* | darwin1.[[012]])
1776
allow_undefined_flag='-undefined suppress'
1779
allow_undefined_flag='-flat_namespace -undefined suppress'
1782
# FIXME: Relying on posixy $() will cause problems for
1783
# cross-compilation, but unfortunately the echo tests do not
1784
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
1785
# `"' quotes if we put them in here... so don't!
1786
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)'
1787
# We need to add '_' to the symbols in $export_symbols first
1788
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1790
hardcode_shlibpath_var=no
1791
whole_archive_flag_spec='-all_load $convenience'
1798
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1799
# support. Future versions do this automatically, but an explicit c++rt0.o
1800
# does not break anything, and helps significantly (at the cost of a little
1803
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1804
hardcode_libdir_flag_spec='-R$libdir'
1806
hardcode_shlibpath_var=no
1809
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
1811
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1813
hardcode_minus_L=yes
1814
hardcode_shlibpath_var=no
1817
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1819
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1820
hardcode_libdir_flag_spec='-R$libdir'
1822
hardcode_shlibpath_var=no
1825
hpux9* | hpux10* | hpux11*)
1827
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' ;;
1828
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1830
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1831
hardcode_libdir_separator=:
1833
hardcode_minus_L=yes # Not in the search PATH, but as the default
1834
# location of the library.
1835
export_dynamic_flag_spec='${wl}-E'
1838
irix5* | irix6* | nonstopux*)
1839
if test "$GCC" = yes; then
1840
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'
1841
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1843
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'
1844
hardcode_libdir_flag_spec='-rpath $libdir'
1846
hardcode_libdir_separator=:
1847
link_all_deplibs=yes
1851
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1852
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1854
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1856
hardcode_libdir_flag_spec='-R$libdir'
1858
hardcode_shlibpath_var=no
1862
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1864
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1865
hardcode_libdir_separator=:
1866
hardcode_shlibpath_var=no
1871
hardcode_shlibpath_var=no
1872
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1873
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1874
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1875
export_dynamic_flag_spec='${wl}-E'
1878
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1879
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1880
hardcode_libdir_flag_spec='-R$libdir'
1883
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1884
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1891
hardcode_libdir_flag_spec='-L$libdir'
1892
hardcode_minus_L=yes
1893
allow_undefined_flag=unsupported
1894
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'
1895
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1899
if test "$GCC" = yes; then
1900
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1901
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'
1903
allow_undefined_flag=' -expect_unresolved \*'
1904
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'
1906
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1907
hardcode_libdir_separator=:
1910
osf4* | osf5*) # as osf3* with the addition of -msym flag
1911
if test "$GCC" = yes; then
1912
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1913
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'
1914
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1916
allow_undefined_flag=' -expect_unresolved \*'
1917
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'
1918
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1919
$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'
1921
#Both c and cxx compiler support -rpath directly
1922
hardcode_libdir_flag_spec='-rpath $libdir'
1924
hardcode_libdir_separator=:
1928
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1929
hardcode_shlibpath_var=no
1930
runpath_var=LD_RUN_PATH
1931
hardcode_runpath_var=yes
1932
export_dynamic_flag_spec='${wl}-Bexport'
1936
# gcc --version < 3.0 without binutils cannot create self contained
1937
# shared libraries reliably, requiring libgcc.a to resolve some of
1938
# the object symbols generated in some cases. Libraries that use
1939
# assert need libgcc.a to resolve __eprintf, for example. Linking
1940
# a copy of libgcc.a into every shared library to guarantee resolving
1941
# such symbols causes other problems: According to Tim Van Holder
1942
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
1943
# (to the application) exception stack for one thing.
1944
no_undefined_flag=' -z defs'
1945
if test "$GCC" = yes; then
1946
case `$CC --version 2>/dev/null` in
1950
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
1951
*** create self contained shared libraries on Solaris systems, without
1952
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
1953
*** -no-undefined support, which will at least allow you to build shared
1954
*** libraries. However, you may find that when you link such libraries
1955
*** into an application without using GCC, you have to manually add
1956
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
1957
*** upgrade to a newer version of GCC. Another option is to rebuild your
1958
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
1965
# $CC -shared without GNU ld will not create a library from C++
1966
# object files and a static libstdc++, better avoid it by now
1967
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1968
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1969
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1970
hardcode_libdir_flag_spec='-R$libdir'
1971
hardcode_shlibpath_var=no
1973
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1974
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
1975
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1977
link_all_deplibs=yes
1981
if test "x$host_vendor" = xsequent; then
1982
# Use $CC to link under sequent, because it throws in some extra .o
1983
# files that make .init and .fini sections work.
1984
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1986
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1988
hardcode_libdir_flag_spec='-L$libdir'
1990
hardcode_minus_L=yes
1991
hardcode_shlibpath_var=no
1995
case $host_vendor in
1997
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1998
hardcode_direct=yes # is this really true???
2001
## LD is ld it makes a PLAMLIB
2002
## CC just makes a GrossModule.
2003
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2004
reload_cmds='$CC -r -o $output$reload_objs'
2008
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2009
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2012
runpath_var='LD_RUN_PATH'
2013
hardcode_shlibpath_var=no
2017
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2018
hardcode_shlibpath_var=no
2019
export_dynamic_flag_spec='-Bexport'
2023
no_undefined_flag=' -z text'
2024
# $CC -shared without GNU ld will not create a library from C++
2025
# object files and a static libstdc++, better avoid it by now
2026
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2027
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2028
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2029
hardcode_libdir_flag_spec=
2030
hardcode_shlibpath_var=no
2031
runpath_var='LD_RUN_PATH'
2035
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2036
hardcode_libdir_flag_spec='-L$libdir'
2037
hardcode_shlibpath_var=no
2041
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2042
hardcode_libdir_flag_spec='-L$libdir'
2043
hardcode_shlibpath_var=no
2047
if test -d /usr/nec; then
2048
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2049
hardcode_shlibpath_var=no
2050
runpath_var=LD_RUN_PATH
2051
hardcode_runpath_var=yes
2057
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2060
hardcode_shlibpath_var=no
2061
hardcode_runpath_var=yes
2062
runpath_var=LD_RUN_PATH
2065
sysv5uw7* | unixware7*)
2066
no_undefined_flag='${wl}-z ${wl}text'
2067
if test "$GCC" = yes; then
2068
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2070
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2072
runpath_var='LD_RUN_PATH'
2073
hardcode_shlibpath_var=no
1134
# MS-DOS does not allow filenames that begin with a dot.
2081
AC_MSG_RESULT([$ld_shlibs])
2082
test "$ld_shlibs" = no && can_build_shared=no
2086
## FIXME: this should be a separate macro
1137
rmdir .libs 2>/dev/null])
1138
objdir=$lt_cv_objdir
1139
])# AC_LIBTOOL_OBJDIR
1142
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1143
# ----------------------------------------------
2088
1144
# Check hardcoding attributes.
2089
AC_MSG_CHECKING([how to hardcode library paths into programs])
2091
if test -n "$hardcode_libdir_flag_spec" || \
2092
test -n "$runpath_var"; then
1145
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1146
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1147
_LT_AC_TAGVAR(hardcode_action, $1)=
1148
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1149
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1150
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2094
1152
# We can hardcode non-existant directories.
2095
if test "$hardcode_direct" != no &&
1153
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2096
1154
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2097
1155
# have to relink, otherwise we might link with an installed library
2098
1156
# when we should be linking with a yet-to-be-installed one
2099
## test "$hardcode_shlibpath_var" != no &&
2100
test "$hardcode_minus_L" != no; then
1157
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1158
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2101
1159
# Linking always hardcodes the temporary library directory.
2102
hardcode_action=relink
1160
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2104
1162
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2105
hardcode_action=immediate
1163
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2108
1166
# We cannot hardcode anything, or else we can only hardcode existing
2110
hardcode_action=unsupported
2112
AC_MSG_RESULT([$hardcode_action])
2116
## FIXME: this should be a separate macro
1168
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1170
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1172
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1173
# Fast installation is not supported
1174
enable_fast_install=no
1175
elif test "$shlibpath_overrides_runpath" = yes ||
1176
test "$enable_shared" = no; then
1177
# Fast installation is not necessary
1178
enable_fast_install=needless
1180
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1183
# AC_LIBTOOL_SYS_LIB_STRIP
1184
# ------------------------
1185
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2120
1188
AC_MSG_CHECKING([whether stripping libraries is possible])
2121
1189
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2516
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2517
soname_spec='${libname}${release}.so$major'
2518
shlibpath_var=LD_LIBRARY_PATH
2525
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2526
soname_spec='${libname}${release}.so$major'
2527
shlibpath_var=LD_LIBRARY_PATH
2531
1777
if test -d /usr/nec ;then
2532
1778
version_type=linux
2533
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2534
soname_spec='$libname.so.$major'
1779
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1780
soname_spec='$libname${shared_ext}.$major'
2535
1781
shlibpath_var=LD_LIBRARY_PATH
1785
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1786
version_type=freebsd-elf
1789
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1790
soname_spec='${libname}${release}${shared_ext}$major'
1791
shlibpath_var=LD_LIBRARY_PATH
1792
hardcode_into_libs=yes
1793
if test "$with_gnu_ld" = yes; then
1794
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1795
shlibpath_overrides_runpath=no
1797
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1798
shlibpath_overrides_runpath=yes
1801
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1805
sys_lib_dlsearch_path_spec='/usr/lib'
1810
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1811
soname_spec='${libname}${release}${shared_ext}$major'
1812
shlibpath_var=LD_LIBRARY_PATH
2540
1816
dynamic_linker=no
2543
1819
AC_MSG_RESULT([$dynamic_linker])
2544
1820
test "$dynamic_linker" = no && can_build_shared=no
2548
## FIXME: this should be a separate macro
2550
# Report the final consequences.
2551
AC_MSG_CHECKING([if libtool supports shared libraries])
2552
AC_MSG_RESULT([$can_build_shared])
2556
## FIXME: this should be a separate macro
2558
AC_MSG_CHECKING([whether to build shared libraries])
2559
test "$can_build_shared" = "no" && enable_shared=no
2561
# On AIX, shared libraries and static libraries use the same namespace, and
2562
# are all built from PIC.
2565
test "$enable_shared" = yes && enable_static=no
2566
if test -n "$RANLIB"; then
2567
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2568
postinstall_cmds='$RANLIB $lib'
2573
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2574
test "$enable_shared" = yes && enable_static=no
2578
AC_MSG_RESULT([$enable_shared])
2582
## FIXME: this should be a separate macro
2584
AC_MSG_CHECKING([whether to build static libraries])
2585
# Make sure either enable_shared or enable_static is yes.
2586
test "$enable_shared" = yes || enable_static=yes
2587
AC_MSG_RESULT([$enable_static])
2591
if test "$hardcode_action" = relink; then
2592
# Fast installation is not supported
2593
enable_fast_install=no
2594
elif test "$shlibpath_overrides_runpath" = yes ||
2595
test "$enable_shared" = no; then
2596
# Fast installation is not necessary
2597
enable_fast_install=needless
2600
1822
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2601
1823
if test "$GCC" = yes; then
2602
1824
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1826
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1831
AC_DEFUN([_LT_AC_TAGCONFIG],
1832
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1834
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1835
[include additional configurations @<:@automatic@:>@])],
1836
[tagnames="$withval"])
1838
if test -f "$ltmain" && test -n "$tagnames"; then
1839
if test ! -f "${ofile}"; then
1840
AC_MSG_WARN([output file `$ofile' does not exist])
1843
if test -z "$LTCC"; then
1844
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1845
if test -z "$LTCC"; then
1846
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1848
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1851
if test -z "$LTCFLAGS"; then
1852
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1855
# Extract list of available tagged configurations in $ofile.
1856
# Note that this assumes the entire list is on one line.
1857
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1859
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1860
for tagname in $tagnames; do
1862
# Check whether tagname contains only valid characters
1863
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1865
*) AC_MSG_ERROR([invalid tag name: $tagname])
1869
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1871
AC_MSG_ERROR([tag name \"$tagname\" already exists])
1874
# Update the list of available tags.
1875
if test -n "$tagname"; then
1876
echo appending configuration tag \"$tagname\" to $ofile
1880
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1881
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1882
(test "X$CXX" != "Xg++"))) ; then
1883
AC_LIBTOOL_LANG_CXX_CONFIG
1890
if test -n "$F77" && test "X$F77" != "Xno"; then
1891
AC_LIBTOOL_LANG_F77_CONFIG
1898
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1899
AC_LIBTOOL_LANG_GCJ_CONFIG
1906
AC_LIBTOOL_LANG_RC_CONFIG
1910
AC_MSG_ERROR([Unsupported tag name: $tagname])
1914
# Append the new tag name to the list of available tags.
1915
if test -n "$tagname" ; then
1916
available_tags="$available_tags $tagname"
1922
# Now substitute the updated list of available tags.
1923
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1924
mv "${ofile}T" "$ofile"
1928
AC_MSG_ERROR([unable to update list of available tagged configurations.])
1931
])# _LT_AC_TAGCONFIG
1936
# enable checks for dlopen support
1937
AC_DEFUN([AC_LIBTOOL_DLOPEN],
1938
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1939
])# AC_LIBTOOL_DLOPEN
1942
# AC_LIBTOOL_WIN32_DLL
1943
# --------------------
1944
# declare package support for building win32 DLLs
1945
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1946
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1947
])# AC_LIBTOOL_WIN32_DLL
1950
# AC_ENABLE_SHARED([DEFAULT])
1951
# ---------------------------
1952
# implement the --enable-shared flag
1953
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1954
AC_DEFUN([AC_ENABLE_SHARED],
1955
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1956
AC_ARG_ENABLE([shared],
1957
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1958
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1959
[p=${PACKAGE-default}
1961
yes) enable_shared=yes ;;
1962
no) enable_shared=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_shared=]AC_ENABLE_SHARED_DEFAULT)
1977
])# AC_ENABLE_SHARED
1982
# set the default shared flag to --disable-shared
1983
AC_DEFUN([AC_DISABLE_SHARED],
1984
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1985
AC_ENABLE_SHARED(no)
1986
])# AC_DISABLE_SHARED
1989
# AC_ENABLE_STATIC([DEFAULT])
1990
# ---------------------------
1991
# implement the --enable-static flag
1992
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1993
AC_DEFUN([AC_ENABLE_STATIC],
1994
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1995
AC_ARG_ENABLE([static],
1996
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1997
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1998
[p=${PACKAGE-default}
2000
yes) enable_static=yes ;;
2001
no) enable_static=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
2015
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2016
])# AC_ENABLE_STATIC
2021
# set the default static flag to --disable-static
2022
AC_DEFUN([AC_DISABLE_STATIC],
2023
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2024
AC_ENABLE_STATIC(no)
2025
])# AC_DISABLE_STATIC
2028
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2029
# ---------------------------------
2030
# implement the --enable-fast-install flag
2031
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2032
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2033
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2034
AC_ARG_ENABLE([fast-install],
2035
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2036
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2037
[p=${PACKAGE-default}
2039
yes) enable_fast_install=yes ;;
2040
no) enable_fast_install=no ;;
2042
enable_fast_install=no
2043
# Look at the argument we got. We use all the common list separators.
2044
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2045
for pkg in $enableval; do
2047
if test "X$pkg" = "X$p"; then
2048
enable_fast_install=yes
2054
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2055
])# AC_ENABLE_FAST_INSTALL
2058
# AC_DISABLE_FAST_INSTALL
2059
# -----------------------
2060
# set the default to --disable-fast-install
2061
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2062
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2063
AC_ENABLE_FAST_INSTALL(no)
2064
])# AC_DISABLE_FAST_INSTALL
2067
# AC_LIBTOOL_PICMODE([MODE])
2068
# --------------------------
2069
# implement the --with-pic flag
2070
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2071
AC_DEFUN([AC_LIBTOOL_PICMODE],
2072
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2073
pic_mode=ifelse($#,1,$1,default)
2074
])# AC_LIBTOOL_PICMODE
2079
# This is predefined starting with Autoconf 2.54, so this conditional
2080
# definition can be removed once we require Autoconf 2.54 or later.
2081
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2082
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2083
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2084
then ac_cv_prog_egrep='grep -E'
2085
else ac_cv_prog_egrep='egrep'
2087
EGREP=$ac_cv_prog_egrep
2092
# AC_PATH_TOOL_PREFIX
2093
# -------------------
2094
# find a file program which can recognize shared library
2095
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2096
[AC_REQUIRE([AC_PROG_EGREP])dnl
2097
AC_MSG_CHECKING([for $1])
2098
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2100
[[\\/*] | ?:[\\/]*])
2101
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2104
lt_save_MAGIC_CMD="$MAGIC_CMD"
2105
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2106
dnl $ac_dummy forces splitting on constant user-supplied paths.
2107
dnl POSIX.2 word splitting is done only on the output of word expansions,
2108
dnl not every word. This closes a longstanding sh security hole.
2109
ac_dummy="ifelse([$2], , $PATH, [$2])"
2110
for ac_dir in $ac_dummy; do
2112
test -z "$ac_dir" && ac_dir=.
2113
if test -f $ac_dir/$1; then
2114
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2115
if test -n "$file_magic_test_file"; then
2116
case $deplibs_check_method in
2118
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2119
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2120
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2121
$EGREP "$file_magic_regex" > /dev/null; then
2126
*** Warning: the command libtool uses to detect shared libraries,
2127
*** $file_magic_cmd, produces output that libtool cannot recognize.
2128
*** The result is that libtool may fail to recognize shared libraries
2129
*** as such. This will affect the creation of libtool libraries that
2130
*** depend on shared libraries, but programs linked with such libtool
2131
*** libraries will work regardless of this problem. Nevertheless, you
2132
*** may want to report the problem to your system manager and/or to
2133
*** bug-libtool@gnu.org
2143
MAGIC_CMD="$lt_save_MAGIC_CMD"
2146
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2147
if test -n "$MAGIC_CMD"; then
2148
AC_MSG_RESULT($MAGIC_CMD)
2152
])# AC_PATH_TOOL_PREFIX
2157
# find a file program which can recognize a shared library
2158
AC_DEFUN([AC_PATH_MAGIC],
2159
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2160
if test -z "$lt_cv_path_MAGIC_CMD"; then
2161
if test -n "$ac_tool_prefix"; then
2162
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2172
# find the pathname to the GNU or non-GNU linker
2173
AC_DEFUN([AC_PROG_LD],
2174
[AC_ARG_WITH([gnu-ld],
2175
[AC_HELP_STRING([--with-gnu-ld],
2176
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2177
[test "$withval" = no || with_gnu_ld=yes],
2179
AC_REQUIRE([LT_AC_PROG_SED])dnl
2180
AC_REQUIRE([AC_PROG_CC])dnl
2181
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2182
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2184
if test "$GCC" = yes; then
2185
# Check if gcc -print-prog-name=ld gives a path.
2186
AC_MSG_CHECKING([for ld used by $CC])
2189
# gcc leaves a trailing carriage return which upsets mingw
2190
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2192
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2195
# Accept absolute paths.
2196
[[\\/]]* | ?:[[\\/]]*)
2197
re_direlt='/[[^/]][[^/]]*/\.\./'
2198
# Canonicalize the pathname of ld
2199
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2200
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2201
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2203
test -z "$LD" && LD="$ac_prog"
2206
# If it fails, then pretend we aren't using GCC.
2210
# If it is relative, then search for the first ld in PATH.
2214
elif test "$with_gnu_ld" = yes; then
2215
AC_MSG_CHECKING([for GNU ld])
2217
AC_MSG_CHECKING([for non-GNU ld])
2219
AC_CACHE_VAL(lt_cv_path_LD,
2220
[if test -z "$LD"; then
2221
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2222
for ac_dir in $PATH; do
2224
test -z "$ac_dir" && ac_dir=.
2225
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2226
lt_cv_path_LD="$ac_dir/$ac_prog"
2227
# Check to see if the program is GNU ld. I'd rather use --version,
2228
# but apparently some variants of GNU ld only accept -v.
2229
# Break only if it was the GNU/non-GNU ld that we prefer.
2230
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2231
*GNU* | *'with BFD'*)
2232
test "$with_gnu_ld" != no && break
2235
test "$with_gnu_ld" != yes && break
2242
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2245
if test -n "$LD"; then
2250
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2257
AC_DEFUN([AC_PROG_LD_GNU],
2258
[AC_REQUIRE([AC_PROG_EGREP])dnl
2259
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2260
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2261
case `$LD -v 2>&1 </dev/null` in
2262
*GNU* | *'with BFD'*)
2263
lt_cv_prog_gnu_ld=yes
2266
lt_cv_prog_gnu_ld=no
2269
with_gnu_ld=$lt_cv_prog_gnu_ld
2273
# AC_PROG_LD_RELOAD_FLAG
2274
# ----------------------
2275
# find reload flag for linker
2276
# -- PORTME Some linkers may need a different reload flag.
2277
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2278
[AC_CACHE_CHECK([for $LD option to reload object files],
2279
lt_cv_ld_reload_flag,
2280
[lt_cv_ld_reload_flag='-r'])
2281
reload_flag=$lt_cv_ld_reload_flag
2282
case $reload_flag in
2284
*) reload_flag=" $reload_flag" ;;
2286
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2289
if test "$GCC" = yes; then
2290
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2292
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2296
])# AC_PROG_LD_RELOAD_FLAG
2299
# AC_DEPLIBS_CHECK_METHOD
2300
# -----------------------
2301
# how to check for library dependencies
2302
# -- PORTME fill in with the dynamic library characteristics
2303
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2304
[AC_CACHE_CHECK([how to recognize dependent libraries],
2305
lt_cv_deplibs_check_method,
2306
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2307
lt_cv_file_magic_test_file=
2308
lt_cv_deplibs_check_method='unknown'
2309
# Need to set the preceding variable on all platforms that support
2310
# interlibrary dependencies.
2311
# 'none' -- dependencies not supported.
2312
# `unknown' -- same as none, but documents that we really don't know.
2313
# 'pass_all' -- all dependencies passed with no checks.
2314
# 'test_compile' -- check by making test program.
2315
# 'file_magic [[regex]]' -- check by looking for files in library path
2316
# which responds to the $file_magic_cmd with a given extended regex.
2317
# If you have `file' or equivalent on your system and you're not sure
2318
# whether `pass_all' will *always* work, you probably want this one.
2322
lt_cv_deplibs_check_method=pass_all
2326
lt_cv_deplibs_check_method=pass_all
2330
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2331
lt_cv_file_magic_cmd='/usr/bin/file -L'
2332
lt_cv_file_magic_test_file=/shlib/libc.so
2336
# func_win32_libid is a shell function defined in ltmain.sh
2337
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2338
lt_cv_file_magic_cmd='func_win32_libid'
2342
# Base MSYS/MinGW do not provide the 'file' command needed by
2343
# func_win32_libid shell function, so use a weaker test based on 'objdump',
2344
# unless we find 'file', for example because we are cross-compiling.
2345
if ( file / ) >/dev/null 2>&1; then
2346
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2347
lt_cv_file_magic_cmd='func_win32_libid'
2349
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2350
lt_cv_file_magic_cmd='$OBJDUMP -f'
2354
darwin* | rhapsody*)
2355
lt_cv_deplibs_check_method=pass_all
2358
freebsd* | dragonfly*)
2359
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2362
# Not sure whether the presence of OpenBSD here was a mistake.
2363
# Let's accept both of them until this is cleared up.
2364
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2365
lt_cv_file_magic_cmd=/usr/bin/file
2366
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2370
lt_cv_deplibs_check_method=pass_all
2375
lt_cv_deplibs_check_method=pass_all
2378
hpux10.20* | hpux11*)
2379
lt_cv_file_magic_cmd=/usr/bin/file
2382
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2383
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2386
[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]']
2387
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2390
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2391
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2397
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2398
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2401
irix5* | irix6* | nonstopux*)
2403
*-32|*"-32 ") libmagic=32-bit;;
2404
*-n32|*"-n32 ") libmagic=N32;;
2405
*-64|*"-64 ") libmagic=64-bit;;
2406
*) libmagic=never-match;;
2408
lt_cv_deplibs_check_method=pass_all
2411
# This must be Linux ELF.
2412
linux* | k*bsd*-gnu)
2413
lt_cv_deplibs_check_method=pass_all
2417
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2418
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2420
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2425
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2426
lt_cv_file_magic_cmd=/usr/bin/file
2427
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2431
lt_cv_deplibs_check_method=unknown
2435
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2436
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2438
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2442
osf3* | osf4* | osf5*)
2443
lt_cv_deplibs_check_method=pass_all
2447
lt_cv_deplibs_check_method=pass_all
2451
lt_cv_deplibs_check_method=pass_all
2455
case $host_vendor in
2457
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]]'
2458
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2461
lt_cv_deplibs_check_method=pass_all
2464
lt_cv_file_magic_cmd='/bin/file'
2465
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2468
lt_cv_file_magic_cmd='/bin/file'
2469
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2470
lt_cv_file_magic_test_file=/lib/libc.so
2473
lt_cv_deplibs_check_method=pass_all
2476
lt_cv_deplibs_check_method=pass_all
2481
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2482
lt_cv_deplibs_check_method=pass_all
2486
file_magic_cmd=$lt_cv_file_magic_cmd
2487
deplibs_check_method=$lt_cv_deplibs_check_method
2488
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2489
])# AC_DEPLIBS_CHECK_METHOD
2494
# find the pathname to a BSD-compatible name lister
2495
AC_DEFUN([AC_PROG_NM],
2496
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2497
[if test -n "$NM"; then
2498
# Let the user override the test.
2501
lt_nm_to_check="${ac_tool_prefix}nm"
2502
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2503
lt_nm_to_check="$lt_nm_to_check nm"
2505
for lt_tmp_nm in $lt_nm_to_check; do
2506
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2507
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2509
test -z "$ac_dir" && ac_dir=.
2510
tmp_nm="$ac_dir/$lt_tmp_nm"
2511
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2512
# Check to see if the nm accepts a BSD-compat flag.
2513
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2514
# nm: unknown option "B" ignored
2515
# Tru64's nm complains that /dev/null is an invalid object file
2516
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2517
*/dev/null* | *'Invalid file or object type'*)
2518
lt_cv_path_NM="$tmp_nm -B"
2522
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2524
lt_cv_path_NM="$tmp_nm -p"
2528
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2529
continue # so that we can try to find one that supports BSD flags
2538
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2546
# check for math library
2547
AC_DEFUN([AC_CHECK_LIBM],
2548
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2551
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2552
# These system don't have libm, or don't need it
2555
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2556
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2559
AC_CHECK_LIB(m, cos, LIBM="-lm")
2565
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2566
# -----------------------------------
2567
# sets LIBLTDL to the link flags for the libltdl convenience library and
2568
# LTDLINCL to the include flags for the libltdl header and adds
2569
# --enable-ltdl-convenience to the configure arguments. Note that
2570
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2571
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2572
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2573
# (note the single quotes!). If your package is not flat and you're not
2574
# using automake, define top_builddir and top_srcdir appropriately in
2576
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2577
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2578
case $enable_ltdl_convenience in
2579
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2580
"") enable_ltdl_convenience=yes
2581
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2583
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2584
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2585
# For backwards non-gettext consistent compatibility...
2587
])# AC_LIBLTDL_CONVENIENCE
2590
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2591
# -----------------------------------
2592
# sets LIBLTDL to the link flags for the libltdl installable library and
2593
# LTDLINCL to the include flags for the libltdl header and adds
2594
# --enable-ltdl-install to the configure arguments. Note that
2595
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2596
# and an installed libltdl is not found, it is assumed to be `libltdl'.
2597
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2598
# '${top_srcdir}/' (note the single quotes!). If your package is not
2599
# flat and you're not using automake, define top_builddir and top_srcdir
2600
# appropriately in the Makefiles.
2601
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2602
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2603
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2604
AC_CHECK_LIB(ltdl, lt_dlinit,
2605
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2606
[if test x"$enable_ltdl_install" = xno; then
2607
AC_MSG_WARN([libltdl not installed, but installation disabled])
2609
enable_ltdl_install=yes
2612
if test x"$enable_ltdl_install" = x"yes"; then
2613
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2614
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2615
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2617
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2621
# For backwards non-gettext consistent compatibility...
2623
])# AC_LIBLTDL_INSTALLABLE
2628
# enable support for C++ libraries
2629
AC_DEFUN([AC_LIBTOOL_CXX],
2630
[AC_REQUIRE([_LT_AC_LANG_CXX])
2636
AC_DEFUN([_LT_AC_LANG_CXX],
2637
[AC_REQUIRE([AC_PROG_CXX])
2638
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2639
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2642
# _LT_AC_PROG_CXXCPP
2643
# ------------------
2644
AC_DEFUN([_LT_AC_PROG_CXXCPP],
2646
AC_REQUIRE([AC_PROG_CXX])
2647
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2648
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2649
(test "X$CXX" != "Xg++"))) ; then
2652
])# _LT_AC_PROG_CXXCPP
2656
# enable support for Fortran 77 libraries
2657
AC_DEFUN([AC_LIBTOOL_F77],
2658
[AC_REQUIRE([_LT_AC_LANG_F77])
2664
AC_DEFUN([_LT_AC_LANG_F77],
2665
[AC_REQUIRE([AC_PROG_F77])
2666
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2672
# enable support for GCJ libraries
2673
AC_DEFUN([AC_LIBTOOL_GCJ],
2674
[AC_REQUIRE([_LT_AC_LANG_GCJ])
2680
AC_DEFUN([_LT_AC_LANG_GCJ],
2681
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2682
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2683
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2684
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2685
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2686
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2687
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2693
# enable support for Windows resource files
2694
AC_DEFUN([AC_LIBTOOL_RC],
2695
[AC_REQUIRE([LT_AC_PROG_RC])
2696
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2700
# AC_LIBTOOL_LANG_C_CONFIG
2701
# ------------------------
2702
# Ensure that the configuration vars for the C compiler are
2703
# suitably defined. Those variables are subsequently used by
2704
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2705
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2706
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2710
# Source file extension for C test sources.
2713
# Object file extension for compiled C test sources.
2715
_LT_AC_TAGVAR(objext, $1)=$objext
2717
# Code to be used in simple compile tests
2718
lt_simple_compile_test_code="int some_variable = 0;"
2720
# Code to be used in simple link tests
2721
lt_simple_link_test_code='int main(){return(0);}'
2725
# save warnings/boilerplate of simple test code
2726
_LT_COMPILER_BOILERPLATE
2727
_LT_LINKER_BOILERPLATE
2729
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2730
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2731
AC_LIBTOOL_PROG_CC_C_O($1)
2732
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2733
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2734
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2735
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2736
AC_LIBTOOL_SYS_LIB_STRIP
2605
2737
AC_LIBTOOL_DLOPEN_SELF
2607
## FIXME: this should be a separate macro
2609
if test "$enable_shared" = yes && test "$GCC" = yes; then
2610
case $archive_cmds in
2612
# FIXME: we may have to deal with multi-command sequences.
2615
# Test whether the compiler implicitly links with -lc since on some
2616
# systems, -lgcc has to come before -lc. If gcc already passes -lc
2617
# to ld, don't add -lc before -lgcc.
2618
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2619
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2621
echo 'static int dummy;' > conftest.$ac_ext
2623
if AC_TRY_EVAL(ac_compile); then
2626
libobjs=conftest.$ac_objext
2628
wl=$lt_cv_prog_cc_wl
2634
save_allow_undefined_flag=$allow_undefined_flag
2635
allow_undefined_flag=
2636
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2638
lt_cv_archive_cmds_need_lc=no
2640
lt_cv_archive_cmds_need_lc=yes
2642
allow_undefined_flag=$save_allow_undefined_flag
2644
cat conftest.err 1>&5
2646
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2650
need_lc=${lt_cv_archive_cmds_need_lc-yes}
2654
## FIXME: this should be a separate macro
2656
# The second clause should only fire when bootstrapping the
2739
# Report which library types will actually be built
2740
AC_MSG_CHECKING([if libtool supports shared libraries])
2741
AC_MSG_RESULT([$can_build_shared])
2743
AC_MSG_CHECKING([whether to build shared libraries])
2744
test "$can_build_shared" = "no" && enable_shared=no
2746
# On AIX, shared libraries and static libraries use the same namespace, and
2747
# are all built from PIC.
2750
test "$enable_shared" = yes && enable_static=no
2751
if test -n "$RANLIB"; then
2752
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2753
postinstall_cmds='$RANLIB $lib'
2758
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2759
test "$enable_shared" = yes && enable_static=no
2763
AC_MSG_RESULT([$enable_shared])
2765
AC_MSG_CHECKING([whether to build static libraries])
2766
# Make sure either enable_shared or enable_static is yes.
2767
test "$enable_shared" = yes || enable_static=yes
2768
AC_MSG_RESULT([$enable_static])
2770
AC_LIBTOOL_CONFIG($1)
2774
])# AC_LIBTOOL_LANG_C_CONFIG
2777
# AC_LIBTOOL_LANG_CXX_CONFIG
2778
# --------------------------
2779
# Ensure that the configuration vars for the C compiler are
2780
# suitably defined. Those variables are subsequently used by
2781
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2782
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2783
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2785
AC_REQUIRE([AC_PROG_CXX])
2786
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2788
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2789
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2790
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2791
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2792
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2793
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2794
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2795
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2796
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2797
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2798
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2799
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2800
_LT_AC_TAGVAR(module_cmds, $1)=
2801
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2802
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2803
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2804
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2805
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2806
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2808
# Dependencies to place before and after the object being linked:
2809
_LT_AC_TAGVAR(predep_objects, $1)=
2810
_LT_AC_TAGVAR(postdep_objects, $1)=
2811
_LT_AC_TAGVAR(predeps, $1)=
2812
_LT_AC_TAGVAR(postdeps, $1)=
2813
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2815
# Source file extension for C++ test sources.
2818
# Object file extension for compiled C++ test sources.
2820
_LT_AC_TAGVAR(objext, $1)=$objext
2822
# Code to be used in simple compile tests
2823
lt_simple_compile_test_code="int some_variable = 0;"
2825
# Code to be used in simple link tests
2826
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2828
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2831
# save warnings/boilerplate of simple test code
2832
_LT_COMPILER_BOILERPLATE
2833
_LT_LINKER_BOILERPLATE
2835
# Allow CC to be a program name with arguments.
2840
lt_save_with_gnu_ld=$with_gnu_ld
2841
lt_save_path_LD=$lt_cv_path_LD
2842
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2843
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2845
$as_unset lt_cv_prog_gnu_ld
2847
if test -n "${lt_cv_path_LDCXX+set}"; then
2848
lt_cv_path_LD=$lt_cv_path_LDCXX
2850
$as_unset lt_cv_path_LD
2852
test -z "${LDCXX+set}" || LD=$LDCXX
2855
_LT_AC_TAGVAR(compiler, $1)=$CC
2856
_LT_CC_BASENAME([$compiler])
2858
# We don't want -fno-exception wen compiling C++ code, so set the
2859
# no_builtin_flag separately
2860
if test "$GXX" = yes; then
2861
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2863
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2866
if test "$GXX" = yes; then
2867
# Set up default GNU C++ configuration
2871
# Check if GNU C++ uses GNU ld as the underlying linker, since the
2872
# archiving commands below assume that GNU ld is being used.
2873
if test "$with_gnu_ld" = yes; then
2874
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2875
_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'
2877
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2878
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2880
# If archive_cmds runs LD, not CC, wlarc should be empty
2881
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2882
# investigate it a little bit more. (MM)
2885
# ancient GNU ld didn't support --whole-archive et. al.
2886
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2887
grep 'no-whole-archive' > /dev/null; then
2888
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2890
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2896
# A generic and very simple default shared library creation
2897
# command for GNU C++ for the case where it uses the native
2898
# linker, instead of GNU ld. If possible, this setting should
2899
# overridden to take advantage of the native linker features on
2900
# the platform it is being used on.
2901
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2904
# Commands to make compiler produce verbose output that lists
2905
# what "hidden" libraries, object files and flags are used when
2906
# linking a shared library.
2907
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2915
# PORTME: fill in a description of your system's C++ link characteristics
2916
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2917
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2920
# FIXME: insert proper C++ library support
2921
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2924
if test "$host_cpu" = ia64; then
2925
# On IA64, the linker does run time linking by default, so we don't
2926
# have to do anything special.
2927
aix_use_runtimelinking=no
2928
exp_sym_flag='-Bexport'
2931
aix_use_runtimelinking=no
2933
# Test if we are trying to use run time linking or normal
2934
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2935
# need to do runtime linking.
2936
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2937
for ld_flag in $LDFLAGS; do
2940
aix_use_runtimelinking=yes
2948
exp_sym_flag='-bexport'
2949
no_entry_flag='-bnoentry'
2952
# When large executables or shared objects are built, AIX ld can
2953
# have problems creating the table of contents. If linking a library
2954
# or program results in "error TOC overflow" add -mminimal-toc to
2955
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2956
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2958
_LT_AC_TAGVAR(archive_cmds, $1)=''
2959
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2960
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2961
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2963
if test "$GXX" = yes; then
2964
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2965
# We only want to do this on AIX 4.2 and lower, the check
2966
# below for broken collect2 doesn't work under 4.3+
2967
collect2name=`${CC} -print-prog-name=collect2`
2968
if test -f "$collect2name" && \
2969
strings "$collect2name" | grep resolve_lib_name >/dev/null
2971
# We have reworked collect2
2974
# We have old collect2
2975
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2976
# It fails to find uninstalled libraries when the uninstalled
2977
# path is not listed in the libpath. Setting hardcode_minus_L
2978
# to unsupported forces relinking
2979
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2980
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2981
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2985
shared_flag='-shared'
2986
if test "$aix_use_runtimelinking" = yes; then
2987
shared_flag="$shared_flag "'${wl}-G'
2991
if test "$host_cpu" = ia64; then
2992
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2993
# chokes on -Wl,-G. The following line is correct:
2996
if test "$aix_use_runtimelinking" = yes; then
2997
shared_flag='${wl}-G'
2999
shared_flag='${wl}-bM:SRE'
3004
# It seems that -bexpall does not export symbols beginning with
3005
# underscore (_), so it is better to generate a list of symbols to export.
3006
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3007
if test "$aix_use_runtimelinking" = yes; then
3008
# Warning - without using the other runtime loading flags (-brtl),
3009
# -berok will link without error, but may produce a broken library.
3010
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3011
# Determine the default libpath from the value encoded in an empty executable.
3012
_LT_AC_SYS_LIBPATH_AIX
3013
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3015
_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"
3017
if test "$host_cpu" = ia64; then
3018
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3019
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3020
_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"
3022
# Determine the default libpath from the value encoded in an empty executable.
3023
_LT_AC_SYS_LIBPATH_AIX
3024
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3025
# Warning - without using the other run time loading flags,
3026
# -berok will link without error, but may produce a broken library.
3027
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3028
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3029
# Exported symbols can be pulled into shared objects from archives
3030
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3031
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3032
# This is similar to how AIX traditionally builds its shared libraries.
3033
_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'
3039
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3040
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3041
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3042
# support --undefined. This deserves some investigation. FIXME
3043
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3045
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3050
case $cc_basename in
3052
# FIXME: insert proper C++ library support
3053
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3058
cygwin* | mingw* | pw32*)
3059
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3060
# as there is no search path for DLLs.
3061
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3062
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3063
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3064
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3066
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3067
_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'
3068
# If the export-symbols file already is a .def file (1st line
3069
# is EXPORTS), use it as is; otherwise, prepend...
3070
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3071
cp $export_symbols $output_objdir/$soname.def;
3073
echo EXPORTS > $output_objdir/$soname.def;
3074
cat $export_symbols >> $output_objdir/$soname.def;
3076
$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'
3078
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3081
darwin* | rhapsody*)
3083
rhapsody* | darwin1.[[012]])
3084
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3087
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3088
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3090
case ${MACOSX_DEPLOYMENT_TARGET} in
3092
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3095
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3101
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3102
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3103
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3104
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3105
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3106
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3108
if test "$GXX" = yes ; then
3109
lt_int_apple_cc_single_mod=no
3110
output_verbose_link_cmd='echo'
3111
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3112
lt_int_apple_cc_single_mod=yes
3114
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3115
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3117
_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'
3119
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3120
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3121
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3122
_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}'
3124
_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}'
3126
_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}'
3128
case $cc_basename in
3130
output_verbose_link_cmd='echo'
3131
_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` $xlcverstring'
3132
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3133
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3134
_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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3135
_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}'
3138
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3145
case $cc_basename in
3147
# FIXME: insert proper C++ library support
3148
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3151
# Green Hills C++ Compiler
3152
# FIXME: insert proper C++ library support
3153
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3156
# FIXME: insert proper C++ library support
3157
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3162
# C++ shared libraries reported to be fairly broken before switch to ELF
3163
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3166
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3168
freebsd* | dragonfly*)
3169
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3171
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3176
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3177
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3178
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3179
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3180
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3181
# but as the default
3182
# location of the library.
3184
case $cc_basename in
3186
# FIXME: insert proper C++ library support
3187
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3190
_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'
3191
# Commands to make compiler produce verbose output that lists
3192
# what "hidden" libraries, object files and flags are used when
3193
# linking a shared library.
3195
# There doesn't appear to be a way to prevent this compiler from
3196
# explicitly linking system object files so we need to strip them
3197
# from the output so that they don't get included in the library
3199
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'
3202
if test "$GXX" = yes; then
3203
_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'
3205
# FIXME: insert proper C++ library support
3206
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3212
if test $with_gnu_ld = no; then
3213
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3214
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3219
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3225
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3226
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3229
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3230
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3231
# but as the default
3232
# location of the library.
3236
case $cc_basename in
3238
# FIXME: insert proper C++ library support
3239
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3244
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3247
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3250
_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'
3253
# Commands to make compiler produce verbose output that lists
3254
# what "hidden" libraries, object files and flags are used when
3255
# linking a shared library.
3257
# There doesn't appear to be a way to prevent this compiler from
3258
# explicitly linking system object files so we need to strip them
3259
# from the output so that they don't get included in the library
3261
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'
3264
if test "$GXX" = yes; then
3265
if test $with_gnu_ld = no; then
3268
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3271
_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'
3274
_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'
3279
# FIXME: insert proper C++ library support
3280
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3286
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3287
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3288
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3289
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3290
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3291
# Instead, shared libraries are loaded at an image base (0x10000000 by
3292
# default) and relocated if they conflict, which is a slow very memory
3293
# consuming and fragmenting process. To avoid this, we pick a random,
3294
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3295
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
3296
_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'
3297
_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'
3300
case $cc_basename in
3303
_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'
3305
# Archives containing C++ object files must be created using
3306
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3307
# necessary to make sure instantiated templates are included
3309
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3312
if test "$GXX" = yes; then
3313
if test "$with_gnu_ld" = no; then
3314
_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'
3316
_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'
3319
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3322
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3323
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3325
linux* | k*bsd*-gnu)
3326
case $cc_basename in
3328
# Kuck and Associates, Inc. (KAI) C++ Compiler
3330
# KCC will only create a shared library if the output file
3331
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3332
# to its proper name (with version) after linking.
3333
_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'
3334
_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'
3335
# Commands to make compiler produce verbose output that lists
3336
# what "hidden" libraries, object files and flags are used when
3337
# linking a shared library.
3339
# There doesn't appear to be a way to prevent this compiler from
3340
# explicitly linking system object files so we need to strip them
3341
# from the output so that they don't get included in the library
3343
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'
3345
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3346
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3348
# Archives containing C++ object files must be created using
3349
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3350
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3355
# version 8.0 and above of icpc choke on multiply defined symbols
3356
# if we add $predep_objects and $postdep_objects, however 7.1 and
3357
# earlier do not add the objects themselves.
3358
case `$CC -V 2>&1` in
3360
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3361
_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'
3363
*) # Version 8.0 or newer
3366
ia64*) tmp_idyn=' -i_dynamic';;
3368
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3369
_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'
3372
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3373
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3374
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3375
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3378
# Portland Group C++ compiler
3379
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3380
_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'
3382
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3383
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3384
_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'
3388
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3389
_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'
3391
runpath_var=LD_RUN_PATH
3392
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3393
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3395
# Commands to make compiler produce verbose output that lists
3396
# what "hidden" libraries, object files and flags are used when
3397
# linking a shared library.
3399
# There doesn't appear to be a way to prevent this compiler from
3400
# explicitly linking system object files so we need to strip them
3401
# from the output so that they don't get included in the library
3403
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'
3406
case `$CC -V 2>&1 | sed 5q` in
3409
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3410
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3411
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3413
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3415
# Not sure whether something based on
3416
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3418
output_verbose_link_cmd='echo'
3420
# Archives containing C++ object files must be created using
3421
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3422
# necessary to make sure instantiated templates are included
3424
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3431
# FIXME: insert proper C++ library support
3432
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3435
# FIXME: insert proper C++ library support
3436
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3439
case $cc_basename in
3441
# FIXME: insert proper C++ library support
3442
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3445
# FIXME: insert proper C++ library support
3446
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3451
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3452
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3454
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3455
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3456
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3458
# Workaround some broken pre-1.5 toolchains
3459
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3462
# C++ shared libraries are fairly broken
3463
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3466
if test -f /usr/libexec/ld.so; then
3467
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3468
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3469
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3470
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3471
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3472
_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'
3473
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3474
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3476
output_verbose_link_cmd='echo'
3478
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3482
case $cc_basename in
3484
# Kuck and Associates, Inc. (KAI) C++ Compiler
3486
# KCC will only create a shared library if the output file
3487
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3488
# to its proper name (with version) after linking.
3489
_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'
3491
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3492
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3494
# Archives containing C++ object files must be created using
3495
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3496
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3500
# Rational C++ 2.4.1
3501
# FIXME: insert proper C++ library support
3502
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3505
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3506
_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'
3508
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3509
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3511
# Commands to make compiler produce verbose output that lists
3512
# what "hidden" libraries, object files and flags are used when
3513
# linking a shared library.
3515
# There doesn't appear to be a way to prevent this compiler from
3516
# explicitly linking system object files so we need to strip them
3517
# from the output so that they don't get included in the library
3519
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'
3522
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3523
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3524
_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'
3526
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3527
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3529
# Commands to make compiler produce verbose output that lists
3530
# what "hidden" libraries, object files and flags are used when
3531
# linking a shared library.
3532
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3535
# FIXME: insert proper C++ library support
3536
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3542
case $cc_basename in
3544
# Kuck and Associates, Inc. (KAI) C++ Compiler
3546
# KCC will only create a shared library if the output file
3547
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3548
# to its proper name (with version) after linking.
3549
_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'
3551
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3552
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3554
# Archives containing C++ object files must be created using
3555
# the KAI C++ compiler.
3556
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3559
# Rational C++ 2.4.1
3560
# FIXME: insert proper C++ library support
3561
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3564
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3565
_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'
3566
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3567
echo "-hidden">> $lib.exp~
3568
$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~
3571
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3572
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3574
# Commands to make compiler produce verbose output that lists
3575
# what "hidden" libraries, object files and flags are used when
3576
# linking a shared library.
3578
# There doesn't appear to be a way to prevent this compiler from
3579
# explicitly linking system object files so we need to strip them
3580
# from the output so that they don't get included in the library
3582
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'
3585
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3586
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3587
_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'
3589
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3590
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3592
# Commands to make compiler produce verbose output that lists
3593
# what "hidden" libraries, object files and flags are used when
3594
# linking a shared library.
3595
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3598
# FIXME: insert proper C++ library support
3599
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3605
# FIXME: insert proper C++ library support
3606
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3609
case $cc_basename in
3612
# FIXME: insert proper C++ library support
3613
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3617
# FIXME: insert proper C++ library support
3618
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3621
# FIXME: insert proper C++ library support
3622
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3627
case $cc_basename in
3629
# Sun C++ 4.2, 5.x and Centerline C++
3630
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3631
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3632
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3633
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3634
$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'
3636
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3637
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3639
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3641
# The compiler driver will combine and reorder linker options,
3642
# but understands `-z linker_flag'.
3643
# Supported since Solaris 2.6 (maybe 2.5.1?)
3644
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3647
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3649
output_verbose_link_cmd='echo'
3651
# Archives containing C++ object files must be created using
3652
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3653
# necessary to make sure instantiated templates are included
3655
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3658
# Green Hills C++ Compiler
3659
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3661
# The C++ compiler must be used to create the archive.
3662
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3665
# GNU C++ compiler with Solaris linker
3666
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3667
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3668
if $CC --version | grep -v '^2\.7' > /dev/null; then
3669
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3670
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3671
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3673
# Commands to make compiler produce verbose output that lists
3674
# what "hidden" libraries, object files and flags are used when
3675
# linking a shared library.
3676
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3678
# g++ 2.7 appears to require `-G' NOT `-shared' on this
3680
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3681
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3682
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3684
# Commands to make compiler produce verbose output that lists
3685
# what "hidden" libraries, object files and flags are used when
3686
# linking a shared library.
3687
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3690
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3692
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3694
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3701
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3702
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3703
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3704
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3705
runpath_var='LD_RUN_PATH'
3707
case $cc_basename in
3709
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3710
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3713
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3714
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3718
sysv5* | sco3.2v5* | sco5v6*)
3719
# Note: We can NOT use -z defs as we might desire, because we do not
3720
# link with -lc, and that would cause any symbols used from libc to
3721
# always be unresolved, which means just about no library would
3722
# ever link correctly. If we're not using GNU ld we use -z text
3723
# though, which does catch some bad symbols but isn't as heavy-handed
3725
# For security reasons, it is highly recommended that you always
3726
# use absolute paths for naming shared libraries, and exclude the
3727
# DT_RUNPATH tag from executables and libraries. But doing so
3728
# requires that you compile everything twice, which is a pain.
3729
# So that behaviour is only enabled if SCOABSPATH is set to a
3730
# non-empty value in the environment. Most likely only useful for
3731
# creating official distributions of packages.
3732
# This is a hack until libtool officially supports absolute path
3733
# names for shared libraries.
3734
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3735
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3736
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3737
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3738
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3739
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3740
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3741
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3742
runpath_var='LD_RUN_PATH'
3744
case $cc_basename in
3746
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3747
_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'
3750
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3751
_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'
3756
case $cc_basename in
3758
# NonStop-UX NCC 3.20
3759
# FIXME: insert proper C++ library support
3760
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3763
# FIXME: insert proper C++ library support
3764
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3769
# FIXME: insert proper C++ library support
3770
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3773
# FIXME: insert proper C++ library support
3774
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3777
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3778
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3780
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3781
_LT_AC_TAGVAR(LD, $1)="$LD"
3783
AC_LIBTOOL_POSTDEP_PREDEP($1)
3784
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3785
AC_LIBTOOL_PROG_CC_C_O($1)
3786
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3787
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3788
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3789
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3791
AC_LIBTOOL_CONFIG($1)
3798
with_gnu_ldcxx=$with_gnu_ld
3799
with_gnu_ld=$lt_save_with_gnu_ld
3800
lt_cv_path_LDCXX=$lt_cv_path_LD
3801
lt_cv_path_LD=$lt_save_path_LD
3802
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3803
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3804
])# AC_LIBTOOL_LANG_CXX_CONFIG
3806
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3807
# ------------------------------------
3808
# Figure out "hidden" library dependencies from verbose
3809
# compiler output when linking a shared library.
3810
# Parse the compiler output and extract the necessary
3811
# objects, libraries and library flags.
3812
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3813
dnl we can't use the lt_simple_compile_test_code here,
3814
dnl because it contains code intended for an executable,
3815
dnl not a library. It's possible we should let each
3816
dnl tag define a new lt_????_link_test_code variable,
3817
dnl but it's only used here...
3818
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3820
void foo (void) { a = 0; }
3822
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3826
Foo (void) { a = 0; }
3831
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3839
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3842
public void bar (void) {
3848
dnl Parse the compiler output and extract the necessary
3849
dnl objects, libraries and library flags.
3850
if AC_TRY_EVAL(ac_compile); then
3851
# Parse the compiler output and extract the necessary
3852
# objects, libraries and library flags.
3854
# Sentinel used to keep track of whether or not we are before
3855
# the conftest object file.
3856
pre_test_object_deps_done=no
3858
# The `*' in the case matches for architectures that use `case' in
3859
# $output_verbose_cmd can trigger glob expansion during the loop
3860
# eval without this substitution.
3861
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3863
for p in `eval $output_verbose_link_cmd`; do
3867
# Some compilers place space between "-{L,R}" and the path.
3870
|| test $p = "-R"; then
3877
if test "$pre_test_object_deps_done" = no; then
3880
# Internal compiler library paths should come after those
3881
# provided the user. The postdeps already come after the
3882
# user supplied libs so there is no need to process them.
3883
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3884
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3886
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3889
# The "-l" case would never come before the object being
3890
# linked, so don't bother handling this case.
3893
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3894
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3896
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3902
# This assumes that the test object file only shows up
3903
# once in the compiler output.
3904
if test "$p" = "conftest.$objext"; then
3905
pre_test_object_deps_done=yes
3909
if test "$pre_test_object_deps_done" = no; then
3910
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3911
_LT_AC_TAGVAR(predep_objects, $1)="$p"
3913
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3916
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3917
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
3919
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3924
*) ;; # Ignore the rest.
3932
echo "libtool.m4: error: problem compiling $1 test program"
3935
$rm -f confest.$objext
3937
# PORTME: override above test on systems where it is broken
3941
# Interix 3.5 installs completely hosed .la files for C++, so rather than
3942
# hack all around it, let's just trust "g++" to DTRT.
3943
_LT_AC_TAGVAR(predep_objects,$1)=
3944
_LT_AC_TAGVAR(postdep_objects,$1)=
3945
_LT_AC_TAGVAR(postdeps,$1)=
3949
case `$CC -V 2>&1 | sed 5q` in
3953
# The more standards-conforming stlport4 library is
3954
# incompatible with the Cstd library. Avoid specifying
3955
# it if it's in CXXFLAGS. Ignore libCrun as
3956
# -library=stlport4 depends on it.
3957
case " $CXX $CXXFLAGS " in
3958
*" -library=stlport4 "*)
3959
solaris_use_stlport4=yes
3962
if test "$solaris_use_stlport4" != yes; then
3963
_LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3970
case $cc_basename in
3972
# The more standards-conforming stlport4 library is
3973
# incompatible with the Cstd library. Avoid specifying
3974
# it if it's in CXXFLAGS. Ignore libCrun as
3975
# -library=stlport4 depends on it.
3976
case " $CXX $CXXFLAGS " in
3977
*" -library=stlport4 "*)
3978
solaris_use_stlport4=yes
3982
# Adding this requires a known-good setup of shared libraries for
3983
# Sun compiler versions before 5.6, else PIC objects from an old
3984
# archive will be linked into the output, leading to subtle bugs.
3985
if test "$solaris_use_stlport4" != yes; then
3986
_LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3994
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3995
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3997
])# AC_LIBTOOL_POSTDEP_PREDEP
3999
# AC_LIBTOOL_LANG_F77_CONFIG
4000
# --------------------------
4001
# Ensure that the configuration vars for the C compiler are
4002
# suitably defined. Those variables are subsequently used by
4003
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4004
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4005
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4006
[AC_REQUIRE([AC_PROG_F77])
4007
AC_LANG_PUSH(Fortran 77)
4009
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4010
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4011
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4012
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4013
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4014
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4015
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4016
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4017
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4018
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4019
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4020
_LT_AC_TAGVAR(module_cmds, $1)=
4021
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4022
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4023
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4024
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4025
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4026
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4028
# Source file extension for f77 test sources.
4031
# Object file extension for compiled f77 test sources.
4033
_LT_AC_TAGVAR(objext, $1)=$objext
4035
# Code to be used in simple compile tests
4036
lt_simple_compile_test_code="\
4042
# Code to be used in simple link tests
4043
lt_simple_link_test_code="\
4048
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4051
# save warnings/boilerplate of simple test code
4052
_LT_COMPILER_BOILERPLATE
4053
_LT_LINKER_BOILERPLATE
4055
# Allow CC to be a program name with arguments.
4059
_LT_AC_TAGVAR(compiler, $1)=$CC
4060
_LT_CC_BASENAME([$compiler])
4062
AC_MSG_CHECKING([if libtool supports shared libraries])
4063
AC_MSG_RESULT([$can_build_shared])
4065
AC_MSG_CHECKING([whether to build shared libraries])
4066
test "$can_build_shared" = "no" && enable_shared=no
4068
# On AIX, shared libraries and static libraries use the same namespace, and
4069
# are all built from PIC.
4072
test "$enable_shared" = yes && enable_static=no
4073
if test -n "$RANLIB"; then
4074
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4075
postinstall_cmds='$RANLIB $lib'
4079
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4080
test "$enable_shared" = yes && enable_static=no
4084
AC_MSG_RESULT([$enable_shared])
4086
AC_MSG_CHECKING([whether to build static libraries])
4087
# Make sure either enable_shared or enable_static is yes.
4088
test "$enable_shared" = yes || enable_static=yes
4089
AC_MSG_RESULT([$enable_static])
4091
_LT_AC_TAGVAR(GCC, $1)="$G77"
4092
_LT_AC_TAGVAR(LD, $1)="$LD"
4094
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4095
AC_LIBTOOL_PROG_CC_C_O($1)
4096
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4097
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4098
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4099
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4101
AC_LIBTOOL_CONFIG($1)
4105
])# AC_LIBTOOL_LANG_F77_CONFIG
4108
# AC_LIBTOOL_LANG_GCJ_CONFIG
4109
# --------------------------
4110
# Ensure that the configuration vars for the C compiler are
4111
# suitably defined. Those variables are subsequently used by
4112
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4113
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4114
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4117
# Source file extension for Java test sources.
4120
# Object file extension for compiled Java test sources.
4122
_LT_AC_TAGVAR(objext, $1)=$objext
4124
# Code to be used in simple compile tests
4125
lt_simple_compile_test_code="class foo {}"
4127
# Code to be used in simple link tests
4128
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4130
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4133
# save warnings/boilerplate of simple test code
4134
_LT_COMPILER_BOILERPLATE
4135
_LT_LINKER_BOILERPLATE
4137
# Allow CC to be a program name with arguments.
4141
_LT_AC_TAGVAR(compiler, $1)=$CC
4142
_LT_CC_BASENAME([$compiler])
4144
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4145
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4147
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4149
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4150
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4151
AC_LIBTOOL_PROG_CC_C_O($1)
4152
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4153
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4154
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4155
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4157
AC_LIBTOOL_CONFIG($1)
4161
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4164
# AC_LIBTOOL_LANG_RC_CONFIG
4165
# -------------------------
4166
# Ensure that the configuration vars for the Windows resource compiler are
4167
# suitably defined. Those variables are subsequently used by
4168
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4169
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4170
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4173
# Source file extension for RC test sources.
4176
# Object file extension for compiled RC test sources.
4178
_LT_AC_TAGVAR(objext, $1)=$objext
4180
# Code to be used in simple compile tests
4181
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4183
# Code to be used in simple link tests
4184
lt_simple_link_test_code="$lt_simple_compile_test_code"
4186
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4189
# save warnings/boilerplate of simple test code
4190
_LT_COMPILER_BOILERPLATE
4191
_LT_LINKER_BOILERPLATE
4193
# Allow CC to be a program name with arguments.
4197
_LT_AC_TAGVAR(compiler, $1)=$CC
4198
_LT_CC_BASENAME([$compiler])
4199
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4201
AC_LIBTOOL_CONFIG($1)
4205
])# AC_LIBTOOL_LANG_RC_CONFIG
4208
# AC_LIBTOOL_CONFIG([TAGNAME])
4209
# ----------------------------
4210
# If TAGNAME is not passed, then create an initial libtool script
4211
# with a default configuration from the untagged config vars. Otherwise
4212
# add code to config.status for appending the configuration named by
4213
# TAGNAME from the matching tagged config vars.
4214
AC_DEFUN([AC_LIBTOOL_CONFIG],
4215
[# The else clause should only fire when bootstrapping the
2657
4216
# libtool distribution, otherwise you forgot to ship ltmain.sh
2658
4217
# with your package, and you will get complaints that there are
2659
4218
# no rules to generate ltmain.sh.
2660
4219
if test -f "$ltmain"; then
2663
# If there is no Makefile yet, we rely on a make rule to execute
2664
# `config.status --recheck' to rerun these tests and create the
2665
# libtool script then.
2666
test -f Makefile && make "$ltmain"
2669
if test -f "$ltmain"; then
2670
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2673
echo creating $ofile
4220
# See if we are running on zsh, and set the options which allow our commands through
4221
# without removal of \ escapes.
4222
if test -n "${ZSH_VERSION+set}" ; then
4223
setopt NO_GLOB_SUBST
2675
4225
# Now quote all the things that may contain metacharacters while being
2676
4226
# careful not to overquote the AC_SUBSTed values. We take copies of the
2677
4227
# variables and quote the copies for generation of the libtool script.
2678
for var in echo old_CC old_CFLAGS SED \
2679
AR AR_FLAGS CC LD LN_S NM SHELL \
2680
reload_flag reload_cmds wl \
2681
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2682
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2683
library_names_spec soname_spec \
2684
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2685
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2686
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2687
old_striplib striplib file_magic_cmd export_symbols_cmds \
2688
deplibs_check_method allow_undefined_flag no_undefined_flag \
2689
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2690
global_symbol_to_c_name_address \
2691
hardcode_libdir_flag_spec hardcode_libdir_separator \
4228
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4230
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4231
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4232
deplibs_check_method reload_flag reload_cmds need_locks \
4233
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4234
lt_cv_sys_global_symbol_to_c_name_address \
2692
4235
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2693
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4236
old_postinstall_cmds old_postuninstall_cmds \
4237
_LT_AC_TAGVAR(compiler, $1) \
4238
_LT_AC_TAGVAR(CC, $1) \
4239
_LT_AC_TAGVAR(LD, $1) \
4240
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4241
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4242
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4243
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4244
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4245
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4246
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4247
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4248
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4249
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4250
_LT_AC_TAGVAR(predep_objects, $1) \
4251
_LT_AC_TAGVAR(postdep_objects, $1) \
4252
_LT_AC_TAGVAR(predeps, $1) \
4253
_LT_AC_TAGVAR(postdeps, $1) \
4254
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4255
_LT_AC_TAGVAR(archive_cmds, $1) \
4256
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4257
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4258
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4259
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4260
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4261
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4262
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4263
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4264
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4265
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4266
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4267
_LT_AC_TAGVAR(module_cmds, $1) \
4268
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4269
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4270
_LT_AC_TAGVAR(fix_srcfile_path, $1) \
4271
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4272
_LT_AC_TAGVAR(include_expsyms, $1); do
2696
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4275
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4276
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4277
_LT_AC_TAGVAR(archive_cmds, $1) | \
4278
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4279
_LT_AC_TAGVAR(module_cmds, $1) | \
4280
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4281
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4282
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4283
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4284
postinstall_cmds | postuninstall_cmds | \
2697
4285
old_postinstall_cmds | old_postuninstall_cmds | \
2698
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2699
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2700
postinstall_cmds | postuninstall_cmds | \
2701
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4286
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2702
4287
# Double-quote double-evaled strings.
2703
4288
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3019
cygwin* | mingw* | pw32* | os2*)
3020
cat <<'EOF' >> "${ofile}T"
3021
# This is a source program that is used to create dlls on Windows
3022
# Don't remove nor modify the starting and closing comments
4681
# We use sed instead of cat because bash on DJGPP gets confused if
4682
# if finds mixed CR/LF and LF-only lines. Since sed operates in
4683
# text mode, it properly converts lines to CR/LF. This bash problem
4684
# is reportedly fixed, but why not run on old versions too?
4685
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4687
mv -f "$cfgfile" "$ofile" || \
4688
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4692
# If there is no Makefile yet, we rely on a make rule to execute
4693
# `config.status --recheck' to rerun these tests and create the
4694
# libtool script then.
4695
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4696
if test -f "$ltmain_in"; then
4697
test -f Makefile && make "$ltmain"
4700
])# AC_LIBTOOL_CONFIG
4703
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4704
# -------------------------------------------
4705
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4706
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4708
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4710
if test "$GCC" = yes; then
4711
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4713
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4714
lt_cv_prog_compiler_rtti_exceptions,
4715
[-fno-rtti -fno-exceptions], [],
4716
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4718
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4721
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4722
# ---------------------------------
4723
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4724
[AC_REQUIRE([AC_CANONICAL_HOST])
4725
AC_REQUIRE([LT_AC_PROG_SED])
4726
AC_REQUIRE([AC_PROG_NM])
4727
AC_REQUIRE([AC_OBJEXT])
4728
# Check for command to grab the raw symbol name followed by C symbol from nm.
4729
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4730
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4732
# These are sane defaults that work on at least a few old systems.
4733
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4735
# Character class describing NM global symbol codes.
4736
symcode='[[BCDEGRST]]'
4738
# Regexp to match symbols that can be accessed directly from C.
4739
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4741
# Transform an extracted symbol line into a proper C declaration
4742
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4744
# Transform an extracted symbol line into symbol name and symbol address
4745
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'"
4747
# Define system-specific variables.
4752
cygwin* | mingw* | pw32*)
4753
symcode='[[ABCDGISTW]]'
4755
hpux*) # Its linker distinguishes data from code symbols
4756
if test "$host_cpu" = ia64; then
4757
symcode='[[ABCDEGRST]]'
4759
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4760
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'"
4762
linux* | k*bsd*-gnu)
4763
if test "$host_cpu" = ia64; then
4764
symcode='[[ABCDGIRSTW]]'
4765
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4766
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'"
4770
symcode='[[BCDEGRST]]'
4773
symcode='[[BCDEGQRST]]'
4784
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4788
symcode='[[DFNSTU]]'
4792
# Handle CRLF in mingw tool chain
4796
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4800
# If we're using GNU nm, then use its standard symbol codes.
4801
case `$NM -V 2>&1` in
4802
*GNU* | *'with BFD'*)
4803
symcode='[[ABCDGIRSTW]]' ;;
4806
# Try without a prefix undercore, then with it.
4807
for ac_symprfx in "" "_"; do
4809
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4810
symxfrm="\\1 $ac_symprfx\\2 \\2"
4812
# Write the raw and C identifiers.
4813
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4815
# Check to see that the pipe works correctly.
4819
cat > conftest.$ac_ext <<EOF
4824
void nm_test_func(){}
4828
int main(){nm_test_var='a';nm_test_func();return(0);}
4831
if AC_TRY_EVAL(ac_compile); then
4832
# Now try to grab the symbols.
4834
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4835
# Try sorting and uniquifying the output.
4836
if sort "$nlist" | uniq > "$nlist"T; then
4837
mv -f "$nlist"T "$nlist"
4842
# Make sure that we snagged all the symbols we need.
4843
if grep ' nm_test_var$' "$nlist" >/dev/null; then
4844
if grep ' nm_test_func$' "$nlist" >/dev/null; then
4845
cat <<EOF > conftest.$ac_ext
4851
# Now generate the symbol file.
4852
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4854
cat <<EOF >> conftest.$ac_ext
4855
#if defined (__STDC__) && __STDC__
4856
# define lt_ptr_t void *
4858
# define lt_ptr_t char *
4862
/* The mapping between symbol names and symbols. */
4867
lt_preloaded_symbols[[]] =
4870
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4871
cat <<\EOF >> conftest.$ac_ext
4879
# Now try linking the two files.
4880
mv conftest.$ac_objext conftstm.$ac_objext
4881
lt_save_LIBS="$LIBS"
4882
lt_save_CFLAGS="$CFLAGS"
4883
LIBS="conftstm.$ac_objext"
4884
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4885
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4888
LIBS="$lt_save_LIBS"
4889
CFLAGS="$lt_save_CFLAGS"
4891
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4894
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4897
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4900
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4901
cat conftest.$ac_ext >&5
4903
rm -f conftest* conftst*
4905
# Do not use the global_symbol_pipe unless it works.
4906
if test "$pipe_works" = yes; then
4909
lt_cv_sys_global_symbol_pipe=
4913
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4914
lt_cv_sys_global_symbol_to_cdecl=
4916
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4917
AC_MSG_RESULT(failed)
4921
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4924
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4925
# ---------------------------------------
4926
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4927
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4928
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4929
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4931
AC_MSG_CHECKING([for $compiler option to produce PIC])
4933
# C++ specific cases for pic, static, wl, etc.
4934
if test "$GXX" = yes; then
4935
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4936
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4940
# All AIX code is PIC.
4941
if test "$host_cpu" = ia64; then
4942
# AIX 5 now supports IA64 processor
4943
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4947
# FIXME: we need at least 68020 code to build shared libraries, but
4948
# adding the `-m68020' flag to GCC prevents building anything better,
4950
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4952
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4953
# PIC is the default for these OSes.
4955
mingw* | cygwin* | os2* | pw32*)
4956
# This hack is so that the source file can tell whether it is being
4957
# built for inclusion in a dll (and should export symbols for example).
4958
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4959
# (--disable-auto-import) libraries
4960
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4962
darwin* | rhapsody*)
4963
# PIC is the default on this platform
4964
# Common symbols not allowed in MH_DYLIB files
4965
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4968
# DJGPP does not support shared libraries at all
4969
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4972
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4973
# Instead, we relocate shared libraries at runtime.
4976
if test -d /usr/nec; then
4977
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4981
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4987
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4992
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4998
# All AIX code is PIC.
4999
if test "$host_cpu" = ia64; then
5000
# AIX 5 now supports IA64 processor
5001
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5003
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5007
case $cc_basename in
5009
# Green Hills C++ Compiler
5010
# _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"
5015
# PIC is the default on this platform
5016
# Common symbols not allowed in MH_DYLIB files
5017
case $cc_basename in
5019
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5020
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5025
case $cc_basename in
5027
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5030
# Green Hills C++ Compiler
5031
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5037
freebsd* | dragonfly*)
5038
# FreeBSD uses GNU C++
5040
hpux9* | hpux10* | hpux11*)
5041
case $cc_basename in
5043
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5044
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5045
if test "$host_cpu" != ia64; then
5046
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5050
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5051
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5057
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5066
# This is c89, which is MS Visual C++ (no shared libs)
5067
# Anyone wants to do a port?
5069
irix5* | irix6* | nonstopux*)
5070
case $cc_basename in
5072
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5073
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5074
# CC pic flag -KPIC is the default.
5080
linux* | k*bsd*-gnu)
5081
case $cc_basename in
5084
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5085
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5089
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5091
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5094
# Portland Group C++ compiler.
5095
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5096
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5097
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5101
# Make sure the PIC flag is empty. It appears that all Alpha
5102
# Linux and Compaq Tru64 Unix objects are PIC.
5103
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5104
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5107
case `$CC -V 2>&1 | sed 5q` in
5110
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5111
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5112
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5123
case $cc_basename in
5125
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5133
osf3* | osf4* | osf5*)
5134
case $cc_basename in
5136
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5139
# Rational C++ 2.4.1
5140
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5143
# Digital/Compaq C++
5144
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5145
# Make sure the PIC flag is empty. It appears that all Alpha
5146
# Linux and Compaq Tru64 Unix objects are PIC.
5147
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5148
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5157
case $cc_basename in
5159
# Sun C++ 4.2, 5.x and Centerline C++
5160
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5161
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5162
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5165
# Green Hills C++ Compiler
5166
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5173
case $cc_basename in
5176
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5177
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5181
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5188
case $cc_basename in
5190
# NonStop-UX NCC 3.20
5191
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5197
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5198
case $cc_basename in
5200
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5201
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5202
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5209
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5215
if test "$GCC" = yes; then
5216
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5217
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5221
# All AIX code is PIC.
5222
if test "$host_cpu" = ia64; then
5223
# AIX 5 now supports IA64 processor
5224
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5229
# FIXME: we need at least 68020 code to build shared libraries, but
5230
# adding the `-m68020' flag to GCC prevents building anything better,
5232
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5235
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5236
# PIC is the default for these OSes.
5239
mingw* | cygwin* | pw32* | os2*)
5240
# This hack is so that the source file can tell whether it is being
5241
# built for inclusion in a dll (and should export symbols for example).
5242
# Although the cygwin gcc ignores -fPIC, still need this for old-style
5243
# (--disable-auto-import) libraries
5244
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5247
darwin* | rhapsody*)
5248
# PIC is the default on this platform
5249
# Common symbols not allowed in MH_DYLIB files
5250
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5254
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5255
# Instead, we relocate shared libraries at runtime.
5259
# Just because we use GCC doesn't mean we suddenly get shared libraries
5260
# on systems that don't support them.
5261
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5266
if test -d /usr/nec; then
5267
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5272
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5279
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5285
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5289
# PORTME Check for flag to pass linker flags through the system compiler.
5292
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5293
if test "$host_cpu" = ia64; then
5294
# AIX 5 now supports IA64 processor
5295
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5297
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5301
# PIC is the default on this platform
5302
# Common symbols not allowed in MH_DYLIB files
5303
case $cc_basename in
5305
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5306
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5311
mingw* | cygwin* | pw32* | os2*)
5312
# This hack is so that the source file can tell whether it is being
5313
# built for inclusion in a dll (and should export symbols for example).
5314
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5317
hpux9* | hpux10* | hpux11*)
5318
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5319
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5326
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5329
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5330
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5333
irix5* | irix6* | nonstopux*)
5334
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5335
# PIC (with -KPIC) is the default.
5336
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5340
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5341
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5344
linux* | k*bsd*-gnu)
5345
case $cc_basename in
5347
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5348
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5349
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5351
pgcc* | pgf77* | pgf90* | pgf95*)
5352
# Portland Group compilers (*not* the Pentium gcc compiler,
5353
# which looks to be a dead project)
5354
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5356
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5359
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5360
# All Alpha code is PIC.
5361
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5364
case `$CC -V 2>&1 | sed 5q` in
5367
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5368
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5369
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372
# Sun Fortran 8.3 passes all unrecognized flags to the linker
5373
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5374
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5375
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5382
osf3* | osf4* | osf5*)
5383
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5384
# All OSF/1 code is PIC.
5385
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5389
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5393
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5394
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5395
case $cc_basename in
5397
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5399
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5404
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5405
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5406
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5409
sysv4 | sysv4.2uw2* | sysv4.3*)
5410
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5411
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5412
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5416
if test -d /usr/nec ;then
5417
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5418
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5422
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5423
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5424
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5425
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5429
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5430
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5434
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5435
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5439
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5444
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5447
# Check to make sure the PIC flag actually works.
5449
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5450
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5451
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5452
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5453
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5455
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5457
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5458
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5461
# For platforms which do not support PIC, -DPIC is meaningless:
5463
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5466
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5471
# Check to make sure the static flag actually works.
5473
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5474
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5475
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5476
$lt_tmp_static_flag,
5478
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5482
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5483
# ------------------------------------
5484
# See if the linker supports building shared libraries.
5485
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5486
[AC_REQUIRE([LT_AC_PROG_SED])dnl
5487
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5489
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5492
# If we're using GNU nm, then we don't want the "-C" option.
5493
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5494
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5495
_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'
5497
_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'
5501
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5504
_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'
5507
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5512
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5513
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5514
_LT_AC_TAGVAR(archive_cmds, $1)=
5515
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5516
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5517
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5518
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5519
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5520
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5521
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5522
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5523
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5524
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5525
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5526
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5527
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5528
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5529
_LT_AC_TAGVAR(module_cmds, $1)=
5530
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5531
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5532
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5533
# include_expsyms should be a list of space-separated symbols to be *always*
5534
# included in the symbol list
5535
_LT_AC_TAGVAR(include_expsyms, $1)=
5536
# exclude_expsyms can be an extended regexp of symbols to exclude
5537
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5538
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5539
# as well as any symbol that contains `d'.
5540
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5541
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5542
# platforms (ab)use it in PIC code, but their linkers get confused if
5543
# the symbol is explicitly referenced. Since portable code cannot
5544
# rely on this symbol name, it's probably fine to never include it in
5545
# preloaded symbol tables.
5546
extract_expsyms_cmds=
5547
# Just being paranoid about ensuring that cc_basename is set.
5548
_LT_CC_BASENAME([$compiler])
5550
cygwin* | mingw* | pw32*)
5551
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5552
# When not using gcc, we currently assume that we are using
5553
# Microsoft Visual C++.
5554
if test "$GCC" != yes; then
5559
# we just hope/assume this is gcc and not c89 (= MSVC++)
5567
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5568
if test "$with_gnu_ld" = yes; then
5569
# If archive_cmds runs LD, not CC, wlarc should be empty
5572
# Set some defaults for GNU ld with shared library support. These
5573
# are reset later if shared libraries are not supported. Putting them
5574
# here allows them to be overridden if necessary.
5575
runpath_var=LD_RUN_PATH
5576
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5577
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5578
# ancient GNU ld didn't support --whole-archive et. al.
5579
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5580
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5582
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5584
supports_anon_versioning=no
5585
case `$LD -v 2>/dev/null` in
5586
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5587
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5588
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5589
*\ 2.11.*) ;; # other 2.11 versions
5590
*) supports_anon_versioning=yes ;;
5593
# See if GNU ld supports shared libraries.
5595
aix3* | aix4* | aix5*)
5596
# On AIX/PPC, the GNU linker is very broken
5597
if test "$host_cpu" != ia64; then
5598
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5601
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5602
*** to be unable to reliably create shared libraries on AIX.
5603
*** Therefore, libtool is disabling shared libraries support. If you
5604
*** really care for shared libraries, you may want to modify your PATH
5605
*** so that a non-GNU linker is found, and then restart.
5612
_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)'
5613
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5614
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5616
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5617
# that the semantics of dynamic libraries on AmigaOS, at least up
5618
# to version 4, is to share data among multiple programs linked
5619
# with the same dynamic library. Since this doesn't match the
5620
# behavior of shared libraries on other platforms, we can't use
5622
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5626
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5627
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5628
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5629
# support --undefined. This deserves some investigation. FIXME
5630
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5632
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5636
cygwin* | mingw* | pw32*)
5637
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5638
# as there is no search path for DLLs.
5639
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5640
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5641
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5642
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5643
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5645
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5646
_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'
5647
# If the export-symbols file already is a .def file (1st line
5648
# is EXPORTS), use it as is; otherwise, prepend...
5649
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5650
cp $export_symbols $output_objdir/$soname.def;
5652
echo EXPORTS > $output_objdir/$soname.def;
5653
cat $export_symbols >> $output_objdir/$soname.def;
5655
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5657
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5662
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5663
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5664
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5665
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5666
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5667
# Instead, shared libraries are loaded at an image base (0x10000000 by
5668
# default) and relocated if they conflict, which is a slow very memory
5669
# consuming and fragmenting process. To avoid this, we pick a random,
5670
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5671
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5672
_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'
5673
_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'
5676
gnu* | linux* | k*bsd*-gnu)
5677
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5679
case $cc_basename,$host_cpu in
5680
pgcc*) # Portland Group C compiler
5681
_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'
5682
tmp_addflag=' $pic_flag'
5684
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5685
_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'
5686
tmp_addflag=' $pic_flag -Mnomain' ;;
5687
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5688
tmp_addflag=' -i_dynamic' ;;
5689
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5690
tmp_addflag=' -i_dynamic -nofor_main' ;;
5691
ifc* | ifort*) # Intel Fortran compiler
5692
tmp_addflag=' -nofor_main' ;;
5694
case `$CC -V 2>&1 | sed 5q` in
5695
*Sun\ C*) # Sun C 5.9
5696
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5697
tmp_sharedflag='-G' ;;
5698
*Sun\ F*) # Sun Fortran 8.3
5699
tmp_sharedflag='-G' ;;
5701
tmp_sharedflag='-shared' ;;
5703
_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5705
if test $supports_anon_versioning = yes; then
5706
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5707
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5708
$echo "local: *; };" >> $output_objdir/$libname.ver~
5709
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5712
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5717
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5718
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5721
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5722
_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'
5727
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5728
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5731
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5732
*** create shared libraries on Solaris systems. Therefore, libtool
5733
*** is disabling shared libraries support. We urge you to upgrade GNU
5734
*** binutils to release 2.9.1 or newer. Another option is to modify
5735
*** your PATH or compiler configuration so that the native linker is
5736
*** used, and then restart.
5739
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5740
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5741
_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'
5743
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5747
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5748
case `$LD -v 2>&1` in
5749
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5750
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5753
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5754
*** reliably create shared libraries on SCO systems. Therefore, libtool
5755
*** is disabling shared libraries support. We urge you to upgrade GNU
5756
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5757
*** your PATH or compiler configuration so that the native linker is
5758
*** used, and then restart.
5763
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5764
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5765
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5766
_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'
5768
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5775
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5777
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5778
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5782
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5783
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5784
_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'
5786
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5791
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5793
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5794
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5795
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5798
# PORTME fill in a description of your system's linker (not GNU ld)
5801
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5802
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5803
_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'
5804
# Note: this linker hardcodes the directories in LIBPATH if there
5805
# are no directories specified by -L.
5806
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5807
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5808
# Neither direct hardcoding nor static linking is supported with a
5810
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5815
if test "$host_cpu" = ia64; then
5816
# On IA64, the linker does run time linking by default, so we don't
5817
# have to do anything special.
5818
aix_use_runtimelinking=no
5819
exp_sym_flag='-Bexport'
5822
# If we're using GNU nm, then we don't want the "-C" option.
5823
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5824
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5825
_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'
5827
_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'
5829
aix_use_runtimelinking=no
5831
# Test if we are trying to use run time linking or normal
5832
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5833
# need to do runtime linking.
5834
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5835
for ld_flag in $LDFLAGS; do
5836
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5837
aix_use_runtimelinking=yes
5844
exp_sym_flag='-bexport'
5845
no_entry_flag='-bnoentry'
5848
# When large executables or shared objects are built, AIX ld can
5849
# have problems creating the table of contents. If linking a library
5850
# or program results in "error TOC overflow" add -mminimal-toc to
5851
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5852
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5854
_LT_AC_TAGVAR(archive_cmds, $1)=''
5855
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5856
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5857
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5859
if test "$GCC" = yes; then
5860
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5861
# We only want to do this on AIX 4.2 and lower, the check
5862
# below for broken collect2 doesn't work under 4.3+
5863
collect2name=`${CC} -print-prog-name=collect2`
5864
if test -f "$collect2name" && \
5865
strings "$collect2name" | grep resolve_lib_name >/dev/null
5867
# We have reworked collect2
5870
# We have old collect2
5871
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5872
# It fails to find uninstalled libraries when the uninstalled
5873
# path is not listed in the libpath. Setting hardcode_minus_L
5874
# to unsupported forces relinking
5875
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5876
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5877
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5881
shared_flag='-shared'
5882
if test "$aix_use_runtimelinking" = yes; then
5883
shared_flag="$shared_flag "'${wl}-G'
5887
if test "$host_cpu" = ia64; then
5888
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5889
# chokes on -Wl,-G. The following line is correct:
5892
if test "$aix_use_runtimelinking" = yes; then
5893
shared_flag='${wl}-G'
5895
shared_flag='${wl}-bM:SRE'
5900
# It seems that -bexpall does not export symbols beginning with
5901
# underscore (_), so it is better to generate a list of symbols to export.
5902
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5903
if test "$aix_use_runtimelinking" = yes; then
5904
# Warning - without using the other runtime loading flags (-brtl),
5905
# -berok will link without error, but may produce a broken library.
5906
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5907
# Determine the default libpath from the value encoded in an empty executable.
5908
_LT_AC_SYS_LIBPATH_AIX
5909
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5910
_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"
5912
if test "$host_cpu" = ia64; then
5913
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5914
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5915
_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"
5917
# Determine the default libpath from the value encoded in an empty executable.
5918
_LT_AC_SYS_LIBPATH_AIX
5919
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5920
# Warning - without using the other run time loading flags,
5921
# -berok will link without error, but may produce a broken library.
5922
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5923
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5924
# Exported symbols can be pulled into shared objects from archives
5925
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5926
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5927
# This is similar to how AIX traditionally builds its shared libraries.
5928
_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'
5934
_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)'
5935
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5936
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5937
# see comment about different semantics on the GNU ld section
5938
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5942
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5945
cygwin* | mingw* | pw32*)
5946
# When not using gcc, we currently assume that we are using
5947
# Microsoft Visual C++.
5948
# hardcode_libdir_flag_spec is actually meaningless, as there is
5949
# no search path for DLLs.
5950
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5951
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5952
# Tell ltmain to make .lib files, not .a files.
5954
# Tell ltmain to make .dll files, not .so files.
5956
# FIXME: Setting linknames here is a bad hack.
5957
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5958
# The linker will automatically build a .lib file if we build a DLL.
5959
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5960
# FIXME: Should let the user specify the lib program.
5961
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5962
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5963
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5966
darwin* | rhapsody*)
5968
rhapsody* | darwin1.[[012]])
5969
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5972
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5973
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5975
case ${MACOSX_DEPLOYMENT_TARGET} in
5977
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5980
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5986
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5987
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5988
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5989
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5990
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5991
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5992
if test "$GCC" = yes ; then
5993
output_verbose_link_cmd='echo'
5994
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5995
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5996
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5997
_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}'
5998
_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}'
6000
case $cc_basename in
6002
output_verbose_link_cmd='echo'
6003
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6004
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6005
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6006
_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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6007
_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}'
6010
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6017
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6019
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6023
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6026
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6027
# support. Future versions do this automatically, but an explicit c++rt0.o
6028
# does not break anything, and helps significantly (at the cost of a little
6031
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6032
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6033
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6034
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6037
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6039
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6040
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6041
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6042
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6045
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6046
freebsd* | dragonfly*)
6047
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6048
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6049
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6050
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6054
if test "$GCC" = yes; then
6055
_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'
6057
_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'
6059
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6060
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6061
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6063
# hardcode_minus_L: Not really in the search PATH,
6064
# but as the default location of the library.
6065
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6066
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6070
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6071
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6073
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6075
if test "$with_gnu_ld" = no; then
6076
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6077
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6079
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6080
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6082
# hardcode_minus_L: Not really in the search PATH,
6083
# but as the default location of the library.
6084
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6089
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6092
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6095
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6098
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6104
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6107
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6110
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6114
if test "$with_gnu_ld" = no; then
6115
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6116
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6120
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6121
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6122
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6126
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6128
# hardcode_minus_L: Not really in the search PATH,
6129
# but as the default location of the library.
6130
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6136
irix5* | irix6* | nonstopux*)
6137
if test "$GCC" = yes; then
6138
_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'
6140
_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'
6141
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6143
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6144
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6145
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6149
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6150
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6152
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6154
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6155
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6156
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6160
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6161
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6162
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6163
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6164
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6168
if test -f /usr/libexec/ld.so; then
6169
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6170
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6171
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6172
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6173
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6174
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6175
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6178
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6179
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6180
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6183
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6184
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6189
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6194
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6195
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6196
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6197
_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'
6198
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6202
if test "$GCC" = yes; then
6203
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6204
_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'
6206
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6207
_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'
6209
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6210
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6213
osf4* | osf5*) # as osf3* with the addition of -msym flag
6214
if test "$GCC" = yes; then
6215
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6216
_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'
6217
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6219
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6220
_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'
6221
_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~
6222
$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'
6224
# Both c and cxx compiler support -rpath directly
6225
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6227
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6231
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6232
if test "$GCC" = yes; then
6234
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6235
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6236
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6239
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6240
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6241
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6243
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6244
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6246
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6248
# The compiler driver will combine and reorder linker options,
6249
# but understands `-z linker_flag'. GCC discards it without `$wl',
6250
# but is careful enough not to reorder.
6251
# Supported since Solaris 2.6 (maybe 2.5.1?)
6252
if test "$GCC" = yes; then
6253
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6255
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6259
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6263
if test "x$host_vendor" = xsequent; then
6264
# Use $CC to link under sequent, because it throws in some extra .o
6265
# files that make .init and .fini sections work.
6266
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6268
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6270
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6271
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6272
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6273
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6277
case $host_vendor in
6279
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6280
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6283
## LD is ld it makes a PLAMLIB
6284
## CC just makes a GrossModule.
6285
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6286
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6287
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6290
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6291
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6294
runpath_var='LD_RUN_PATH'
6295
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6299
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6300
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6301
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6305
if test -d /usr/nec; then
6306
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6307
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6308
runpath_var=LD_RUN_PATH
6309
hardcode_runpath_var=yes
6310
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6314
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6315
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6316
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6317
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6318
runpath_var='LD_RUN_PATH'
6320
if test "$GCC" = yes; then
6321
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6322
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6324
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6325
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6329
sysv5* | sco3.2v5* | sco5v6*)
6330
# Note: We can NOT use -z defs as we might desire, because we do not
6331
# link with -lc, and that would cause any symbols used from libc to
6332
# always be unresolved, which means just about no library would
6333
# ever link correctly. If we're not using GNU ld we use -z text
6334
# though, which does catch some bad symbols but isn't as heavy-handed
6336
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6337
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6338
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6339
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6340
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6341
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6342
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6343
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6344
runpath_var='LD_RUN_PATH'
6346
if test "$GCC" = yes; then
6347
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6348
_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'
6350
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6351
_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'
6356
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6357
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6358
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6362
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6367
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6368
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6371
# Do we need to explicitly link libc?
6373
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6375
# Assume -lc should be added
6376
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6378
if test "$enable_shared" = yes && test "$GCC" = yes; then
6379
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6381
# FIXME: we may have to deal with multi-command sequences.
6384
# Test whether the compiler implicitly links with -lc since on some
6385
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6386
# to ld, don't add -lc before -lgcc.
6387
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6389
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6391
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6394
libobjs=conftest.$ac_objext
6396
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6397
pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6403
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6404
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6405
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6407
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6409
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6411
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6413
cat conftest.err 1>&5
6416
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6422
])# AC_LIBTOOL_PROG_LD_SHLIBS
6425
# _LT_AC_FILE_LTDLL_C
6426
# -------------------
6427
# Be careful that the start marker always follows a newline.
6428
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3023
6429
# /* ltdll.c starts here */
3024
6430
# #define WIN32_LEAN_AND_MEAN
3025
6431
# #include <windows.h>
3055
6461
# /* ltdll.c ends here */
3056
# This is a source program that is used to create import libraries
3057
# on Windows for dlls which lack them. Don't remove nor modify the
3058
# starting and closing comments
3059
# /* impgen.c starts here */
3060
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3062
# This file is part of GNU libtool.
3064
# This program is free software; you can redistribute it and/or modify
3065
# it under the terms of the GNU General Public License as published by
3066
# the Free Software Foundation; either version 2 of the License, or
3067
# (at your option) any later version.
3069
# This program is distributed in the hope that it will be useful,
3070
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3071
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3072
# GNU General Public License for more details.
3074
# You should have received a copy of the GNU General Public License
3075
# along with this program; if not, write to the Free Software
3076
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3079
# #include <stdio.h> /* for printf() */
3080
# #include <unistd.h> /* for open(), lseek(), read() */
3081
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3082
# #include <string.h> /* for strdup() */
3084
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3086
# #define O_BINARY 0
3089
# static unsigned int
3090
# pe_get16 (fd, offset)
3094
# unsigned char b[2];
3095
# lseek (fd, offset, SEEK_SET);
3097
# return b[0] + (b[1]<<8);
3100
# static unsigned int
3101
# pe_get32 (fd, offset)
3105
# unsigned char b[4];
3106
# lseek (fd, offset, SEEK_SET);
3108
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3111
# static unsigned int
3115
# unsigned char *b = ptr;
3116
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3125
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3126
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3127
# unsigned long name_rvas, nexp;
3128
# unsigned char *expdata, *erva;
3129
# char *filename, *dll_name;
3131
# filename = argv[1];
3133
# dll = open(filename, O_RDONLY|O_BINARY);
3137
# dll_name = filename;
3139
# for (i=0; filename[i]; i++)
3140
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3141
# dll_name = filename + i +1;
3143
# pe_header_offset = pe_get32 (dll, 0x3c);
3144
# opthdr_ofs = pe_header_offset + 4 + 20;
3145
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3147
# if (num_entries < 1) /* no exports */
3150
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3151
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3152
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3153
# secptr = (pe_header_offset + 4 + 20 +
3154
# pe_get16 (dll, pe_header_offset + 4 + 16));
3157
# for (i = 0; i < nsections; i++)
3160
# unsigned long secptr1 = secptr + 40 * i;
3161
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3162
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3163
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3164
# lseek(dll, secptr1, SEEK_SET);
3165
# read(dll, sname, 8);
3166
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3168
# expptr = fptr + (export_rva - vaddr);
3169
# if (export_rva + export_size > vaddr + vsize)
3170
# export_size = vsize - (export_rva - vaddr);
3175
# expdata = (unsigned char*)malloc(export_size);
3176
# lseek (dll, expptr, SEEK_SET);
3177
# read (dll, expdata, export_size);
3178
# erva = expdata - export_rva;
3180
# nexp = pe_as32 (expdata+24);
3181
# name_rvas = pe_as32 (expdata+32);
3183
# printf ("EXPORTS\n");
3184
# for (i = 0; i<nexp; i++)
3186
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3187
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3192
# /* impgen.c ends here */
3198
# We use sed instead of cat because bash on DJGPP gets confused if
3199
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3200
# text mode, it properly converts lines to CR/LF. This bash problem
3201
# is reportedly fixed, but why not run on old versions too?
3202
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3204
mv -f "${ofile}T" "$ofile" || \
3205
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3211
])# _LT_AC_LTCONFIG_HACK
3213
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3214
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3216
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3217
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3219
# AC_ENABLE_SHARED - implement the --enable-shared flag
3220
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3221
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3223
AC_DEFUN([AC_ENABLE_SHARED],
3224
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3225
AC_ARG_ENABLE(shared,
3226
changequote(<<, >>)dnl
3227
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3228
changequote([, ])dnl
3229
[p=${PACKAGE-default}
3231
yes) enable_shared=yes ;;
3232
no) enable_shared=no ;;
3235
# Look at the argument we got. We use all the common list separators.
3236
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3237
for pkg in $enableval; do
3238
if test "X$pkg" = "X$p"; then
3245
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3248
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3249
AC_DEFUN([AC_DISABLE_SHARED],
3250
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3251
AC_ENABLE_SHARED(no)])
3253
# AC_ENABLE_STATIC - implement the --enable-static flag
3254
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3255
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3257
AC_DEFUN([AC_ENABLE_STATIC],
3258
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3259
AC_ARG_ENABLE(static,
3260
changequote(<<, >>)dnl
3261
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3262
changequote([, ])dnl
3263
[p=${PACKAGE-default}
3265
yes) enable_static=yes ;;
3266
no) enable_static=no ;;
3269
# Look at the argument we got. We use all the common list separators.
3270
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3271
for pkg in $enableval; do
3272
if test "X$pkg" = "X$p"; then
3279
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3282
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3283
AC_DEFUN([AC_DISABLE_STATIC],
3284
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3285
AC_ENABLE_STATIC(no)])
3288
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3289
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3290
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3292
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3293
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3294
AC_ARG_ENABLE(fast-install,
3295
changequote(<<, >>)dnl
3296
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3297
changequote([, ])dnl
3298
[p=${PACKAGE-default}
3300
yes) enable_fast_install=yes ;;
3301
no) enable_fast_install=no ;;
3303
enable_fast_install=no
3304
# Look at the argument we got. We use all the common list separators.
3305
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3306
for pkg in $enableval; do
3307
if test "X$pkg" = "X$p"; then
3308
enable_fast_install=yes
3314
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3317
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3318
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3319
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3320
AC_ENABLE_FAST_INSTALL(no)])
3322
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3323
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3324
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3326
AC_DEFUN([AC_LIBTOOL_PICMODE],
3327
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3328
pic_mode=ifelse($#,1,$1,default)])
3331
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3332
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3333
[AC_MSG_CHECKING([for $1])
3334
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3337
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3340
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3343
ac_save_MAGIC_CMD="$MAGIC_CMD"
3344
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3345
dnl $ac_dummy forces splitting on constant user-supplied paths.
3346
dnl POSIX.2 word splitting is done only on the output of word expansions,
3347
dnl not every word. This closes a longstanding sh security hole.
3348
ac_dummy="ifelse([$2], , $PATH, [$2])"
3349
for ac_dir in $ac_dummy; do
3350
test -z "$ac_dir" && ac_dir=.
3351
if test -f $ac_dir/$1; then
3352
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3353
if test -n "$file_magic_test_file"; then
3354
case $deplibs_check_method in
3356
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3357
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3358
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3359
egrep "$file_magic_regex" > /dev/null; then
3364
*** Warning: the command libtool uses to detect shared libraries,
3365
*** $file_magic_cmd, produces output that libtool cannot recognize.
3366
*** The result is that libtool may fail to recognize shared libraries
3367
*** as such. This will affect the creation of libtool libraries that
3368
*** depend on shared libraries, but programs linked with such libtool
3369
*** libraries will work regardless of this problem. Nevertheless, you
3370
*** may want to report the problem to your system manager and/or to
3371
*** bug-libtool@gnu.org
3381
MAGIC_CMD="$ac_save_MAGIC_CMD"
3384
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3385
if test -n "$MAGIC_CMD"; then
3386
AC_MSG_RESULT($MAGIC_CMD)
3393
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3394
AC_DEFUN([AC_PATH_MAGIC],
3395
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3396
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3397
if test -z "$lt_cv_path_MAGIC_CMD"; then
3398
if test -n "$ac_tool_prefix"; then
3399
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3407
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3408
AC_DEFUN([AC_PROG_LD],
3409
[AC_ARG_WITH(gnu-ld,
3410
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3411
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3412
AC_REQUIRE([AC_PROG_CC])dnl
3413
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3414
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3415
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3417
if test "$GCC" = yes; then
3418
# Check if gcc -print-prog-name=ld gives a path.
3419
AC_MSG_CHECKING([for ld used by GCC])
3422
# gcc leaves a trailing carriage return which upsets mingw
3423
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3425
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3428
# Accept absolute paths.
3429
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3430
re_direlt='/[[^/]][[^/]]*/\.\./'
3431
# Canonicalize the path of ld
3432
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3433
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3434
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3436
test -z "$LD" && LD="$ac_prog"
3439
# If it fails, then pretend we aren't using GCC.
3443
# If it is relative, then search for the first ld in PATH.
3447
elif test "$with_gnu_ld" = yes; then
3448
AC_MSG_CHECKING([for GNU ld])
3450
AC_MSG_CHECKING([for non-GNU ld])
3452
AC_CACHE_VAL(lt_cv_path_LD,
3453
[if test -z "$LD"; then
3454
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3455
for ac_dir in $PATH; do
3456
test -z "$ac_dir" && ac_dir=.
3457
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3458
lt_cv_path_LD="$ac_dir/$ac_prog"
3459
# Check to see if the program is GNU ld. I'd rather use --version,
3460
# but apparently some GNU ld's only accept -v.
3461
# Break only if it was the GNU/non-GNU ld that we prefer.
3462
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3463
test "$with_gnu_ld" != no && break
3465
test "$with_gnu_ld" != yes && break
3471
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3474
if test -n "$LD"; then
3479
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3484
AC_DEFUN([AC_PROG_LD_GNU],
3485
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3486
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3487
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3488
lt_cv_prog_gnu_ld=yes
3490
lt_cv_prog_gnu_ld=no
3492
with_gnu_ld=$lt_cv_prog_gnu_ld
3495
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3496
# -- PORTME Some linkers may need a different reload flag.
3497
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3498
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3499
[lt_cv_ld_reload_flag='-r'])
3500
reload_flag=$lt_cv_ld_reload_flag
3501
test -n "$reload_flag" && reload_flag=" $reload_flag"
3504
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3505
# -- PORTME fill in with the dynamic library characteristics
3506
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3507
[AC_CACHE_CHECK([how to recognise dependent libraries],
3508
lt_cv_deplibs_check_method,
3509
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3510
lt_cv_file_magic_test_file=
3511
lt_cv_deplibs_check_method='unknown'
3512
# Need to set the preceding variable on all platforms that support
3513
# interlibrary dependencies.
3514
# 'none' -- dependencies not supported.
3515
# `unknown' -- same as none, but documents that we really don't know.
3516
# 'pass_all' -- all dependencies passed with no checks.
3517
# 'test_compile' -- check by making test program.
3518
# 'file_magic [[regex]]' -- check by looking for files in library path
3519
# which responds to the $file_magic_cmd with a given egrep regex.
3520
# If you have `file' or equivalent on your system and you're not sure
3521
# whether `pass_all' will *always* work, you probably want this one.
3525
lt_cv_deplibs_check_method=pass_all
3529
lt_cv_deplibs_check_method=pass_all
3533
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3534
lt_cv_file_magic_cmd='/usr/bin/file -L'
3535
lt_cv_file_magic_test_file=/shlib/libc.so
3538
cygwin* | mingw* | pw32*)
3539
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3540
lt_cv_file_magic_cmd='$OBJDUMP -f'
3543
darwin* | rhapsody*)
3544
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3545
lt_cv_file_magic_cmd='/usr/bin/file -L'
3547
rhapsody* | darwin1.[[012]])
3548
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3551
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3557
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3560
# Not sure whether the presence of OpenBSD here was a mistake.
3561
# Let's accept both of them until this is cleared up.
3562
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3563
lt_cv_file_magic_cmd=/usr/bin/file
3564
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3568
lt_cv_deplibs_check_method=pass_all
3573
lt_cv_deplibs_check_method=pass_all
3577
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3578
lt_cv_file_magic_cmd=/usr/bin/file
3579
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3582
irix5* | irix6* | nonstopux*)
3584
irix5* | nonstopux*)
3585
# this will be overridden with pass_all, but let us keep it just in case
3586
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3590
*-32|*"-32 ") libmagic=32-bit;;
3591
*-n32|*"-n32 ") libmagic=N32;;
3592
*-64|*"-64 ") libmagic=64-bit;;
3593
*) libmagic=never-match;;
3595
# this will be overridden with pass_all, but let us keep it just in case
3596
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3599
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3600
lt_cv_deplibs_check_method=pass_all
3603
# This must be Linux ELF.
3606
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3607
lt_cv_deplibs_check_method=pass_all ;;
3609
# glibc up to 2.1.1 does not perform some relocations on ARM
3610
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3612
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3616
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3617
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3619
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3624
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3625
lt_cv_file_magic_cmd=/usr/bin/file
3626
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3630
lt_cv_file_magic_cmd=/usr/bin/file
3631
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3632
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3633
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3635
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3639
osf3* | osf4* | osf5*)
3640
# this will be overridden with pass_all, but let us keep it just in case
3641
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3642
lt_cv_file_magic_test_file=/shlib/libc.so
3643
lt_cv_deplibs_check_method=pass_all
3647
lt_cv_deplibs_check_method=pass_all
3651
lt_cv_deplibs_check_method=pass_all
3652
lt_cv_file_magic_test_file=/lib/libc.so
3655
sysv5uw[[78]]* | sysv4*uw2*)
3656
lt_cv_deplibs_check_method=pass_all
3659
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3660
case $host_vendor in
3662
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]]'
3663
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3666
lt_cv_deplibs_check_method=pass_all
3669
lt_cv_file_magic_cmd='/bin/file'
3670
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3673
lt_cv_file_magic_cmd='/bin/file'
3674
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3675
lt_cv_file_magic_test_file=/lib/libc.so
3678
lt_cv_deplibs_check_method=pass_all
3684
file_magic_cmd=$lt_cv_file_magic_cmd
3685
deplibs_check_method=$lt_cv_deplibs_check_method
3689
# AC_PROG_NM - find the path to a BSD-compatible name lister
3690
AC_DEFUN([AC_PROG_NM],
3691
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3692
AC_MSG_CHECKING([for BSD-compatible nm])
3693
AC_CACHE_VAL(lt_cv_path_NM,
3694
[if test -n "$NM"; then
3695
# Let the user override the test.
3698
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3699
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3700
test -z "$ac_dir" && ac_dir=.
3701
tmp_nm=$ac_dir/${ac_tool_prefix}nm
3702
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3703
# Check to see if the nm accepts a BSD-compat flag.
3704
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3705
# nm: unknown option "B" ignored
3706
# Tru64's nm complains that /dev/null is an invalid object file
3707
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3708
lt_cv_path_NM="$tmp_nm -B"
3710
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3711
lt_cv_path_NM="$tmp_nm -p"
3714
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3715
continue # so that we can try to find one that supports BSD flags
3720
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3723
AC_MSG_RESULT([$NM])
3726
# AC_CHECK_LIBM - check for math library
3727
AC_DEFUN([AC_CHECK_LIBM],
3728
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3731
*-*-beos* | *-*-cygwin* | *-*-pw32*)
3732
# These system don't have libm
3735
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3736
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3739
AC_CHECK_LIB(m, main, LIBM="-lm")
3744
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3745
# the libltdl convenience library and LTDLINCL to the include flags for
3746
# the libltdl header and adds --enable-ltdl-convenience to the
3747
# configure arguments. Note that LIBLTDL and LTDLINCL are not
3748
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3749
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3750
# with '${top_builddir}/' and LTDLINCL will be prefixed with
3751
# '${top_srcdir}/' (note the single quotes!). If your package is not
3752
# flat and you're not using automake, define top_builddir and
3753
# top_srcdir appropriately in the Makefiles.
3754
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3755
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3756
case $enable_ltdl_convenience in
3757
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3758
"") enable_ltdl_convenience=yes
3759
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3761
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3762
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3763
# For backwards non-gettext consistent compatibility...
3767
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3768
# the libltdl installable library and LTDLINCL to the include flags for
3769
# the libltdl header and adds --enable-ltdl-install to the configure
3770
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3771
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3772
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3773
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3774
# with '${top_srcdir}/' (note the single quotes!). If your package is
3775
# not flat and you're not using automake, define top_builddir and
3776
# top_srcdir appropriately in the Makefiles.
3777
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3778
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3779
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3780
AC_CHECK_LIB(ltdl, main,
3781
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3782
[if test x"$enable_ltdl_install" = xno; then
3783
AC_MSG_WARN([libltdl not installed, but installation disabled])
3785
enable_ltdl_install=yes
3788
if test x"$enable_ltdl_install" = x"yes"; then
3789
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3790
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3791
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3793
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3797
# For backwards non-gettext consistent compatibility...
6462
])# _LT_AC_FILE_LTDLL_C
6465
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6466
# ---------------------------------
6467
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
3802
6471
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])