1767
1700
])# AC_LIBTOOL_DLOPEN_SELF
1770
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1771
# ---------------------------------
1772
# Check to see if options -c and -o are simultaneously supported by compiler
1773
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1774
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1775
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1776
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1777
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1778
$rm -r conftest 2>/dev/null
1782
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1784
lt_compiler_flag="-o out/conftest2.$ac_objext"
1785
# Insert the option either (1) after the last *FLAGS variable, or
1786
# (2) before a word containing "conftest.", or (3) at the end.
1787
# Note that $ac_compile itself does not contain backslashes and begins
1788
# with a dollar sign (not a hyphen), so the echo should work correctly.
1789
lt_compile=`echo "$ac_compile" | $SED \
1790
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1791
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1792
-e 's:$: $lt_compiler_flag:'`
1793
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1794
(eval "$lt_compile" 2>out/conftest.err)
1796
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1797
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1798
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1800
# The compiler can only warn and ignore the option if not recognized
1801
# So say no if there are warnings
1802
if test ! -s out/conftest.err; then
1803
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1808
# SGI C++ compiler will create directory out/ii_files/ for
1809
# template instantiation
1810
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1811
$rm out/* && rmdir out
1816
])# AC_LIBTOOL_PROG_CC_C_O
1819
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1820
# -----------------------------------------
1702
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1703
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1704
# Sed substitution that helps us do robust quoting. It backslashifies
1705
# metacharacters that are still active within double-quoted strings.
1706
Xsed='sed -e s/^X//'
1707
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1709
# Same as above, but do not quote variable references.
1710
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1712
# Sed substitution to delay expansion of an escaped shell variable in a
1713
# double_quote_subst'ed string.
1714
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1720
default_ofile=libtool
1721
can_build_shared=yes
1723
# All known linkers require a `.a' archive for static linking (except M$VC,
1724
# which needs '.lib').
1726
ltmain="$ac_aux_dir/ltmain.sh"
1727
ofile="$default_ofile"
1728
with_gnu_ld="$lt_cv_prog_gnu_ld"
1729
need_locks="$enable_libtool_lock"
1732
old_CFLAGS="$CFLAGS"
1734
# Set sane defaults for various variables
1735
test -z "$AR" && AR=ar
1736
test -z "$AR_FLAGS" && AR_FLAGS=cru
1737
test -z "$AS" && AS=as
1738
test -z "$CC" && CC=cc
1739
test -z "$DLLTOOL" && DLLTOOL=dlltool
1740
test -z "$LD" && LD=ld
1741
test -z "$LN_S" && LN_S="ln -s"
1742
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1743
test -z "$NM" && NM=nm
1744
test -z "$OBJDUMP" && OBJDUMP=objdump
1745
test -z "$RANLIB" && RANLIB=:
1746
test -z "$STRIP" && STRIP=:
1747
test -z "$ac_objext" && ac_objext=o
1749
if test x"$host" != x"$build"; then
1750
ac_tool_prefix=${host_alias}-
1755
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1758
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1763
# AIX sometimes has problems with the GCC collect2 program. For some
1764
# reason, if we set the COLLECT_NAMES environment variable, the problems
1765
# vanish in a puff of smoke.
1766
if test "X${COLLECT_NAMES+set}" != Xset; then
1768
export COLLECT_NAMES
1773
# Determine commands to create old-style static archives.
1774
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1775
old_postinstall_cmds='chmod 644 $oldlib'
1776
old_postuninstall_cmds=
1778
if test -n "$RANLIB"; then
1781
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1784
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1787
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1790
# Allow CC to be a program name with arguments.
1794
AC_MSG_CHECKING([for objdir])
1795
rm -f .libs 2>/dev/null
1796
mkdir .libs 2>/dev/null
1797
if test -d .libs; then
1800
# MS-DOS does not allow filenames that begin with a dot.
1803
rmdir .libs 2>/dev/null
1804
AC_MSG_RESULT($objdir)
1808
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1809
pic_mode="$withval", pic_mode=default)
1810
test -z "$pic_mode" && pic_mode=default
1812
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1813
# in isolation, and that seeing it set (from the cache) indicates that
1814
# the associated values are set (in the cache) correctly too.
1815
AC_MSG_CHECKING([for $compiler option to produce PIC])
1816
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1817
[ lt_cv_prog_cc_pic=
1818
lt_cv_prog_cc_shlib=
1820
lt_cv_prog_cc_static=
1821
lt_cv_prog_cc_no_builtin=
1822
lt_cv_prog_cc_can_build_shared=$can_build_shared
1824
if test "$GCC" = yes; then
1825
lt_cv_prog_cc_wl='-Wl,'
1826
lt_cv_prog_cc_static='-static'
1830
# Below there is a dirty hack to force normal static linking with -ldl
1831
# The problem is because libdl dynamically linked with both libc and
1832
# libC (AIX C++ library), which obviously doesn't included in libraries
1833
# list by gcc. This cause undefined symbols with -static flags.
1834
# This hack allows C programs to be linked with "-static -ldl", but
1835
# not sure about C++ programs.
1836
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1839
# FIXME: we need at least 68020 code to build shared libraries, but
1840
# adding the `-m68020' flag to GCC prevents building anything better,
1842
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1844
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1845
# PIC is the default for these OSes.
1847
darwin* | rhapsody*)
1848
# PIC is the default on this platform
1849
# Common symbols not allowed in MH_DYLIB files
1850
lt_cv_prog_cc_pic='-fno-common'
1852
cygwin* | mingw* | pw32* | os2*)
1853
# This hack is so that the source file can tell whether it is being
1854
# built for inclusion in a dll (and should export symbols for example).
1855
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1858
if test -d /usr/nec; then
1859
lt_cv_prog_cc_pic=-Kconform_pic
1863
lt_cv_prog_cc_pic='-fPIC'
1867
# PORTME Check for PIC flags for the system compiler.
1869
aix3* | aix4* | aix5*)
1870
lt_cv_prog_cc_wl='-Wl,'
1871
# All AIX code is PIC.
1872
if test "$host_cpu" = ia64; then
1873
# AIX 5 now supports IA64 processor
1874
lt_cv_prog_cc_static='-Bstatic'
1876
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1880
hpux9* | hpux10* | hpux11*)
1881
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1882
lt_cv_prog_cc_wl='-Wl,'
1883
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1884
lt_cv_prog_cc_pic='+Z'
1888
lt_cv_prog_cc_wl='-Wl,'
1889
lt_cv_prog_cc_static='-non_shared'
1890
# PIC (with -KPIC) is the default.
1893
cygwin* | mingw* | pw32* | os2*)
1894
# This hack is so that the source file can tell whether it is being
1895
# built for inclusion in a dll (and should export symbols for example).
1896
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1900
lt_cv_prog_cc_pic='-KPIC'
1901
lt_cv_prog_cc_static='-Bstatic'
1904
osf3* | osf4* | osf5*)
1905
# All OSF/1 code is PIC.
1906
lt_cv_prog_cc_wl='-Wl,'
1907
lt_cv_prog_cc_static='-non_shared'
1911
lt_cv_prog_cc_pic='-Kpic'
1912
lt_cv_prog_cc_static='-dn'
1913
lt_cv_prog_cc_shlib='-belf'
1917
lt_cv_prog_cc_pic='-KPIC'
1918
lt_cv_prog_cc_static='-Bstatic'
1919
lt_cv_prog_cc_wl='-Wl,'
1923
lt_cv_prog_cc_pic='-PIC'
1924
lt_cv_prog_cc_static='-Bstatic'
1925
lt_cv_prog_cc_wl='-Qoption ld '
1928
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1929
lt_cv_prog_cc_pic='-KPIC'
1930
lt_cv_prog_cc_static='-Bstatic'
1931
if test "x$host_vendor" = xsni; then
1932
lt_cv_prog_cc_wl='-LD'
1934
lt_cv_prog_cc_wl='-Wl,'
1939
lt_cv_prog_cc_pic='-pic'
1940
lt_cv_prog_cc_static='-Bstatic'
1944
if test -d /usr/nec ;then
1945
lt_cv_prog_cc_pic='-Kconform_pic'
1946
lt_cv_prog_cc_static='-Bstatic'
1951
lt_cv_prog_cc_can_build_shared=no
1956
if test -z "$lt_cv_prog_cc_pic"; then
1957
AC_MSG_RESULT([none])
1959
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1961
# Check to make sure the pic_flag actually works.
1962
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1963
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1964
save_CFLAGS="$CFLAGS"
1965
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1966
AC_TRY_COMPILE([], [], [dnl
1968
hpux9* | hpux10* | hpux11*)
1969
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1970
# they create non-PIC objects. So, if there were any warnings, we
1971
# assume that PIC is not supported.
1972
if test -s conftest.err; then
1973
lt_cv_prog_cc_pic_works=no
1975
lt_cv_prog_cc_pic_works=yes
1979
lt_cv_prog_cc_pic_works=yes
1983
lt_cv_prog_cc_pic_works=no
1985
CFLAGS="$save_CFLAGS"
1988
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1990
lt_cv_prog_cc_can_build_shared=no
1992
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1995
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1998
# Check for any special shared library compilation flags.
1999
if test -n "$lt_cv_prog_cc_shlib"; then
2000
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2001
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2003
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2004
lt_cv_prog_cc_can_build_shared=no
2008
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2009
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2010
lt_cv_prog_cc_static_works=no
2011
save_LDFLAGS="$LDFLAGS"
2012
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2013
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2014
LDFLAGS="$save_LDFLAGS"
2017
# Belt *and* braces to stop my trousers falling down:
2018
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2019
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2021
pic_flag="$lt_cv_prog_cc_pic"
2022
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2023
wl="$lt_cv_prog_cc_wl"
2024
link_static_flag="$lt_cv_prog_cc_static"
2025
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2026
can_build_shared="$lt_cv_prog_cc_can_build_shared"
2029
# Check to see if options -o and -c are simultaneously supported by compiler
2030
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2031
AC_CACHE_VAL([lt_cv_compiler_c_o], [
2032
$rm -r conftest 2>/dev/null
2035
echo "int some_variable = 0;" > conftest.$ac_ext
2037
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2038
# that will create temporary files in the current directory regardless of
2039
# the output directory. Thus, making CWD read-only will cause this test
2040
# to fail, enabling locking or at least warning the user not to do parallel
2043
save_CFLAGS="$CFLAGS"
2044
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2046
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2047
# The compiler can only warn and ignore the option if not recognized
2048
# So say no if there are warnings
2049
if test -s out/conftest.err; then
2050
lt_cv_compiler_c_o=no
2052
lt_cv_compiler_c_o=yes
2055
# Append any errors to the config.log.
2056
cat out/conftest.err 1>&AC_FD_CC
2057
lt_cv_compiler_c_o=no
2059
CFLAGS="$save_CFLAGS"
2065
$rm -r conftest 2>/dev/null
2067
compiler_c_o=$lt_cv_compiler_c_o
2068
AC_MSG_RESULT([$compiler_c_o])
2070
if test x"$compiler_c_o" = x"yes"; then
2071
# Check to see if we can write to a .lo
2072
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2073
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2074
lt_cv_compiler_o_lo=no
2075
save_CFLAGS="$CFLAGS"
2076
CFLAGS="$CFLAGS -c -o conftest.lo"
2077
save_objext="$ac_objext"
2079
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2080
# The compiler can only warn and ignore the option if not recognized
2081
# So say no if there are warnings
2082
if test -s conftest.err; then
2083
lt_cv_compiler_o_lo=no
2085
lt_cv_compiler_o_lo=yes
2088
ac_objext="$save_objext"
2089
CFLAGS="$save_CFLAGS"
2091
compiler_o_lo=$lt_cv_compiler_o_lo
2092
AC_MSG_RESULT([$compiler_o_lo])
1821
2097
# Check to see if we can do hard links to lock some files if needed
1822
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1823
[AC_REQUIRE([_LT_AC_LOCK])dnl
1825
2098
hard_links="nottested"
1826
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2099
if test "$compiler_c_o" = no && test "$need_locks" != no; then
1827
2100
# do not overwrite the value of need_locks provided by the user
1828
2101
AC_MSG_CHECKING([if we can lock with hard links])
1834
2107
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1835
2108
AC_MSG_RESULT([$hard_links])
1836
2109
if test "$hard_links" = no; then
1837
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2110
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1838
2111
need_locks=warn
1843
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1848
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1849
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1850
[rm -f .libs 2>/dev/null
1851
mkdir .libs 2>/dev/null
1852
if test -d .libs; then
2117
if test "$GCC" = yes; then
2118
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2119
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2120
echo "int some_variable = 0;" > conftest.$ac_ext
2121
save_CFLAGS="$CFLAGS"
2122
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2123
compiler_rtti_exceptions=no
2124
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2125
# The compiler can only warn and ignore the option if not recognized
2126
# So say no if there are warnings
2127
if test -s conftest.err; then
2128
compiler_rtti_exceptions=no
2130
compiler_rtti_exceptions=yes
2133
CFLAGS="$save_CFLAGS"
2134
AC_MSG_RESULT([$compiler_rtti_exceptions])
2136
if test "$compiler_rtti_exceptions" = "yes"; then
2137
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2139
no_builtin_flag=' -fno-builtin'
2143
# See if the linker supports building shared libraries.
2144
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2146
allow_undefined_flag=
2148
need_lib_prefix=unknown
2149
need_version=unknown
2150
# when you set need_version to no, make sure it does not cause -set_version
2151
# flags to be left without arguments
2153
archive_expsym_cmds=
2154
old_archive_from_new_cmds=
2155
old_archive_from_expsyms_cmds=
2156
export_dynamic_flag_spec=
2157
whole_archive_flag_spec=
2158
thread_safe_flag_spec=
2159
hardcode_into_libs=no
2160
hardcode_libdir_flag_spec=
2161
hardcode_libdir_separator=
2164
hardcode_shlibpath_var=unsupported
2166
link_all_deplibs=unknown
2167
always_export_symbols=no
2168
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2169
# include_expsyms should be a list of space-separated symbols to be *always*
2170
# included in the symbol list
2172
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2173
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2174
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2175
# as well as any symbol that contains `d'.
2176
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2177
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2178
# platforms (ab)use it in PIC code, but their linkers get confused if
2179
# the symbol is explicitly referenced. Since portable code cannot
2180
# rely on this symbol name, it's probably fine to never include it in
2181
# preloaded symbol tables.
2182
extract_expsyms_cmds=
2185
cygwin* | mingw* | pw32*)
2186
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2187
# When not using gcc, we currently assume that we are using
2188
# Microsoft Visual C++.
2189
if test "$GCC" != yes; then
2199
if test "$with_gnu_ld" = yes; then
2200
# If archive_cmds runs LD, not CC, wlarc should be empty
2203
# See if GNU ld supports shared libraries.
2205
aix3* | aix4* | aix5*)
2206
# On AIX, the GNU linker is very broken
2207
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2211
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2212
*** to be unable to reliably create shared libraries on AIX.
2213
*** Therefore, libtool is disabling shared libraries support. If you
2214
*** really care for shared libraries, you may want to modify your PATH
2215
*** so that a non-GNU linker is found, and then restart.
2221
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)'
2222
hardcode_libdir_flag_spec='-L$libdir'
2223
hardcode_minus_L=yes
2225
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2226
# that the semantics of dynamic libraries on AmigaOS, at least up
2227
# to version 4, is to share data among multiple programs linked
2228
# with the same dynamic library. Since this doesn't match the
2229
# behavior of shared libraries on other platforms, we can use
2235
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2236
allow_undefined_flag=unsupported
2237
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2238
# support --undefined. This deserves some investigation. FIXME
2239
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2245
cygwin* | mingw* | pw32*)
2246
# hardcode_libdir_flag_spec is actually meaningless, as there is
2247
# no search path for DLLs.
2248
hardcode_libdir_flag_spec='-L$libdir'
2249
allow_undefined_flag=unsupported
2250
always_export_symbols=yes
2252
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2253
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2254
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2255
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2256
else $CC -o impgen impgen.c ; fi)~
2257
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2259
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2261
# cygwin and mingw dlls have different entry points and sets of symbols
2263
# FIXME: what about values for MSVC?
2264
dll_entry=__cygwin_dll_entry@12
2265
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2269
dll_entry=_DllMainCRTStartup@12
2270
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2274
# mingw and cygwin differ, and it's simplest to just exclude the union
2275
# of the two symbol sets.
2276
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2278
# recent cygwin and mingw systems supply a stub DllMain which the user
2279
# can override, but on older systems we have to supply one (in ltdll.c)
2280
if test "x$lt_cv_need_dllmain" = "xyes"; then
2281
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2282
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~
2283
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2289
# Extract the symbol export list from an `--export-all' def file,
2290
# then regenerate the def file from the symbol export list, so that
2291
# the compiled dll only exports the symbol export list.
2292
# Be careful not to strip the DATA tag left be newer dlltools.
2293
export_symbols_cmds="$ltdll_cmds"'
2294
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2295
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2297
# If the export-symbols file already is a .def file (1st line
2298
# is EXPORTS), use it as is.
2299
# If DATA tags from a recent dlltool are present, honour them!
2300
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2301
cp $export_symbols $output_objdir/$soname-def;
2303
echo EXPORTS > $output_objdir/$soname-def;
2305
cat $export_symbols | while read symbol; do
2308
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2309
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2311
_lt_hint=`expr 1 + \$_lt_hint`;
2315
$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~
2316
$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~
2317
$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~
2318
$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~
2319
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2323
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2324
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2327
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2328
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2333
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2337
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2338
*** create shared libraries on Solaris systems. Therefore, libtool
2339
*** is disabling shared libraries support. We urge you to upgrade GNU
2340
*** binutils to release 2.9.1 or newer. Another option is to modify
2341
*** your PATH or compiler configuration so that the native linker is
2342
*** used, and then restart.
2345
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2346
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2347
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2354
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2357
hardcode_shlibpath_var=no
2361
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2362
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2363
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2370
if test "$ld_shlibs" = yes; then
2371
runpath_var=LD_RUN_PATH
2372
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2373
export_dynamic_flag_spec='${wl}--export-dynamic'
2375
cygwin* | mingw* | pw32*)
2376
# dlltool doesn't understand --whole-archive et. al.
2377
whole_archive_flag_spec=
2380
# ancient GNU ld didn't support --whole-archive et. al.
2381
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2382
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2384
whole_archive_flag_spec=
1855
# MS-DOS does not allow filenames that begin with a dot.
2390
# PORTME fill in a description of your system's linker (not GNU ld)
2393
allow_undefined_flag=unsupported
2394
always_export_symbols=yes
2395
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'
2396
# Note: this linker hardcodes the directories in LIBPATH if there
2397
# are no directories specified by -L.
2398
hardcode_minus_L=yes
2399
if test "$GCC" = yes && test -z "$link_static_flag"; then
2400
# Neither direct hardcoding nor static linking is supported with a
2402
hardcode_direct=unsupported
2407
if test "$host_cpu" = ia64; then
2408
# On IA64, the linker does run time linking by default, so we don't
2409
# have to do anything special.
2410
aix_use_runtimelinking=no
2411
exp_sym_flag='-Bexport'
2414
aix_use_runtimelinking=no
2416
# Test if we are trying to use run time linking or normal
2417
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2418
# need to do runtime linking.
2419
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2420
for ld_flag in $LDFLAGS; do
2421
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2422
aix_use_runtimelinking=yes
2428
exp_sym_flag='-bexport'
2429
no_entry_flag='-bnoentry'
2432
# When large executables or shared objects are built, AIX ld can
2433
# have problems creating the table of contents. If linking a library
2434
# or program results in "error TOC overflow" add -mminimal-toc to
2435
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2436
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2440
hardcode_libdir_separator=':'
2441
if test "$GCC" = yes; then
2442
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2443
collect2name=`${CC} -print-prog-name=collect2`
2444
if test -f "$collect2name" && \
2445
strings "$collect2name" | grep resolve_lib_name >/dev/null
2447
# We have reworked collect2
2450
# We have old collect2
2451
hardcode_direct=unsupported
2452
# It fails to find uninstalled libraries when the uninstalled
2453
# path is not listed in the libpath. Setting hardcode_minus_L
2454
# to unsupported forces relinking
2455
hardcode_minus_L=yes
2456
hardcode_libdir_flag_spec='-L$libdir'
2457
hardcode_libdir_separator=
2461
shared_flag='-shared'
2464
if test "$host_cpu" = ia64; then
2465
shared_flag='${wl}-G'
2467
if test "$aix_use_runtimelinking" = yes; then
2468
shared_flag='${wl}-G'
2470
shared_flag='${wl}-bM:SRE'
2475
# It seems that -bexpall can do strange things, so it is better to
2476
# generate a list of symbols to export.
2477
always_export_symbols=yes
2478
if test "$aix_use_runtimelinking" = yes; then
2479
# Warning - without using the other runtime loading flags (-brtl),
2480
# -berok will link without error, but may produce a broken library.
2481
allow_undefined_flag='-berok'
2482
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2483
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"
2485
if test "$host_cpu" = ia64; then
2486
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2487
allow_undefined_flag="-z nodefs"
2488
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"
2490
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2491
# Warning - without using the other run time loading flags,
2492
# -berok will link without error, but may produce a broken library.
2493
allow_undefined_flag='${wl}-berok'
2494
# This is a bit strange, but is similar to how AIX traditionally builds
2495
# it's shared libraries.
2496
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'
2502
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)'
2503
hardcode_libdir_flag_spec='-L$libdir'
2504
hardcode_minus_L=yes
2505
# see comment about different semantics on the GNU ld section
2509
cygwin* | mingw* | pw32*)
2510
# When not using gcc, we currently assume that we are using
2511
# Microsoft Visual C++.
2512
# hardcode_libdir_flag_spec is actually meaningless, as there is
2513
# no search path for DLLs.
2514
hardcode_libdir_flag_spec=' '
2515
allow_undefined_flag=unsupported
2516
# Tell ltmain to make .lib files, not .a files.
2518
# FIXME: Setting linknames here is a bad hack.
2519
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2520
# The linker will automatically build a .lib file if we build a DLL.
2521
old_archive_from_new_cmds='true'
2522
# FIXME: Should let the user specify the lib program.
2523
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2524
fix_srcfile_path='`cygpath -w "$srcfile"`'
2527
darwin* | rhapsody*)
2529
rhapsody* | darwin1.[[012]])
2530
allow_undefined_flag='-undefined suppress'
2533
allow_undefined_flag='-flat_namespace -undefined suppress'
2536
# FIXME: Relying on posixy $() will cause problems for
2537
# cross-compilation, but unfortunately the echo tests do not
2538
# yet detect zsh echo's removal of \ escapes.
2539
archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2540
# We need to add '_' to the symbols in $export_symbols first
2541
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2543
hardcode_shlibpath_var=no
2544
whole_archive_flag_spec='-all_load $convenience'
2551
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2552
# support. Future versions do this automatically, but an explicit c++rt0.o
2553
# does not break anything, and helps significantly (at the cost of a little
2556
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2557
hardcode_libdir_flag_spec='-R$libdir'
2559
hardcode_shlibpath_var=no
2562
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2564
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2566
hardcode_minus_L=yes
2567
hardcode_shlibpath_var=no
2570
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2572
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2573
hardcode_libdir_flag_spec='-R$libdir'
2575
hardcode_shlibpath_var=no
2578
hpux9* | hpux10* | hpux11*)
2580
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' ;;
2581
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2583
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2584
hardcode_libdir_separator=:
2586
hardcode_minus_L=yes # Not in the search PATH, but as the default
2587
# location of the library.
2588
export_dynamic_flag_spec='${wl}-E'
2592
if test "$GCC" = yes; then
2593
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'
2595
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'
2597
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2598
hardcode_libdir_separator=:
2599
link_all_deplibs=yes
2603
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2604
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2606
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2608
hardcode_libdir_flag_spec='-R$libdir'
2610
hardcode_shlibpath_var=no
2614
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2616
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2617
hardcode_libdir_separator=:
2618
hardcode_shlibpath_var=no
2623
hardcode_shlibpath_var=no
2624
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2625
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2626
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2627
export_dynamic_flag_spec='${wl}-E'
2630
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2631
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2632
hardcode_libdir_flag_spec='-R$libdir'
2635
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2636
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2643
hardcode_libdir_flag_spec='-L$libdir'
2644
hardcode_minus_L=yes
2645
allow_undefined_flag=unsupported
2646
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'
2647
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2651
if test "$GCC" = yes; then
2652
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2653
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'
2655
allow_undefined_flag=' -expect_unresolved \*'
2656
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'
2658
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2659
hardcode_libdir_separator=:
2662
osf4* | osf5*) # as osf3* with the addition of -msym flag
2663
if test "$GCC" = yes; then
2664
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2665
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'
2666
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2668
allow_undefined_flag=' -expect_unresolved \*'
2669
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'
2670
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2671
$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'
2673
#Both c and cxx compiler support -rpath directly
2674
hardcode_libdir_flag_spec='-rpath $libdir'
2676
hardcode_libdir_separator=:
2680
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2681
hardcode_shlibpath_var=no
2682
runpath_var=LD_RUN_PATH
2683
hardcode_runpath_var=yes
2684
export_dynamic_flag_spec='${wl}-Bexport'
2688
# gcc --version < 3.0 without binutils cannot create self contained
2689
# shared libraries reliably, requiring libgcc.a to resolve some of
2690
# the object symbols generated in some cases. Libraries that use
2691
# assert need libgcc.a to resolve __eprintf, for example. Linking
2692
# a copy of libgcc.a into every shared library to guarantee resolving
2693
# such symbols causes other problems: According to Tim Van Holder
2694
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2695
# (to the application) exception stack for one thing.
2696
no_undefined_flag=' -z defs'
2697
if test "$GCC" = yes; then
2698
case `$CC --version 2>/dev/null` in
2702
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2703
*** create self contained shared libraries on Solaris systems, without
2704
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2705
*** -no-undefined support, which will at least allow you to build shared
2706
*** libraries. However, you may find that when you link such libraries
2707
*** into an application without using GCC, you have to manually add
2708
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2709
*** upgrade to a newer version of GCC. Another option is to rebuild your
2710
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2717
# $CC -shared without GNU ld will not create a library from C++
2718
# object files and a static libstdc++, better avoid it by now
2719
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2720
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2721
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2722
hardcode_libdir_flag_spec='-R$libdir'
2723
hardcode_shlibpath_var=no
2725
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2726
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2727
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2729
link_all_deplibs=yes
2733
if test "x$host_vendor" = xsequent; then
2734
# Use $CC to link under sequent, because it throws in some extra .o
2735
# files that make .init and .fini sections work.
2736
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2738
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2740
hardcode_libdir_flag_spec='-L$libdir'
2742
hardcode_minus_L=yes
2743
hardcode_shlibpath_var=no
2747
if test "x$host_vendor" = xsno; then
2748
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2749
hardcode_direct=yes # is this really true???
2751
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2752
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2754
runpath_var='LD_RUN_PATH'
2755
hardcode_shlibpath_var=no
2759
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2760
hardcode_shlibpath_var=no
2761
export_dynamic_flag_spec='-Bexport'
2765
no_undefined_flag=' -z text'
2766
# $CC -shared without GNU ld will not create a library from C++
2767
# object files and a static libstdc++, better avoid it by now
2768
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2769
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2770
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2771
hardcode_libdir_flag_spec=
2772
hardcode_shlibpath_var=no
2773
runpath_var='LD_RUN_PATH'
2777
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2778
hardcode_libdir_flag_spec='-L$libdir'
2779
hardcode_shlibpath_var=no
2783
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2784
hardcode_libdir_flag_spec='-L$libdir'
2785
hardcode_shlibpath_var=no
2789
if test -d /usr/nec; then
2790
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2791
hardcode_shlibpath_var=no
2792
runpath_var=LD_RUN_PATH
2793
hardcode_runpath_var=yes
2799
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2802
hardcode_shlibpath_var=no
2803
hardcode_runpath_var=yes
2804
runpath_var=LD_RUN_PATH
2807
sysv5uw7* | unixware7*)
2808
no_undefined_flag='${wl}-z ${wl}text'
2809
if test "$GCC" = yes; then
2810
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2812
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2814
runpath_var='LD_RUN_PATH'
2815
hardcode_shlibpath_var=no
1858
rmdir .libs 2>/dev/null])
1859
objdir=$lt_cv_objdir
1860
])# AC_LIBTOOL_OBJDIR
1863
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1864
# ----------------------------------------------
2823
AC_MSG_RESULT([$ld_shlibs])
2824
test "$ld_shlibs" = no && can_build_shared=no
1865
2826
# Check hardcoding attributes.
1866
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1867
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1868
_LT_AC_TAGVAR(hardcode_action, $1)=
1869
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1870
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1871
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2827
AC_MSG_CHECKING([how to hardcode library paths into programs])
2829
if test -n "$hardcode_libdir_flag_spec" || \
2830
test -n "$runpath_var"; then
1873
2832
# We can hardcode non-existant directories.
1874
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2833
if test "$hardcode_direct" != no &&
1875
2834
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1876
2835
# have to relink, otherwise we might link with an installed library
1877
2836
# when we should be linking with a yet-to-be-installed one
1878
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1879
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2837
## test "$hardcode_shlibpath_var" != no &&
2838
test "$hardcode_minus_L" != no; then
1880
2839
# Linking always hardcodes the temporary library directory.
1881
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2840
hardcode_action=relink
1883
2842
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1884
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2843
hardcode_action=immediate
1887
2846
# We cannot hardcode anything, or else we can only hardcode existing
1889
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1891
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1893
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1894
# Fast installation is not supported
1895
enable_fast_install=no
1896
elif test "$shlibpath_overrides_runpath" = yes ||
1897
test "$enable_shared" = no; then
1898
# Fast installation is not necessary
1899
enable_fast_install=needless
1901
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1904
# AC_LIBTOOL_SYS_LIB_STRIP
1905
# ------------------------
1906
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2848
hardcode_action=unsupported
2850
AC_MSG_RESULT([$hardcode_action])
1909
2854
AC_MSG_CHECKING([whether stripping libraries is possible])
1910
2855
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3232
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3233
soname_spec='${libname}${release}.so$major'
3234
shlibpath_var=LD_LIBRARY_PATH
3241
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3242
soname_spec='${libname}${release}.so$major'
3243
shlibpath_var=LD_LIBRARY_PATH
2469
3247
if test -d /usr/nec ;then
2470
3248
version_type=linux
2471
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2472
soname_spec='$libname${shared_ext}.$major'
3249
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3250
soname_spec='$libname.so.$major'
2473
3251
shlibpath_var=LD_LIBRARY_PATH
2479
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2480
soname_spec='${libname}${release}${shared_ext}$major'
2481
shlibpath_var=LD_LIBRARY_PATH
2485
3256
dynamic_linker=no
2488
3259
AC_MSG_RESULT([$dynamic_linker])
2489
3260
test "$dynamic_linker" = no && can_build_shared=no
2490
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2495
AC_DEFUN([_LT_AC_TAGCONFIG],
2496
[AC_ARG_WITH([tags],
2497
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2498
[include additional configurations @<:@automatic@:>@])],
2499
[tagnames="$withval"])
2501
if test -f "$ltmain" && test -n "$tagnames"; then
2502
if test ! -f "${ofile}"; then
2503
AC_MSG_WARN([output file `$ofile' does not exist])
2506
if test -z "$LTCC"; then
2507
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2508
if test -z "$LTCC"; then
2509
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2511
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2515
# Extract list of available tagged configurations in $ofile.
2516
# Note that this assumes the entire list is on one line.
2517
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2519
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2520
for tagname in $tagnames; do
2522
# Check whether tagname contains only valid characters
2523
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2525
*) AC_MSG_ERROR([invalid tag name: $tagname])
2529
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2531
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2534
# Update the list of available tags.
2535
if test -n "$tagname"; then
2536
echo appending configuration tag \"$tagname\" to $ofile
2540
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2541
AC_LIBTOOL_LANG_CXX_CONFIG
2548
if test -n "$F77" && test "X$F77" != "Xno"; then
2549
AC_LIBTOOL_LANG_F77_CONFIG
2556
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2557
AC_LIBTOOL_LANG_GCJ_CONFIG
2564
AC_LIBTOOL_LANG_RC_CONFIG
2568
AC_MSG_ERROR([Unsupported tag name: $tagname])
2572
# Append the new tag name to the list of available tags.
2573
if test -n "$tagname" ; then
2574
available_tags="$available_tags $tagname"
2580
# Now substitute the updated list of available tags.
2581
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2582
mv "${ofile}T" "$ofile"
2586
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2589
])# _LT_AC_TAGCONFIG
2594
# enable checks for dlopen support
2595
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2596
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2597
])# AC_LIBTOOL_DLOPEN
2600
# AC_LIBTOOL_WIN32_DLL
2601
# --------------------
2602
# declare package support for building win32 dll's
2603
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2604
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2605
])# AC_LIBTOOL_WIN32_DLL
2608
# AC_ENABLE_SHARED([DEFAULT])
2609
# ---------------------------
2610
# implement the --enable-shared flag
2611
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2612
AC_DEFUN([AC_ENABLE_SHARED],
2613
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2614
AC_ARG_ENABLE([shared],
2615
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2616
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2617
[p=${PACKAGE-default}
2619
yes) enable_shared=yes ;;
2620
no) enable_shared=no ;;
2623
# Look at the argument we got. We use all the common list separators.
2624
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2625
for pkg in $enableval; do
2627
if test "X$pkg" = "X$p"; then
2634
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2635
])# AC_ENABLE_SHARED
2640
#- set the default shared flag to --disable-shared
2641
AC_DEFUN([AC_DISABLE_SHARED],
2642
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2643
AC_ENABLE_SHARED(no)
2644
])# AC_DISABLE_SHARED
2647
# AC_ENABLE_STATIC([DEFAULT])
2648
# ---------------------------
2649
# implement the --enable-static flag
2650
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2651
AC_DEFUN([AC_ENABLE_STATIC],
2652
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2653
AC_ARG_ENABLE([static],
2654
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2655
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2656
[p=${PACKAGE-default}
2658
yes) enable_static=yes ;;
2659
no) enable_static=no ;;
2662
# Look at the argument we got. We use all the common list separators.
2663
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2664
for pkg in $enableval; do
2666
if test "X$pkg" = "X$p"; then
2673
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2674
])# AC_ENABLE_STATIC
2679
# set the default static flag to --disable-static
2680
AC_DEFUN([AC_DISABLE_STATIC],
2681
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2682
AC_ENABLE_STATIC(no)
2683
])# AC_DISABLE_STATIC
2686
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2687
# ---------------------------------
2688
# implement the --enable-fast-install flag
2689
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2690
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2691
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2692
AC_ARG_ENABLE([fast-install],
2693
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2694
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2695
[p=${PACKAGE-default}
2697
yes) enable_fast_install=yes ;;
2698
no) enable_fast_install=no ;;
2700
enable_fast_install=no
2701
# Look at the argument we got. We use all the common list separators.
2702
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2703
for pkg in $enableval; do
2705
if test "X$pkg" = "X$p"; then
2706
enable_fast_install=yes
2712
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2713
])# AC_ENABLE_FAST_INSTALL
2716
# AC_DISABLE_FAST_INSTALL
2717
# -----------------------
2718
# set the default to --disable-fast-install
2719
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2720
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2721
AC_ENABLE_FAST_INSTALL(no)
2722
])# AC_DISABLE_FAST_INSTALL
2725
# AC_LIBTOOL_PICMODE([MODE])
2726
# --------------------------
2727
# implement the --with-pic flag
2728
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2729
AC_DEFUN([AC_LIBTOOL_PICMODE],
2730
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2731
pic_mode=ifelse($#,1,$1,default)
2732
])# AC_LIBTOOL_PICMODE
2737
# This is predefined starting with Autoconf 2.54, so this conditional
2738
# definition can be removed once we require Autoconf 2.54 or later.
2739
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2740
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2741
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2742
then ac_cv_prog_egrep='grep -E'
2743
else ac_cv_prog_egrep='egrep'
2745
EGREP=$ac_cv_prog_egrep
2750
# AC_PATH_TOOL_PREFIX
2751
# -------------------
2752
# find a file program which can recognise shared library
2753
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2754
[AC_REQUIRE([AC_PROG_EGREP])dnl
2755
AC_MSG_CHECKING([for $1])
2756
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2758
[[\\/*] | ?:[\\/]*])
2759
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2762
lt_save_MAGIC_CMD="$MAGIC_CMD"
2763
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2764
dnl $ac_dummy forces splitting on constant user-supplied paths.
2765
dnl POSIX.2 word splitting is done only on the output of word expansions,
2766
dnl not every word. This closes a longstanding sh security hole.
2767
ac_dummy="ifelse([$2], , $PATH, [$2])"
2768
for ac_dir in $ac_dummy; do
2770
test -z "$ac_dir" && ac_dir=.
2771
if test -f $ac_dir/$1; then
2772
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2773
if test -n "$file_magic_test_file"; then
2774
case $deplibs_check_method in
2776
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2777
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2778
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2779
$EGREP "$file_magic_regex" > /dev/null; then
2784
*** Warning: the command libtool uses to detect shared libraries,
2785
*** $file_magic_cmd, produces output that libtool cannot recognize.
2786
*** The result is that libtool may fail to recognize shared libraries
2787
*** as such. This will affect the creation of libtool libraries that
2788
*** depend on shared libraries, but programs linked with such libtool
2789
*** libraries will work regardless of this problem. Nevertheless, you
2790
*** may want to report the problem to your system manager and/or to
2791
*** bug-libtool@gnu.org
2801
MAGIC_CMD="$lt_save_MAGIC_CMD"
2804
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2805
if test -n "$MAGIC_CMD"; then
2806
AC_MSG_RESULT($MAGIC_CMD)
2810
])# AC_PATH_TOOL_PREFIX
2815
# find a file program which can recognise a shared library
2816
AC_DEFUN([AC_PATH_MAGIC],
2817
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2818
if test -z "$lt_cv_path_MAGIC_CMD"; then
2819
if test -n "$ac_tool_prefix"; then
2820
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2830
# find the pathname to the GNU or non-GNU linker
2831
AC_DEFUN([AC_PROG_LD],
2832
[AC_ARG_WITH([gnu-ld],
2833
[AC_HELP_STRING([--with-gnu-ld],
2834
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2835
[test "$withval" = no || with_gnu_ld=yes],
2837
AC_REQUIRE([LT_AC_PROG_SED])dnl
2838
AC_REQUIRE([AC_PROG_CC])dnl
2839
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2840
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2842
if test "$GCC" = yes; then
2843
# Check if gcc -print-prog-name=ld gives a path.
2844
AC_MSG_CHECKING([for ld used by $CC])
2847
# gcc leaves a trailing carriage return which upsets mingw
2848
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2850
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2853
# Accept absolute paths.
2854
[[\\/]]* | ?:[[\\/]]*)
2855
re_direlt='/[[^/]][[^/]]*/\.\./'
2856
# Canonicalize the pathname of ld
2857
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2858
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2859
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2861
test -z "$LD" && LD="$ac_prog"
2864
# If it fails, then pretend we aren't using GCC.
2868
# If it is relative, then search for the first ld in PATH.
2872
elif test "$with_gnu_ld" = yes; then
2873
AC_MSG_CHECKING([for GNU ld])
2875
AC_MSG_CHECKING([for non-GNU ld])
2877
AC_CACHE_VAL(lt_cv_path_LD,
2878
[if test -z "$LD"; then
2879
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2880
for ac_dir in $PATH; do
2882
test -z "$ac_dir" && ac_dir=.
2883
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2884
lt_cv_path_LD="$ac_dir/$ac_prog"
2885
# Check to see if the program is GNU ld. I'd rather use --version,
2886
# but apparently some GNU ld's only accept -v.
2887
# Break only if it was the GNU/non-GNU ld that we prefer.
2888
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2889
*GNU* | *'with BFD'*)
2890
test "$with_gnu_ld" != no && break
2893
test "$with_gnu_ld" != yes && break
2900
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2903
if test -n "$LD"; then
2908
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2915
AC_DEFUN([AC_PROG_LD_GNU],
2916
[AC_REQUIRE([AC_PROG_EGREP])dnl
2917
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2918
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2919
case `$LD -v 2>&1 </dev/null` in
2920
*GNU* | *'with BFD'*)
2921
lt_cv_prog_gnu_ld=yes
2924
lt_cv_prog_gnu_ld=no
2927
with_gnu_ld=$lt_cv_prog_gnu_ld
2931
# AC_PROG_LD_RELOAD_FLAG
2932
# ----------------------
2933
# find reload flag for linker
2934
# -- PORTME Some linkers may need a different reload flag.
2935
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2936
[AC_CACHE_CHECK([for $LD option to reload object files],
2937
lt_cv_ld_reload_flag,
2938
[lt_cv_ld_reload_flag='-r'])
2939
reload_flag=$lt_cv_ld_reload_flag
2940
case $reload_flag in
2942
*) reload_flag=" $reload_flag" ;;
2944
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2945
])# AC_PROG_LD_RELOAD_FLAG
2948
# AC_DEPLIBS_CHECK_METHOD
2949
# -----------------------
2950
# how to check for library dependencies
2951
# -- PORTME fill in with the dynamic library characteristics
2952
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2953
[AC_CACHE_CHECK([how to recognise dependent libraries],
2954
lt_cv_deplibs_check_method,
2955
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2956
lt_cv_file_magic_test_file=
2957
lt_cv_deplibs_check_method='unknown'
2958
# Need to set the preceding variable on all platforms that support
2959
# interlibrary dependencies.
2960
# 'none' -- dependencies not supported.
2961
# `unknown' -- same as none, but documents that we really don't know.
2962
# 'pass_all' -- all dependencies passed with no checks.
2963
# 'test_compile' -- check by making test program.
2964
# 'file_magic [[regex]]' -- check by looking for files in library path
2965
# which responds to the $file_magic_cmd with a given extended regex.
2966
# If you have `file' or equivalent on your system and you're not sure
2967
# whether `pass_all' will *always* work, you probably want this one.
2971
lt_cv_deplibs_check_method=pass_all
2975
lt_cv_deplibs_check_method=pass_all
2979
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2980
lt_cv_file_magic_cmd='/usr/bin/file -L'
2981
lt_cv_file_magic_test_file=/shlib/libc.so
2985
# func_win32_libid is a shell function defined in ltmain.sh
2986
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2987
lt_cv_file_magic_cmd='func_win32_libid'
2991
# Base MSYS/MinGW do not provide the 'file' command needed by
2992
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2993
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2994
lt_cv_file_magic_cmd='$OBJDUMP -f'
2997
darwin* | rhapsody*)
2998
lt_cv_deplibs_check_method=pass_all
3001
freebsd* | kfreebsd*-gnu)
3002
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3005
# Not sure whether the presence of OpenBSD here was a mistake.
3006
# Let's accept both of them until this is cleared up.
3007
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3008
lt_cv_file_magic_cmd=/usr/bin/file
3009
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3013
lt_cv_deplibs_check_method=pass_all
3018
lt_cv_deplibs_check_method=pass_all
3021
hpux10.20* | hpux11*)
3022
lt_cv_file_magic_cmd=/usr/bin/file
3025
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3026
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3029
[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]']
3030
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3033
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3034
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3039
irix5* | irix6* | nonstopux*)
3041
*-32|*"-32 ") libmagic=32-bit;;
3042
*-n32|*"-n32 ") libmagic=N32;;
3043
*-64|*"-64 ") libmagic=64-bit;;
3044
*) libmagic=never-match;;
3046
lt_cv_deplibs_check_method=pass_all
3049
# This must be Linux ELF.
3051
lt_cv_deplibs_check_method=pass_all
3054
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3055
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3056
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3058
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3063
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3064
lt_cv_file_magic_cmd=/usr/bin/file
3065
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3069
lt_cv_deplibs_check_method=unknown
3073
lt_cv_file_magic_cmd=/usr/bin/file
3074
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3075
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3076
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3078
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3082
osf3* | osf4* | osf5*)
3083
lt_cv_deplibs_check_method=pass_all
3087
lt_cv_deplibs_check_method=pass_all
3091
lt_cv_deplibs_check_method=pass_all
3094
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3095
case $host_vendor in
3097
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]]'
3098
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3101
lt_cv_deplibs_check_method=pass_all
3104
lt_cv_file_magic_cmd='/bin/file'
3105
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3108
lt_cv_file_magic_cmd='/bin/file'
3109
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3110
lt_cv_file_magic_test_file=/lib/libc.so
3113
lt_cv_deplibs_check_method=pass_all
3118
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3119
lt_cv_deplibs_check_method=pass_all
3123
file_magic_cmd=$lt_cv_file_magic_cmd
3124
deplibs_check_method=$lt_cv_deplibs_check_method
3125
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3126
])# AC_DEPLIBS_CHECK_METHOD
3131
# find the pathname to a BSD-compatible name lister
3132
AC_DEFUN([AC_PROG_NM],
3133
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3134
[if test -n "$NM"; then
3135
# Let the user override the test.
3138
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3139
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3141
test -z "$ac_dir" && ac_dir=.
3142
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3143
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3144
# Check to see if the nm accepts a BSD-compat flag.
3145
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3146
# nm: unknown option "B" ignored
3147
# Tru64's nm complains that /dev/null is an invalid object file
3148
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3149
*/dev/null* | *'Invalid file or object type'*)
3150
lt_cv_path_NM="$tmp_nm -B"
3154
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3156
lt_cv_path_NM="$tmp_nm -p"
3160
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3161
continue # so that we can try to find one that supports BSD flags
3168
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3176
# check for math library
3177
AC_DEFUN([AC_CHECK_LIBM],
3178
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3181
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3182
# These system don't have libm, or don't need it
3185
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3186
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3189
AC_CHECK_LIB(m, cos, LIBM="-lm")
3195
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3196
# -----------------------------------
3197
# sets LIBLTDL to the link flags for the libltdl convenience library and
3198
# LTDLINCL to the include flags for the libltdl header and adds
3199
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3200
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3201
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3202
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3203
# '${top_srcdir}/' (note the single quotes!). If your package is not
3204
# flat and you're not using automake, define top_builddir and
3205
# top_srcdir appropriately in the Makefiles.
3206
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3207
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3208
case $enable_ltdl_convenience in
3209
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3210
"") enable_ltdl_convenience=yes
3211
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3213
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3214
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3215
# For backwards non-gettext consistent compatibility...
3217
])# AC_LIBLTDL_CONVENIENCE
3220
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3221
# -----------------------------------
3222
# sets LIBLTDL to the link flags for the libltdl installable library and
3223
# LTDLINCL to the include flags for the libltdl header and adds
3224
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3225
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3226
# DIRECTORY is not provided and an installed libltdl is not found, it is
3227
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3228
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3229
# quotes!). If your package is not flat and you're not using automake,
3230
# define top_builddir and top_srcdir appropriately in the Makefiles.
3231
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3232
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3233
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3234
AC_CHECK_LIB(ltdl, lt_dlinit,
3235
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3236
[if test x"$enable_ltdl_install" = xno; then
3237
AC_MSG_WARN([libltdl not installed, but installation disabled])
3239
enable_ltdl_install=yes
3242
if test x"$enable_ltdl_install" = x"yes"; then
3243
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3244
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3245
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3247
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3251
# For backwards non-gettext consistent compatibility...
3253
])# AC_LIBLTDL_INSTALLABLE
3258
# enable support for C++ libraries
3259
AC_DEFUN([AC_LIBTOOL_CXX],
3260
[AC_REQUIRE([_LT_AC_LANG_CXX])
3266
AC_DEFUN([_LT_AC_LANG_CXX],
3267
[AC_REQUIRE([AC_PROG_CXX])
3268
AC_REQUIRE([AC_PROG_CXXCPP])
3269
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3275
# enable support for Fortran 77 libraries
3276
AC_DEFUN([AC_LIBTOOL_F77],
3277
[AC_REQUIRE([_LT_AC_LANG_F77])
3283
AC_DEFUN([_LT_AC_LANG_F77],
3284
[AC_REQUIRE([AC_PROG_F77])
3285
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3291
# enable support for GCJ libraries
3292
AC_DEFUN([AC_LIBTOOL_GCJ],
3293
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3299
AC_DEFUN([_LT_AC_LANG_GCJ],
3300
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3301
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3302
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3303
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3304
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3305
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3306
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3312
# enable support for Windows resource files
3313
AC_DEFUN([AC_LIBTOOL_RC],
3314
[AC_REQUIRE([LT_AC_PROG_RC])
3315
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3319
# AC_LIBTOOL_LANG_C_CONFIG
3320
# ------------------------
3321
# Ensure that the configuration vars for the C compiler are
3322
# suitably defined. Those variables are subsequently used by
3323
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3324
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3325
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3329
# Source file extension for C test sources.
3332
# Object file extension for compiled C test sources.
3334
_LT_AC_TAGVAR(objext, $1)=$objext
3336
# Code to be used in simple compile tests
3337
lt_simple_compile_test_code="int some_variable = 0;\n"
3339
# Code to be used in simple link tests
3340
lt_simple_link_test_code='int main(){return(0);}\n'
3345
# Check for any special shared library compilation flags.
3347
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3348
if test "$GCC" = no; then
3351
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3355
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3356
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3357
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3359
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3360
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3366
# Check to make sure the static flag actually works.
3368
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3369
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3370
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3372
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3375
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3376
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3377
AC_LIBTOOL_PROG_CC_C_O($1)
3378
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3379
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3380
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3381
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3382
AC_LIBTOOL_SYS_LIB_STRIP
3383
AC_LIBTOOL_DLOPEN_SELF($1)
3385
# Report which librarie types wil actually be built
3262
# Report the final consequences.
3386
3263
AC_MSG_CHECKING([if libtool supports shared libraries])
3387
3264
AC_MSG_RESULT([$can_build_shared])
3404
3281
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3405
3282
test "$enable_shared" = yes && enable_static=no
3408
darwin* | rhapsody*)
3409
if test "$GCC" = yes; then
3410
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3412
rhapsody* | darwin1.[[012]])
3413
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3416
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3417
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3419
case ${MACOSX_DEPLOYMENT_TARGET} in
3421
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3424
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3430
output_verbose_link_cmd='echo'
3431
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3432
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3433
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3434
_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}'
3435
_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}'
3436
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3437
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3438
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3439
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3440
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3442
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3446
AC_MSG_RESULT([$enable_shared])
3448
AC_MSG_CHECKING([whether to build static libraries])
3449
# Make sure either enable_shared or enable_static is yes.
3450
test "$enable_shared" = yes || enable_static=yes
3451
AC_MSG_RESULT([$enable_static])
3453
AC_LIBTOOL_CONFIG($1)
3457
])# AC_LIBTOOL_LANG_C_CONFIG
3460
# AC_LIBTOOL_LANG_CXX_CONFIG
3461
# --------------------------
3462
# Ensure that the configuration vars for the C compiler are
3463
# suitably defined. Those variables are subsequently used by
3464
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3465
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3466
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3468
AC_REQUIRE([AC_PROG_CXX])
3469
AC_REQUIRE([AC_PROG_CXXCPP])
3471
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3472
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3473
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3474
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3475
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3476
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3477
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3478
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3479
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3480
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3481
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3482
_LT_AC_TAGVAR(module_cmds, $1)=
3483
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3484
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3485
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3486
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3487
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3488
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3490
# Dependencies to place before and after the object being linked:
3491
_LT_AC_TAGVAR(predep_objects, $1)=
3492
_LT_AC_TAGVAR(postdep_objects, $1)=
3493
_LT_AC_TAGVAR(predeps, $1)=
3494
_LT_AC_TAGVAR(postdeps, $1)=
3495
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3497
# Source file extension for C++ test sources.
3500
# Object file extension for compiled C++ test sources.
3502
_LT_AC_TAGVAR(objext, $1)=$objext
3504
# Code to be used in simple compile tests
3505
lt_simple_compile_test_code="int some_variable = 0;\n"
3507
# Code to be used in simple link tests
3508
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3510
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3513
# Allow CC to be a program name with arguments.
3518
lt_save_with_gnu_ld=$with_gnu_ld
3519
lt_save_path_LD=$lt_cv_path_LD
3520
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3521
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3523
unset lt_cv_prog_gnu_ld
3525
if test -n "${lt_cv_path_LDCXX+set}"; then
3526
lt_cv_path_LD=$lt_cv_path_LDCXX
3530
test -z "${LDCXX+set}" || LD=$LDCXX
3533
_LT_AC_TAGVAR(compiler, $1)=$CC
3534
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3536
# We don't want -fno-exception wen compiling C++ code, so set the
3537
# no_builtin_flag separately
3538
if test "$GXX" = yes; then
3539
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3541
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3544
if test "$GXX" = yes; then
3545
# Set up default GNU C++ configuration
3549
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3550
# archiving commands below assume that GNU ld is being used.
3551
if test "$with_gnu_ld" = yes; then
3552
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3553
_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'
3555
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3556
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3558
# If archive_cmds runs LD, not CC, wlarc should be empty
3559
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3560
# investigate it a little bit more. (MM)
3563
# ancient GNU ld didn't support --whole-archive et. al.
3564
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3565
grep 'no-whole-archive' > /dev/null; then
3566
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3568
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3574
# A generic and very simple default shared library creation
3575
# command for GNU C++ for the case where it uses the native
3576
# linker, instead of GNU ld. If possible, this setting should
3577
# overridden to take advantage of the native linker features on
3578
# the platform it is being used on.
3579
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3582
# Commands to make compiler produce verbose output that lists
3583
# what "hidden" libraries, object files and flags are used when
3584
# linking a shared library.
3585
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3593
# PORTME: fill in a description of your system's C++ link characteristics
3594
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3595
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3598
# FIXME: insert proper C++ library support
3599
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3602
if test "$host_cpu" = ia64; then
3603
# On IA64, the linker does run time linking by default, so we don't
3604
# have to do anything special.
3605
aix_use_runtimelinking=no
3606
exp_sym_flag='-Bexport'
3609
aix_use_runtimelinking=no
3611
# Test if we are trying to use run time linking or normal
3612
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3613
# need to do runtime linking.
3614
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3615
for ld_flag in $LDFLAGS; do
3618
aix_use_runtimelinking=yes
3625
exp_sym_flag='-bexport'
3626
no_entry_flag='-bnoentry'
3629
# When large executables or shared objects are built, AIX ld can
3630
# have problems creating the table of contents. If linking a library
3631
# or program results in "error TOC overflow" add -mminimal-toc to
3632
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3633
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3635
_LT_AC_TAGVAR(archive_cmds, $1)=''
3636
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3637
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3638
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3640
if test "$GXX" = yes; then
3641
case $host_os in aix4.[012]|aix4.[012].*)
3642
# We only want to do this on AIX 4.2 and lower, the check
3643
# below for broken collect2 doesn't work under 4.3+
3644
collect2name=`${CC} -print-prog-name=collect2`
3645
if test -f "$collect2name" && \
3646
strings "$collect2name" | grep resolve_lib_name >/dev/null
3648
# We have reworked collect2
3649
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3651
# We have old collect2
3652
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3653
# It fails to find uninstalled libraries when the uninstalled
3654
# path is not listed in the libpath. Setting hardcode_minus_L
3655
# to unsupported forces relinking
3656
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3657
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3658
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3661
shared_flag='-shared'
3664
if test "$host_cpu" = ia64; then
3665
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3666
# chokes on -Wl,-G. The following line is correct:
3669
if test "$aix_use_runtimelinking" = yes; then
3670
shared_flag='${wl}-G'
3672
shared_flag='${wl}-bM:SRE'
3677
# It seems that -bexpall does not export symbols beginning with
3678
# underscore (_), so it is better to generate a list of symbols to export.
3679
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3680
if test "$aix_use_runtimelinking" = yes; then
3681
# Warning - without using the other runtime loading flags (-brtl),
3682
# -berok will link without error, but may produce a broken library.
3683
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3684
# Determine the default libpath from the value encoded in an empty executable.
3685
_LT_AC_SYS_LIBPATH_AIX
3686
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3688
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
3690
if test "$host_cpu" = ia64; then
3691
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3692
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3693
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3695
# Determine the default libpath from the value encoded in an empty executable.
3696
_LT_AC_SYS_LIBPATH_AIX
3697
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3698
# Warning - without using the other run time loading flags,
3699
# -berok will link without error, but may produce a broken library.
3700
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3701
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3702
# -bexpall does not export symbols beginning with underscore (_)
3703
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3704
# Exported symbols can be pulled into shared objects from archives
3705
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3706
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3707
# This is similar to how AIX traditionally builds it's shared libraries.
3708
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3713
case $cc_basename in
3715
# FIXME: insert proper C++ library support
3716
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3721
cygwin* | mingw* | pw32*)
3722
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3723
# as there is no search path for DLLs.
3724
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3725
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3726
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3727
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3729
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3730
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3731
# If the export-symbols file already is a .def file (1st line
3732
# is EXPORTS), use it as is; otherwise, prepend...
3733
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3734
cp $export_symbols $output_objdir/$soname.def;
3736
echo EXPORTS > $output_objdir/$soname.def;
3737
cat $export_symbols >> $output_objdir/$soname.def;
3739
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3741
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3745
darwin* | rhapsody*)
3746
if test "$GXX" = yes; then
3747
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3749
rhapsody* | darwin1.[[012]])
3750
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3753
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3754
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3756
case ${MACOSX_DEPLOYMENT_TARGET} in
3758
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3761
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3767
lt_int_apple_cc_single_mod=no
3768
output_verbose_link_cmd='echo'
3769
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3770
lt_int_apple_cc_single_mod=yes
3772
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3773
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3775
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3777
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3779
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3780
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3781
_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}'
3783
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
3785
_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}'
3786
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3787
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3788
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3789
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3790
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3792
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3797
case $cc_basename in
3799
# FIXME: insert proper C++ library support
3800
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3803
# Green Hills C++ Compiler
3804
# FIXME: insert proper C++ library support
3805
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3808
# FIXME: insert proper C++ library support
3809
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3814
# C++ shared libraries reported to be fairly broken before switch to ELF
3815
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3818
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3820
freebsd* | kfreebsd*-gnu)
3821
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3823
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3828
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3829
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3830
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3831
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3832
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3833
# but as the default
3834
# location of the library.
3836
case $cc_basename in
3838
# FIXME: insert proper C++ library support
3839
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3842
_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'
3843
# Commands to make compiler produce verbose output that lists
3844
# what "hidden" libraries, object files and flags are used when
3845
# linking a shared library.
3847
# There doesn't appear to be a way to prevent this compiler from
3848
# explicitly linking system object files so we need to strip them
3849
# from the output so that they don't get included in the library
3851
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'
3854
if test "$GXX" = yes; then
3855
_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'
3857
# FIXME: insert proper C++ library support
3858
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3864
if test $with_gnu_ld = no; then
3867
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3868
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3869
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3872
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3875
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3876
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3877
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3883
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3884
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3887
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3888
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3889
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3890
# but as the default
3891
# location of the library.
3894
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3895
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3896
# but as the default
3897
# location of the library.
3901
case $cc_basename in
3903
# FIXME: insert proper C++ library support
3904
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3909
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3912
_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'
3915
# Commands to make compiler produce verbose output that lists
3916
# what "hidden" libraries, object files and flags are used when
3917
# linking a shared library.
3919
# There doesn't appear to be a way to prevent this compiler from
3920
# explicitly linking system object files so we need to strip them
3921
# from the output so that they don't get included in the library
3923
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'
3926
if test "$GXX" = yes; then
3927
if test $with_gnu_ld = no; then
3930
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3933
_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'
3938
# FIXME: insert proper C++ library support
3939
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3945
case $cc_basename in
3948
_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 ${objdir}/so_locations -o $lib'
3950
# Archives containing C++ object files must be created using
3951
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3952
# necessary to make sure instantiated templates are included
3954
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3957
if test "$GXX" = yes; then
3958
if test "$with_gnu_ld" = no; then
3959
_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}${objdir}/so_locations -o $lib'
3961
_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'
3964
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3967
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3968
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3971
case $cc_basename in
3973
# Kuck and Associates, Inc. (KAI) C++ Compiler
3975
# KCC will only create a shared library if the output file
3976
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3977
# to its proper name (with version) after linking.
3978
_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'
3979
_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'
3980
# Commands to make compiler produce verbose output that lists
3981
# what "hidden" libraries, object files and flags are used when
3982
# linking a shared library.
3984
# There doesn't appear to be a way to prevent this compiler from
3985
# explicitly linking system object files so we need to strip them
3986
# from the output so that they don't get included in the library
3988
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'
3990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3991
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3993
# Archives containing C++ object files must be created using
3994
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3995
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4000
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4001
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4002
_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'
4003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4004
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4005
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4009
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4010
_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'
4012
runpath_var=LD_RUN_PATH
4013
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4014
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4016
# Commands to make compiler produce verbose output that lists
4017
# what "hidden" libraries, object files and flags are used when
4018
# linking a shared library.
4020
# There doesn't appear to be a way to prevent this compiler from
4021
# explicitly linking system object files so we need to strip them
4022
# from the output so that they don't get included in the library
4024
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'
4029
# FIXME: insert proper C++ library support
4030
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4033
# FIXME: insert proper C++ library support
4034
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4037
case $cc_basename in
4039
# FIXME: insert proper C++ library support
4040
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4043
# FIXME: insert proper C++ library support
4044
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4048
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4049
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4050
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4052
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4053
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4054
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4056
# Workaround some broken pre-1.5 toolchains
4057
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4060
case $cc_basename in
4062
# Kuck and Associates, Inc. (KAI) C++ Compiler
4064
# KCC will only create a shared library if the output file
4065
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4066
# to its proper name (with version) after linking.
4067
_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'
4069
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4070
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4072
# Archives containing C++ object files must be created using
4073
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4074
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4078
# Rational C++ 2.4.1
4079
# FIXME: insert proper C++ library support
4080
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4083
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4084
_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 ${objdir}/so_locations -o $lib'
4086
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4087
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4089
# Commands to make compiler produce verbose output that lists
4090
# what "hidden" libraries, object files and flags are used when
4091
# linking a shared library.
4093
# There doesn't appear to be a way to prevent this compiler from
4094
# explicitly linking system object files so we need to strip them
4095
# from the output so that they don't get included in the library
4097
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'
4100
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4101
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4102
_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}${objdir}/so_locations -o $lib'
4104
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4105
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4107
# Commands to make compiler produce verbose output that lists
4108
# what "hidden" libraries, object files and flags are used when
4109
# linking a shared library.
4110
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4113
# FIXME: insert proper C++ library support
4114
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4120
case $cc_basename in
4122
# Kuck and Associates, Inc. (KAI) C++ Compiler
4124
# KCC will only create a shared library if the output file
4125
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4126
# to its proper name (with version) after linking.
4127
_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'
4129
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4130
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4132
# Archives containing C++ object files must be created using
4133
# the KAI C++ compiler.
4134
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4137
# Rational C++ 2.4.1
4138
# FIXME: insert proper C++ library support
4139
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4142
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4143
_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 ${objdir}/so_locations -o $lib'
4144
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4145
echo "-hidden">> $lib.exp~
4146
$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 $objdir/so_locations -o $lib~
4149
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4150
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4152
# Commands to make compiler produce verbose output that lists
4153
# what "hidden" libraries, object files and flags are used when
4154
# linking a shared library.
4156
# There doesn't appear to be a way to prevent this compiler from
4157
# explicitly linking system object files so we need to strip them
4158
# from the output so that they don't get included in the library
4160
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'
4163
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4164
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4165
_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}${objdir}/so_locations -o $lib'
4167
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4168
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4170
# Commands to make compiler produce verbose output that lists
4171
# what "hidden" libraries, object files and flags are used when
4172
# linking a shared library.
4173
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4176
# FIXME: insert proper C++ library support
4177
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4183
# FIXME: insert proper C++ library support
4184
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4187
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4188
case $cc_basename in
4190
# FIXME: insert proper C++ library support
4191
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4194
# FIXME: insert proper C++ library support
4195
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4200
case $cc_basename in
4203
# FIXME: insert proper C++ library support
4204
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4208
# FIXME: insert proper C++ library support
4209
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4212
# FIXME: insert proper C++ library support
4213
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4218
case $cc_basename in
4220
# Sun C++ 4.2, 5.x and Centerline C++
4221
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4222
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4223
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4224
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4226
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4227
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4229
solaris2.[0-5] | solaris2.[0-5].*) ;;
4231
# The C++ compiler is used as linker so we must use $wl
4232
# flag to pass the commands to the underlying system
4234
# Supported since Solaris 2.6 (maybe 2.5.1?)
4235
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4238
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4240
# Commands to make compiler produce verbose output that lists
4241
# what "hidden" libraries, object files and flags are used when
4242
# linking a shared library.
4244
# There doesn't appear to be a way to prevent this compiler from
4245
# explicitly linking system object files so we need to strip them
4246
# from the output so that they don't get included in the library
4248
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4250
# Archives containing C++ object files must be created using
4251
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4252
# necessary to make sure instantiated templates are included
4254
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4257
# Green Hills C++ Compiler
4258
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4260
# The C++ compiler must be used to create the archive.
4261
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4264
# GNU C++ compiler with Solaris linker
4265
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4266
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4267
if $CC --version | grep -v '^2\.7' > /dev/null; then
4268
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4269
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4270
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4272
# Commands to make compiler produce verbose output that lists
4273
# what "hidden" libraries, object files and flags are used when
4274
# linking a shared library.
4275
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4277
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4279
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4280
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4281
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4283
# Commands to make compiler produce verbose output that lists
4284
# what "hidden" libraries, object files and flags are used when
4285
# linking a shared library.
4286
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4289
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4294
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4295
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4298
case $cc_basename in
4300
# NonStop-UX NCC 3.20
4301
# FIXME: insert proper C++ library support
4302
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4305
# FIXME: insert proper C++ library support
4306
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4311
# FIXME: insert proper C++ library support
4312
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4315
# FIXME: insert proper C++ library support
4316
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4319
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4320
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4322
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4323
_LT_AC_TAGVAR(LD, $1)="$LD"
4325
AC_LIBTOOL_POSTDEP_PREDEP($1)
4326
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4327
AC_LIBTOOL_PROG_CC_C_O($1)
4328
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4329
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4330
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4331
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4332
AC_LIBTOOL_SYS_LIB_STRIP
4333
AC_LIBTOOL_DLOPEN_SELF($1)
4335
AC_LIBTOOL_CONFIG($1)
4342
with_gnu_ldcxx=$with_gnu_ld
4343
with_gnu_ld=$lt_save_with_gnu_ld
4344
lt_cv_path_LDCXX=$lt_cv_path_LD
4345
lt_cv_path_LD=$lt_save_path_LD
4346
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4347
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4348
])# AC_LIBTOOL_LANG_CXX_CONFIG
4350
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4351
# ------------------------
4352
# Figure out "hidden" library dependencies from verbose
4353
# compiler output when linking a shared library.
4354
# Parse the compiler output and extract the necessary
4355
# objects, libraries and library flags.
4356
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4357
dnl we can't use the lt_simple_compile_test_code here,
4358
dnl because it contains code intended for an executable,
4359
dnl not a library. It's possible we should let each
4360
dnl tag define a new lt_????_link_test_code variable,
4361
dnl but it's only used here...
4362
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4364
void foo (void) { a = 0; }
4366
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4370
Foo (void) { a = 0; }
4375
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4383
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4386
public void bar (void) {
4392
dnl Parse the compiler output and extract the necessary
4393
dnl objects, libraries and library flags.
4394
if AC_TRY_EVAL(ac_compile); then
4395
# Parse the compiler output and extract the necessary
4396
# objects, libraries and library flags.
4398
# Sentinel used to keep track of whether or not we are before
4399
# the conftest object file.
4400
pre_test_object_deps_done=no
4402
# The `*' in the case matches for architectures that use `case' in
4403
# $output_verbose_cmd can trigger glob expansion during the loop
4404
# eval without this substitution.
4405
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4407
for p in `eval $output_verbose_link_cmd`; do
4411
# Some compilers place space between "-{L,R}" and the path.
4414
|| test $p = "-R"; then
4421
if test "$pre_test_object_deps_done" = no; then
4424
# Internal compiler library paths should come after those
4425
# provided the user. The postdeps already come after the
4426
# user supplied libs so there is no need to process them.
4427
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4428
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4430
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4433
# The "-l" case would never come before the object being
4434
# linked, so don't bother handling this case.
4437
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4438
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4440
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4446
# This assumes that the test object file only shows up
4447
# once in the compiler output.
4448
if test "$p" = "conftest.$objext"; then
4449
pre_test_object_deps_done=yes
4453
if test "$pre_test_object_deps_done" = no; then
4454
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4455
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4457
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4460
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4461
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4463
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4468
*) ;; # Ignore the rest.
4476
echo "libtool.m4: error: problem compiling $1 test program"
4479
$rm -f confest.$objext
4481
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4482
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4484
])# AC_LIBTOOL_POSTDEP_PREDEP
4486
# AC_LIBTOOL_LANG_F77_CONFIG
4487
# ------------------------
4488
# Ensure that the configuration vars for the C compiler are
4489
# suitably defined. Those variables are subsequently used by
4490
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4491
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4492
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4493
[AC_REQUIRE([AC_PROG_F77])
4494
AC_LANG_PUSH(Fortran 77)
4496
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4497
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4498
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4499
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4500
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4501
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4502
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4503
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4504
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4505
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4506
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4507
_LT_AC_TAGVAR(module_cmds, $1)=
4508
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4509
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4510
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4511
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4512
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4513
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4515
# Source file extension for f77 test sources.
4518
# Object file extension for compiled f77 test sources.
4520
_LT_AC_TAGVAR(objext, $1)=$objext
4522
# Code to be used in simple compile tests
4523
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4525
# Code to be used in simple link tests
4526
lt_simple_link_test_code=" program t\n end\n"
4528
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4531
# Allow CC to be a program name with arguments.
4535
_LT_AC_TAGVAR(compiler, $1)=$CC
4536
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4538
AC_MSG_CHECKING([if libtool supports shared libraries])
4539
AC_MSG_RESULT([$can_build_shared])
4541
AC_MSG_CHECKING([whether to build shared libraries])
4542
test "$can_build_shared" = "no" && enable_shared=no
4544
# On AIX, shared libraries and static libraries use the same namespace, and
4545
# are all built from PIC.
4548
test "$enable_shared" = yes && enable_static=no
4549
if test -n "$RANLIB"; then
4550
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4551
postinstall_cmds='$RANLIB $lib'
4555
test "$enable_shared" = yes && enable_static=no
4558
AC_MSG_RESULT([$enable_shared])
4560
AC_MSG_CHECKING([whether to build static libraries])
4561
# Make sure either enable_shared or enable_static is yes.
4562
test "$enable_shared" = yes || enable_static=yes
4563
AC_MSG_RESULT([$enable_static])
4565
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4567
_LT_AC_TAGVAR(GCC, $1)="$G77"
4568
_LT_AC_TAGVAR(LD, $1)="$LD"
4570
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4571
AC_LIBTOOL_PROG_CC_C_O($1)
4572
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4573
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4574
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4575
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4576
AC_LIBTOOL_SYS_LIB_STRIP
4579
AC_LIBTOOL_CONFIG($1)
4583
])# AC_LIBTOOL_LANG_F77_CONFIG
4586
# AC_LIBTOOL_LANG_GCJ_CONFIG
4587
# --------------------------
4588
# Ensure that the configuration vars for the C compiler are
4589
# suitably defined. Those variables are subsequently used by
4590
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4591
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4592
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4595
# Source file extension for Java test sources.
4598
# Object file extension for compiled Java test sources.
4600
_LT_AC_TAGVAR(objext, $1)=$objext
4602
# Code to be used in simple compile tests
4603
lt_simple_compile_test_code="class foo {}\n"
4605
# Code to be used in simple link tests
4606
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4608
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4611
# Allow CC to be a program name with arguments.
4615
_LT_AC_TAGVAR(compiler, $1)=$CC
4617
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4618
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4620
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4621
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4622
AC_LIBTOOL_PROG_CC_C_O($1)
4623
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4624
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4625
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4626
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4627
AC_LIBTOOL_SYS_LIB_STRIP
4628
AC_LIBTOOL_DLOPEN_SELF($1)
4630
AC_LIBTOOL_CONFIG($1)
4634
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4637
# AC_LIBTOOL_LANG_RC_CONFIG
4638
# --------------------------
4639
# Ensure that the configuration vars for the Windows resource compiler are
4640
# suitably defined. Those variables are subsequently used by
4641
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4642
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4643
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4646
# Source file extension for RC test sources.
4649
# Object file extension for compiled RC test sources.
4651
_LT_AC_TAGVAR(objext, $1)=$objext
4653
# Code to be used in simple compile tests
4654
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4656
# Code to be used in simple link tests
4657
lt_simple_link_test_code="$lt_simple_compile_test_code"
4659
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4662
# Allow CC to be a program name with arguments.
4666
_LT_AC_TAGVAR(compiler, $1)=$CC
4667
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4669
AC_LIBTOOL_CONFIG($1)
4673
])# AC_LIBTOOL_LANG_RC_CONFIG
4676
# AC_LIBTOOL_CONFIG([TAGNAME])
4677
# ----------------------------
4678
# If TAGNAME is not passed, then create an initial libtool script
4679
# with a default configuration from the untagged config vars. Otherwise
4680
# add code to config.status for appending the configuration named by
4681
# TAGNAME from the matching tagged config vars.
4682
AC_DEFUN([AC_LIBTOOL_CONFIG],
4683
[# The else clause should only fire when bootstrapping the
3286
AC_MSG_RESULT([$enable_shared])
3288
AC_MSG_CHECKING([whether to build static libraries])
3289
# Make sure either enable_shared or enable_static is yes.
3290
test "$enable_shared" = yes || enable_static=yes
3291
AC_MSG_RESULT([$enable_static])
3293
if test "$hardcode_action" = relink; then
3294
# Fast installation is not supported
3295
enable_fast_install=no
3296
elif test "$shlibpath_overrides_runpath" = yes ||
3297
test "$enable_shared" = no; then
3298
# Fast installation is not necessary
3299
enable_fast_install=needless
3302
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3303
if test "$GCC" = yes; then
3304
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3307
AC_LIBTOOL_DLOPEN_SELF
3309
if test "$enable_shared" = yes && test "$GCC" = yes; then
3310
case $archive_cmds in
3312
# FIXME: we may have to deal with multi-command sequences.
3315
# Test whether the compiler implicitly links with -lc since on some
3316
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3317
# to ld, don't add -lc before -lgcc.
3318
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3319
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3321
echo 'static int dummy;' > conftest.$ac_ext
3323
if AC_TRY_EVAL(ac_compile); then
3326
libobjs=conftest.$ac_objext
3328
wl=$lt_cv_prog_cc_wl
3334
save_allow_undefined_flag=$allow_undefined_flag
3335
allow_undefined_flag=
3336
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3338
lt_cv_archive_cmds_need_lc=no
3340
lt_cv_archive_cmds_need_lc=yes
3342
allow_undefined_flag=$save_allow_undefined_flag
3344
cat conftest.err 1>&5
3346
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3350
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3352
# The second clause should only fire when bootstrapping the
4684
3353
# libtool distribution, otherwise you forgot to ship ltmain.sh
4685
3354
# with your package, and you will get complaints that there are
4686
3355
# no rules to generate ltmain.sh.
4687
3356
if test -f "$ltmain"; then
4688
# See if we are running on zsh, and set the options which allow our commands through
4689
# without removal of \ escapes.
4690
if test -n "${ZSH_VERSION+set}" ; then
4691
setopt NO_GLOB_SUBST
3359
# If there is no Makefile yet, we rely on a make rule to execute
3360
# `config.status --recheck' to rerun these tests and create the
3361
# libtool script then.
3362
test -f Makefile && make "$ltmain"
3365
if test -f "$ltmain"; then
3366
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3369
echo creating $ofile
4693
3371
# Now quote all the things that may contain metacharacters while being
4694
3372
# careful not to overquote the AC_SUBSTed values. We take copies of the
4695
3373
# variables and quote the copies for generation of the libtool script.
4696
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4698
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4699
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4700
deplibs_check_method reload_flag reload_cmds need_locks \
4701
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4702
lt_cv_sys_global_symbol_to_c_name_address \
3374
for var in echo old_CC old_CFLAGS \
3375
AR AR_FLAGS CC LD LN_S NM SHELL \
3376
reload_flag reload_cmds wl \
3377
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3378
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3379
library_names_spec soname_spec \
3380
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3381
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3382
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3383
old_striplib striplib file_magic_cmd export_symbols_cmds \
3384
deplibs_check_method allow_undefined_flag no_undefined_flag \
3385
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3386
global_symbol_to_c_name_address \
3387
hardcode_libdir_flag_spec hardcode_libdir_separator \
4703
3388
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4704
old_postinstall_cmds old_postuninstall_cmds \
4705
_LT_AC_TAGVAR(compiler, $1) \
4706
_LT_AC_TAGVAR(CC, $1) \
4707
_LT_AC_TAGVAR(LD, $1) \
4708
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4709
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4710
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4711
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4712
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4713
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4714
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4715
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4716
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4717
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4718
_LT_AC_TAGVAR(predep_objects, $1) \
4719
_LT_AC_TAGVAR(postdep_objects, $1) \
4720
_LT_AC_TAGVAR(predeps, $1) \
4721
_LT_AC_TAGVAR(postdeps, $1) \
4722
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4723
_LT_AC_TAGVAR(archive_cmds, $1) \
4724
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4725
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4726
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4727
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4728
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4729
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4730
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4731
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4732
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4733
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4734
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4735
_LT_AC_TAGVAR(module_cmds, $1) \
4736
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4737
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4738
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4739
_LT_AC_TAGVAR(include_expsyms, $1); do
3389
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4742
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4743
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4744
_LT_AC_TAGVAR(archive_cmds, $1) | \
4745
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4746
_LT_AC_TAGVAR(module_cmds, $1) | \
4747
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4748
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4749
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4750
extract_expsyms_cmds | reload_cmds | finish_cmds | \
3392
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3393
old_postinstall_cmds | old_postuninstall_cmds | \
3394
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3395
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
4751
3396
postinstall_cmds | postuninstall_cmds | \
4752
old_postinstall_cmds | old_postuninstall_cmds | \
4753
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3397
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4754
3398
# Double-quote double-evaled strings.
4755
3399
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5139
# We use sed instead of cat because bash on DJGPP gets confused if
5140
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5141
# text mode, it properly converts lines to CR/LF. This bash problem
5142
# is reportedly fixed, but why not run on old versions too?
5143
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5145
mv -f "$cfgfile" "$ofile" || \
5146
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5150
# If there is no Makefile yet, we rely on a make rule to execute
5151
# `config.status --recheck' to rerun these tests and create the
5152
# libtool script then.
5153
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5154
if test -f "$ltmain_in"; then
5155
test -f Makefile && make "$ltmain"
5158
])# AC_LIBTOOL_CONFIG
5161
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5162
# -------------------------------------------
5163
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5164
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5166
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5168
if test "$GCC" = yes; then
5169
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5171
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5172
lt_cv_prog_compiler_rtti_exceptions,
5173
[-fno-rtti -fno-exceptions], [],
5174
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5176
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5179
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5180
# ---------------------------------
5181
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5182
[AC_REQUIRE([AC_CANONICAL_HOST])
5183
AC_REQUIRE([AC_PROG_NM])
5184
AC_REQUIRE([AC_OBJEXT])
5185
# Check for command to grab the raw symbol name followed by C symbol from nm.
5186
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5187
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5189
# These are sane defaults that work on at least a few old systems.
5190
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5192
# Character class describing NM global symbol codes.
5193
symcode='[[BCDEGRST]]'
5195
# Regexp to match symbols that can be accessed directly from C.
5196
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5198
# Transform the above into a raw symbol and a C symbol.
5199
symxfrm='\1 \2\3 \3'
5201
# Transform an extracted symbol line into a proper C declaration
5202
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5204
# Transform an extracted symbol line into symbol name and symbol address
5205
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'"
5207
# Define system-specific variables.
5212
cygwin* | mingw* | pw32*)
5213
symcode='[[ABCDGISTW]]'
5215
hpux*) # Its linker distinguishes data from code symbols
5216
if test "$host_cpu" = ia64; then
5217
symcode='[[ABCDEGRST]]'
5219
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5220
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'"
5223
symcode='[[BCDEGRST]]'
5226
symcode='[[BCDEGQRST]]'
5232
symcode='[[DFNSTU]]'
5236
# Handle CRLF in mingw tool chain
5240
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5244
# If we're using GNU nm, then use its standard symbol codes.
5245
case `$NM -V 2>&1` in
5246
*GNU* | *'with BFD'*)
5247
symcode='[[ABCDGIRSTW]]' ;;
5250
# Try without a prefix undercore, then with it.
5251
for ac_symprfx in "" "_"; do
5253
# Write the raw and C identifiers.
5254
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5256
# Check to see that the pipe works correctly.
5260
cat > conftest.$ac_ext <<EOF
5265
void nm_test_func(){}
5269
int main(){nm_test_var='a';nm_test_func();return(0);}
5272
if AC_TRY_EVAL(ac_compile); then
5273
# Now try to grab the symbols.
5275
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5276
# Try sorting and uniquifying the output.
5277
if sort "$nlist" | uniq > "$nlist"T; then
5278
mv -f "$nlist"T "$nlist"
5283
# Make sure that we snagged all the symbols we need.
5284
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5285
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5286
cat <<EOF > conftest.$ac_ext
5292
# Now generate the symbol file.
5293
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5295
cat <<EOF >> conftest.$ac_ext
5296
#if defined (__STDC__) && __STDC__
5297
# define lt_ptr_t void *
5299
# define lt_ptr_t char *
5303
/* The mapping between symbol names and symbols. */
5308
lt_preloaded_symbols[[]] =
5311
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5312
cat <<\EOF >> conftest.$ac_ext
5320
# Now try linking the two files.
5321
mv conftest.$ac_objext conftstm.$ac_objext
5322
lt_save_LIBS="$LIBS"
5323
lt_save_CFLAGS="$CFLAGS"
5324
LIBS="conftstm.$ac_objext"
5325
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5326
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5329
LIBS="$lt_save_LIBS"
5330
CFLAGS="$lt_save_CFLAGS"
5332
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5335
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5338
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5341
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5342
cat conftest.$ac_ext >&5
5344
rm -f conftest* conftst*
5346
# Do not use the global_symbol_pipe unless it works.
5347
if test "$pipe_works" = yes; then
5350
lt_cv_sys_global_symbol_pipe=
5354
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5355
lt_cv_sys_global_symbol_to_cdecl=
5357
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5358
AC_MSG_RESULT(failed)
5362
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5365
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5366
# ---------------------------------------
5367
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5368
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5369
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5370
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5372
AC_MSG_CHECKING([for $compiler option to produce PIC])
5374
# C++ specific cases for pic, static, wl, etc.
5375
if test "$GXX" = yes; then
5376
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5377
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5381
# All AIX code is PIC.
5382
if test "$host_cpu" = ia64; then
5383
# AIX 5 now supports IA64 processor
5384
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5388
# FIXME: we need at least 68020 code to build shared libraries, but
5389
# adding the `-m68020' flag to GCC prevents building anything better,
5391
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5393
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5394
# PIC is the default for these OSes.
5396
mingw* | os2* | pw32*)
5397
# This hack is so that the source file can tell whether it is being
5398
# built for inclusion in a dll (and should export symbols for example).
5399
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5401
darwin* | rhapsody*)
5402
# PIC is the default on this platform
5403
# Common symbols not allowed in MH_DYLIB files
5404
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5407
# DJGPP does not support shared libraries at all
5408
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5411
if test -d /usr/nec; then
5412
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5416
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5422
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5427
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5433
# All AIX code is PIC.
5434
if test "$host_cpu" = ia64; then
5435
# AIX 5 now supports IA64 processor
5436
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5438
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5442
case $cc_basename in
5444
# Green Hills C++ Compiler
5445
# _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"
5450
case $cc_basename in
5452
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5455
# Green Hills C++ Compiler
5456
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5462
freebsd* | kfreebsd*-gnu)
5463
# FreeBSD uses GNU C++
5465
hpux9* | hpux10* | hpux11*)
5466
case $cc_basename in
5468
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5469
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5470
if test "$host_cpu" != ia64; then
5471
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5475
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5476
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5482
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5490
irix5* | irix6* | nonstopux*)
5491
case $cc_basename in
5493
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5494
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5495
# CC pic flag -KPIC is the default.
5502
case $cc_basename in
5505
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5506
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5510
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5511
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5512
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5516
# Make sure the PIC flag is empty. It appears that all Alpha
5517
# Linux and Compaq Tru64 Unix objects are PIC.
5518
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5519
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5530
case $cc_basename in
5532
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5538
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5540
osf3* | osf4* | osf5*)
5541
case $cc_basename in
5543
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5546
# Rational C++ 2.4.1
5547
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5550
# Digital/Compaq C++
5551
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5552
# Make sure the PIC flag is empty. It appears that all Alpha
5553
# Linux and Compaq Tru64 Unix objects are PIC.
5554
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5555
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5564
case $cc_basename in
5566
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5573
case $cc_basename in
5575
# Sun C++ 4.2, 5.x and Centerline C++
5576
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5577
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5578
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5581
# Green Hills C++ Compiler
5582
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5589
case $cc_basename in
5592
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5593
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5597
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5604
case $cc_basename in
5606
# NonStop-UX NCC 3.20
5607
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5618
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5624
if test "$GCC" = yes; then
5625
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5626
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5630
# All AIX code is PIC.
5631
if test "$host_cpu" = ia64; then
5632
# AIX 5 now supports IA64 processor
5633
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5638
# FIXME: we need at least 68020 code to build shared libraries, but
5639
# adding the `-m68020' flag to GCC prevents building anything better,
5641
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5644
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5645
# PIC is the default for these OSes.
5648
mingw* | pw32* | os2*)
5649
# This hack is so that the source file can tell whether it is being
5650
# built for inclusion in a dll (and should export symbols for example).
5651
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5654
darwin* | rhapsody*)
5655
# PIC is the default on this platform
5656
# Common symbols not allowed in MH_DYLIB files
5657
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5661
# Just because we use GCC doesn't mean we suddenly get shared libraries
5662
# on systems that don't support them.
5663
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5668
if test -d /usr/nec; then
5669
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5674
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5681
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5687
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5691
# PORTME Check for flag to pass linker flags through the system compiler.
5694
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5695
if test "$host_cpu" = ia64; then
5696
# AIX 5 now supports IA64 processor
5697
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5699
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5703
mingw* | pw32* | os2*)
5704
# This hack is so that the source file can tell whether it is being
5705
# built for inclusion in a dll (and should export symbols for example).
5706
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5709
hpux9* | hpux10* | hpux11*)
5710
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5711
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5718
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5721
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5722
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5725
irix5* | irix6* | nonstopux*)
5726
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5727
# PIC (with -KPIC) is the default.
5728
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5732
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5733
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5739
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5740
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5741
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5744
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5745
# All Alpha code is PIC.
5746
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5751
osf3* | osf4* | osf5*)
5752
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5753
# All OSF/1 code is PIC.
5754
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5758
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5759
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5763
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5764
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5765
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5769
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5770
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5771
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5774
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5775
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5776
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5777
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5781
if test -d /usr/nec ;then
5782
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5783
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5788
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5789
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5793
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5798
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5801
# Check to make sure the PIC flag actually works.
5803
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5804
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5805
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5806
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5807
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5809
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5811
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5812
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5815
# For platforms which do not support PIC, -DPIC is meaningless:
5817
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5820
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5826
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5827
# ------------------------------------
5828
# See if the linker supports building shared libraries.
5829
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5830
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5832
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5835
# If we're using GNU nm, then we don't want the "-C" option.
5836
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5837
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5838
_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'
5840
_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'
5844
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5847
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5850
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
5853
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5858
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5859
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5860
_LT_AC_TAGVAR(archive_cmds, $1)=
5861
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5862
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5863
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5864
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5865
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5866
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5867
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5868
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5869
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5870
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5871
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5872
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5873
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5874
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5875
_LT_AC_TAGVAR(module_cmds, $1)=
5876
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5877
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5878
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5879
# include_expsyms should be a list of space-separated symbols to be *always*
5880
# included in the symbol list
5881
_LT_AC_TAGVAR(include_expsyms, $1)=
5882
# exclude_expsyms can be an extended regexp of symbols to exclude
5883
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5884
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5885
# as well as any symbol that contains `d'.
5886
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5887
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5888
# platforms (ab)use it in PIC code, but their linkers get confused if
5889
# the symbol is explicitly referenced. Since portable code cannot
5890
# rely on this symbol name, it's probably fine to never include it in
5891
# preloaded symbol tables.
5892
extract_expsyms_cmds=
5895
cygwin* | mingw* | pw32*)
5896
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5897
# When not using gcc, we currently assume that we are using
5898
# Microsoft Visual C++.
5899
if test "$GCC" != yes; then
5908
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5909
if test "$with_gnu_ld" = yes; then
5910
# If archive_cmds runs LD, not CC, wlarc should be empty
5913
# See if GNU ld supports shared libraries.
5915
aix3* | aix4* | aix5*)
5916
# On AIX/PPC, the GNU linker is very broken
5917
if test "$host_cpu" != ia64; then
5918
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5921
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5922
*** to be unable to reliably create shared libraries on AIX.
5923
*** Therefore, libtool is disabling shared libraries support. If you
5924
*** really care for shared libraries, you may want to modify your PATH
5925
*** so that a non-GNU linker is found, and then restart.
5932
_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)'
5933
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5934
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5936
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5937
# that the semantics of dynamic libraries on AmigaOS, at least up
5938
# to version 4, is to share data among multiple programs linked
5939
# with the same dynamic library. Since this doesn't match the
5940
# behavior of shared libraries on other platforms, we can't use
5942
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5946
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5947
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5948
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5949
# support --undefined. This deserves some investigation. FIXME
5950
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5952
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5956
cygwin* | mingw* | pw32*)
5957
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5958
# as there is no search path for DLLs.
5959
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5960
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5961
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5962
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5963
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5965
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5966
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5967
# If the export-symbols file already is a .def file (1st line
5968
# is EXPORTS), use it as is; otherwise, prepend...
5969
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5970
cp $export_symbols $output_objdir/$soname.def;
5972
echo EXPORTS > $output_objdir/$soname.def;
5973
cat $export_symbols >> $output_objdir/$soname.def;
5975
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5981
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5982
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5983
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5986
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5987
_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'
5992
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5993
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5996
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5997
*** create shared libraries on Solaris systems. Therefore, libtool
5998
*** is disabling shared libraries support. We urge you to upgrade GNU
5999
*** binutils to release 2.9.1 or newer. Another option is to modify
6000
*** your PATH or compiler configuration so that the native linker is
6001
*** used, and then restart.
6004
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6005
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6006
_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'
6008
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6013
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6015
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6016
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6020
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6021
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6022
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6023
supports_anon_versioning=no
6024
case `$LD -v 2>/dev/null` in
6025
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6026
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6027
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6028
*\ 2.11.*) ;; # other 2.11 versions
6029
*) supports_anon_versioning=yes ;;
6031
if test $supports_anon_versioning = yes; then
6032
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6033
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6034
$echo "local: *; };" >> $output_objdir/$libname.ver~
6035
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6037
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6039
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6041
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6046
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6047
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6048
_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'
6050
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6055
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6056
runpath_var=LD_RUN_PATH
6057
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6058
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6059
# ancient GNU ld didn't support --whole-archive et. al.
6060
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6061
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6063
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6067
# PORTME fill in a description of your system's linker (not GNU ld)
6070
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6071
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6072
_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'
6073
# Note: this linker hardcodes the directories in LIBPATH if there
6074
# are no directories specified by -L.
6075
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6076
if test "$GCC" = yes && test -z "$link_static_flag"; then
6077
# Neither direct hardcoding nor static linking is supported with a
6079
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6084
if test "$host_cpu" = ia64; then
6085
# On IA64, the linker does run time linking by default, so we don't
6086
# have to do anything special.
6087
aix_use_runtimelinking=no
6088
exp_sym_flag='-Bexport'
6091
# If we're using GNU nm, then we don't want the "-C" option.
6092
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6093
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6094
_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'
6096
_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'
6098
aix_use_runtimelinking=no
6100
# Test if we are trying to use run time linking or normal
6101
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6102
# need to do runtime linking.
6103
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6104
for ld_flag in $LDFLAGS; do
6105
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6106
aix_use_runtimelinking=yes
6112
exp_sym_flag='-bexport'
6113
no_entry_flag='-bnoentry'
6116
# When large executables or shared objects are built, AIX ld can
6117
# have problems creating the table of contents. If linking a library
6118
# or program results in "error TOC overflow" add -mminimal-toc to
6119
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6120
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6122
_LT_AC_TAGVAR(archive_cmds, $1)=''
6123
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6124
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6125
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6127
if test "$GCC" = yes; then
6128
case $host_os in aix4.[012]|aix4.[012].*)
6129
# We only want to do this on AIX 4.2 and lower, the check
6130
# below for broken collect2 doesn't work under 4.3+
6131
collect2name=`${CC} -print-prog-name=collect2`
6132
if test -f "$collect2name" && \
6133
strings "$collect2name" | grep resolve_lib_name >/dev/null
6135
# We have reworked collect2
6136
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6138
# We have old collect2
6139
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6140
# It fails to find uninstalled libraries when the uninstalled
6141
# path is not listed in the libpath. Setting hardcode_minus_L
6142
# to unsupported forces relinking
6143
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6144
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6145
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6148
shared_flag='-shared'
6151
if test "$host_cpu" = ia64; then
6152
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6153
# chokes on -Wl,-G. The following line is correct:
6156
if test "$aix_use_runtimelinking" = yes; then
6157
shared_flag='${wl}-G'
6159
shared_flag='${wl}-bM:SRE'
6164
# It seems that -bexpall does not export symbols beginning with
6165
# underscore (_), so it is better to generate a list of symbols to export.
6166
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6167
if test "$aix_use_runtimelinking" = yes; then
6168
# Warning - without using the other runtime loading flags (-brtl),
6169
# -berok will link without error, but may produce a broken library.
6170
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6171
# Determine the default libpath from the value encoded in an empty executable.
6172
_LT_AC_SYS_LIBPATH_AIX
6173
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6174
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
6176
if test "$host_cpu" = ia64; then
6177
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6178
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6179
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6181
# Determine the default libpath from the value encoded in an empty executable.
6182
_LT_AC_SYS_LIBPATH_AIX
6183
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6184
# Warning - without using the other run time loading flags,
6185
# -berok will link without error, but may produce a broken library.
6186
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6187
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6188
# -bexpall does not export symbols beginning with underscore (_)
6189
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6190
# Exported symbols can be pulled into shared objects from archives
6191
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6192
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6193
# This is similar to how AIX traditionally builds it's shared libraries.
6194
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6200
_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)'
6201
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6202
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6203
# see comment about different semantics on the GNU ld section
6204
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6208
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6211
cygwin* | mingw* | pw32*)
6212
# When not using gcc, we currently assume that we are using
6213
# Microsoft Visual C++.
6214
# hardcode_libdir_flag_spec is actually meaningless, as there is
6215
# no search path for DLLs.
6216
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6217
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6218
# Tell ltmain to make .lib files, not .a files.
6220
# Tell ltmain to make .dll files, not .so files.
6222
# FIXME: Setting linknames here is a bad hack.
6223
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6224
# The linker will automatically build a .lib file if we build a DLL.
6225
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6226
# FIXME: Should let the user specify the lib program.
6227
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6228
fix_srcfile_path='`cygpath -w "$srcfile"`'
6229
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6232
darwin* | rhapsody*)
6233
if test "$GXX" = yes ; then
6234
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6236
rhapsody* | darwin1.[[012]])
6237
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6240
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6241
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6243
case ${MACOSX_DEPLOYMENT_TARGET} in
6245
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6248
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6254
lt_int_apple_cc_single_mod=no
6255
output_verbose_link_cmd='echo'
6256
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6257
lt_int_apple_cc_single_mod=yes
6259
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6260
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6262
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6264
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6265
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6266
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6267
_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}'
6269
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
6271
_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}'
6272
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6273
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6274
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6275
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6276
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6278
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6283
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6284
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6285
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6289
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6292
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6293
# support. Future versions do this automatically, but an explicit c++rt0.o
6294
# does not break anything, and helps significantly (at the cost of a little
6297
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6298
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6299
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6300
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6303
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6305
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6306
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6307
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6308
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6311
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6312
freebsd* | kfreebsd*-gnu)
6313
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6314
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6315
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6316
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6320
if test "$GCC" = yes; then
6321
_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'
6323
_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'
6325
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6326
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6327
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6329
# hardcode_minus_L: Not really in the search PATH,
6330
# but as the default location of the library.
6331
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6332
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6336
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6339
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6342
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6348
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6351
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6355
if test "$with_gnu_ld" = no; then
6358
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6359
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6360
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6361
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6362
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6365
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6366
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6367
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6369
# hardcode_minus_L: Not really in the search PATH,
6370
# but as the default location of the library.
6371
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6374
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6375
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6376
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6377
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6379
# hardcode_minus_L: Not really in the search PATH,
6380
# but as the default location of the library.
6381
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6387
irix5* | irix6* | nonstopux*)
6388
if test "$GCC" = yes; then
6389
_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'
6391
_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'
6392
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6394
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6395
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6396
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6399
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6400
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6401
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6403
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6405
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6406
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6407
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6411
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6412
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6413
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6414
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6415
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6419
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6420
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6421
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6422
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6423
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6424
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6427
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6428
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6429
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6432
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6433
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6440
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6441
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6442
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6443
_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'
6444
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6448
if test "$GCC" = yes; then
6449
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6450
_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'
6452
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6453
_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'
6455
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6456
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6459
osf4* | osf5*) # as osf3* with the addition of -msym flag
6460
if test "$GCC" = yes; then
6461
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6462
_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'
6463
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6465
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6466
_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'
6467
_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~
6468
$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'
6470
# Both c and cxx compiler support -rpath directly
6471
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6473
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6477
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6478
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6479
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6480
runpath_var=LD_RUN_PATH
6481
hardcode_runpath_var=yes
6485
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6486
if test "$GCC" = yes; then
6487
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6488
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6489
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6491
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6492
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6493
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6495
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6496
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6498
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6499
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
6500
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6502
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6506
if test "x$host_vendor" = xsequent; then
6507
# Use $CC to link under sequent, because it throws in some extra .o
6508
# files that make .init and .fini sections work.
6509
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6511
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6513
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6514
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6515
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6516
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6520
case $host_vendor in
6522
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6523
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6526
## LD is ld it makes a PLAMLIB
6527
## CC just makes a GrossModule.
6528
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6529
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6530
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6533
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6534
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6537
runpath_var='LD_RUN_PATH'
6538
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6542
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6543
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6544
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6548
if test -d /usr/nec; then
6549
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6550
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6551
runpath_var=LD_RUN_PATH
6552
hardcode_runpath_var=yes
6553
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6558
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6559
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6560
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6561
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6562
hardcode_runpath_var=yes
6563
runpath_var=LD_RUN_PATH
6566
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6567
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6568
if test "$GCC" = yes; then
6569
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6571
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6573
runpath_var='LD_RUN_PATH'
6574
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6578
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6579
# $CC -shared without GNU ld will not create a library from C++
6580
# object files and a static libstdc++, better avoid it by now
6581
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6582
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6583
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6584
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6585
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6586
runpath_var='LD_RUN_PATH'
6590
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6591
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6592
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6596
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6601
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6602
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6604
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6605
if test "$GCC" = yes; then
6606
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6610
# Do we need to explicitly link libc?
6612
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6614
# Assume -lc should be added
6615
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6617
if test "$enable_shared" = yes && test "$GCC" = yes; then
6618
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6620
# FIXME: we may have to deal with multi-command sequences.
6623
# Test whether the compiler implicitly links with -lc since on some
6624
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6625
# to ld, don't add -lc before -lgcc.
6626
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6628
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6630
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6633
libobjs=conftest.$ac_objext
6635
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6641
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6642
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6643
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6645
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6647
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6649
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6651
cat conftest.err 1>&5
6654
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6660
])# AC_LIBTOOL_PROG_LD_SHLIBS
6663
# _LT_AC_FILE_LTDLL_C
6664
# -------------------
6665
# Be careful that the start marker always follows a newline.
6666
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3712
cygwin* | mingw* | pw32* | os2*)
3713
cat <<'EOF' >> "${ofile}T"
3714
# This is a source program that is used to create dlls on Windows
3715
# Don't remove nor modify the starting and closing comments
6667
3716
# /* ltdll.c starts here */
6668
3717
# #define WIN32_LEAN_AND_MEAN
6669
3718
# #include <windows.h>
6699
3748
# /* ltdll.c ends here */
6700
])# _LT_AC_FILE_LTDLL_C
6703
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6704
# ---------------------------------
6705
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
3749
# This is a source program that is used to create import libraries
3750
# on Windows for dlls which lack them. Don't remove nor modify the
3751
# starting and closing comments
3752
# /* impgen.c starts here */
3753
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3755
# This file is part of GNU libtool.
3757
# This program is free software; you can redistribute it and/or modify
3758
# it under the terms of the GNU General Public License as published by
3759
# the Free Software Foundation; either version 2 of the License, or
3760
# (at your option) any later version.
3762
# This program is distributed in the hope that it will be useful,
3763
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3764
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3765
# GNU General Public License for more details.
3767
# You should have received a copy of the GNU General Public License
3768
# along with this program; if not, write to the Free Software
3769
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3772
# #include <stdio.h> /* for printf() */
3773
# #include <unistd.h> /* for open(), lseek(), read() */
3774
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3775
# #include <string.h> /* for strdup() */
3777
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3779
# #define O_BINARY 0
3782
# static unsigned int
3783
# pe_get16 (fd, offset)
3787
# unsigned char b[2];
3788
# lseek (fd, offset, SEEK_SET);
3790
# return b[0] + (b[1]<<8);
3793
# static unsigned int
3794
# pe_get32 (fd, offset)
3798
# unsigned char b[4];
3799
# lseek (fd, offset, SEEK_SET);
3801
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3804
# static unsigned int
3808
# unsigned char *b = ptr;
3809
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3818
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3819
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3820
# unsigned long name_rvas, nexp;
3821
# unsigned char *expdata, *erva;
3822
# char *filename, *dll_name;
3824
# filename = argv[1];
3826
# dll = open(filename, O_RDONLY|O_BINARY);
3830
# dll_name = filename;
3832
# for (i=0; filename[i]; i++)
3833
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3834
# dll_name = filename + i +1;
3836
# pe_header_offset = pe_get32 (dll, 0x3c);
3837
# opthdr_ofs = pe_header_offset + 4 + 20;
3838
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3840
# if (num_entries < 1) /* no exports */
3843
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3844
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3845
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3846
# secptr = (pe_header_offset + 4 + 20 +
3847
# pe_get16 (dll, pe_header_offset + 4 + 16));
3850
# for (i = 0; i < nsections; i++)
3853
# unsigned long secptr1 = secptr + 40 * i;
3854
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3855
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3856
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3857
# lseek(dll, secptr1, SEEK_SET);
3858
# read(dll, sname, 8);
3859
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3861
# expptr = fptr + (export_rva - vaddr);
3862
# if (export_rva + export_size > vaddr + vsize)
3863
# export_size = vsize - (export_rva - vaddr);
3868
# expdata = (unsigned char*)malloc(export_size);
3869
# lseek (dll, expptr, SEEK_SET);
3870
# read (dll, expdata, export_size);
3871
# erva = expdata - export_rva;
3873
# nexp = pe_as32 (expdata+24);
3874
# name_rvas = pe_as32 (expdata+32);
3876
# printf ("EXPORTS\n");
3877
# for (i = 0; i<nexp; i++)
3879
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3880
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3885
# /* impgen.c ends here */
3891
# We use sed instead of cat because bash on DJGPP gets confused if
3892
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3893
# text mode, it properly converts lines to CR/LF. This bash problem
3894
# is reportedly fixed, but why not run on old versions too?
3895
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3897
mv -f "${ofile}T" "$ofile" || \
3898
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3902
])# _LT_AC_LTCONFIG_HACK
3904
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3905
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3907
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3908
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3910
# AC_ENABLE_SHARED - implement the --enable-shared flag
3911
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3912
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3914
AC_DEFUN([AC_ENABLE_SHARED],
3915
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3916
AC_ARG_ENABLE(shared,
3917
changequote(<<, >>)dnl
3918
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3919
changequote([, ])dnl
3920
[p=${PACKAGE-default}
3922
yes) enable_shared=yes ;;
3923
no) enable_shared=no ;;
3926
# Look at the argument we got. We use all the common list separators.
3927
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3928
for pkg in $enableval; do
3929
if test "X$pkg" = "X$p"; then
3936
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3939
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3940
AC_DEFUN([AC_DISABLE_SHARED],
3941
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3942
AC_ENABLE_SHARED(no)])
3944
# AC_ENABLE_STATIC - implement the --enable-static flag
3945
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3946
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3948
AC_DEFUN([AC_ENABLE_STATIC],
3949
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3950
AC_ARG_ENABLE(static,
3951
changequote(<<, >>)dnl
3952
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3953
changequote([, ])dnl
3954
[p=${PACKAGE-default}
3956
yes) enable_static=yes ;;
3957
no) enable_static=no ;;
3960
# Look at the argument we got. We use all the common list separators.
3961
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3962
for pkg in $enableval; do
3963
if test "X$pkg" = "X$p"; then
3970
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3973
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3974
AC_DEFUN([AC_DISABLE_STATIC],
3975
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3976
AC_ENABLE_STATIC(no)])
3979
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3980
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3981
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3983
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3984
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3985
AC_ARG_ENABLE(fast-install,
3986
changequote(<<, >>)dnl
3987
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3988
changequote([, ])dnl
3989
[p=${PACKAGE-default}
3991
yes) enable_fast_install=yes ;;
3992
no) enable_fast_install=no ;;
3994
enable_fast_install=no
3995
# Look at the argument we got. We use all the common list separators.
3996
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3997
for pkg in $enableval; do
3998
if test "X$pkg" = "X$p"; then
3999
enable_fast_install=yes
4005
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4008
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4009
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4010
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4011
AC_ENABLE_FAST_INSTALL(no)])
4013
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4014
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4015
# Where MODE is either `yes' or `no'. If omitted, it defaults to
4017
AC_DEFUN([AC_LIBTOOL_PICMODE],
4018
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4019
pic_mode=ifelse($#,1,$1,default)])
4022
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4023
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4024
[AC_MSG_CHECKING([for $1])
4025
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4028
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4031
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4034
ac_save_MAGIC_CMD="$MAGIC_CMD"
4035
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4036
dnl $ac_dummy forces splitting on constant user-supplied paths.
4037
dnl POSIX.2 word splitting is done only on the output of word expansions,
4038
dnl not every word. This closes a longstanding sh security hole.
4039
ac_dummy="ifelse([$2], , $PATH, [$2])"
4040
for ac_dir in $ac_dummy; do
4041
test -z "$ac_dir" && ac_dir=.
4042
if test -f $ac_dir/$1; then
4043
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4044
if test -n "$file_magic_test_file"; then
4045
case $deplibs_check_method in
4047
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4048
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4049
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4050
egrep "$file_magic_regex" > /dev/null; then
4055
*** Warning: the command libtool uses to detect shared libraries,
4056
*** $file_magic_cmd, produces output that libtool cannot recognize.
4057
*** The result is that libtool may fail to recognize shared libraries
4058
*** as such. This will affect the creation of libtool libraries that
4059
*** depend on shared libraries, but programs linked with such libtool
4060
*** libraries will work regardless of this problem. Nevertheless, you
4061
*** may want to report the problem to your system manager and/or to
4062
*** bug-libtool@gnu.org
4072
MAGIC_CMD="$ac_save_MAGIC_CMD"
4075
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4076
if test -n "$MAGIC_CMD"; then
4077
AC_MSG_RESULT($MAGIC_CMD)
4084
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4085
AC_DEFUN([AC_PATH_MAGIC],
4086
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4087
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4088
if test -z "$lt_cv_path_MAGIC_CMD"; then
4089
if test -n "$ac_tool_prefix"; then
4090
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4098
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4099
AC_DEFUN([AC_PROG_LD],
4100
[AC_ARG_WITH(gnu-ld,
4101
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4102
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4103
AC_REQUIRE([AC_PROG_CC])dnl
4104
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4105
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4106
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4108
if test "$GCC" = yes; then
4109
# Check if gcc -print-prog-name=ld gives a path.
4110
AC_MSG_CHECKING([for ld used by GCC])
4113
# gcc leaves a trailing carriage return which upsets mingw
4114
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4116
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4119
# Accept absolute paths.
4120
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4121
re_direlt='/[[^/]][[^/]]*/\.\./'
4122
# Canonicalize the path of ld
4123
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4124
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4125
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4127
test -z "$LD" && LD="$ac_prog"
4130
# If it fails, then pretend we aren't using GCC.
4134
# If it is relative, then search for the first ld in PATH.
4138
elif test "$with_gnu_ld" = yes; then
4139
AC_MSG_CHECKING([for GNU ld])
4141
AC_MSG_CHECKING([for non-GNU ld])
4143
AC_CACHE_VAL(lt_cv_path_LD,
4144
[if test -z "$LD"; then
4145
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4146
for ac_dir in $PATH; do
4147
test -z "$ac_dir" && ac_dir=.
4148
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4149
lt_cv_path_LD="$ac_dir/$ac_prog"
4150
# Check to see if the program is GNU ld. I'd rather use --version,
4151
# but apparently some GNU ld's only accept -v.
4152
# Break only if it was the GNU/non-GNU ld that we prefer.
4153
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4154
test "$with_gnu_ld" != no && break
4156
test "$with_gnu_ld" != yes && break
4162
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4165
if test -n "$LD"; then
4170
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4175
AC_DEFUN([AC_PROG_LD_GNU],
4176
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4177
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4178
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4179
lt_cv_prog_gnu_ld=yes
4181
lt_cv_prog_gnu_ld=no
4183
with_gnu_ld=$lt_cv_prog_gnu_ld
4186
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4187
# -- PORTME Some linkers may need a different reload flag.
4188
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4189
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4190
[lt_cv_ld_reload_flag='-r'])
4191
reload_flag=$lt_cv_ld_reload_flag
4192
test -n "$reload_flag" && reload_flag=" $reload_flag"
4195
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4196
# -- PORTME fill in with the dynamic library characteristics
4197
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4198
[AC_CACHE_CHECK([how to recognise dependant libraries],
4199
lt_cv_deplibs_check_method,
4200
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4201
lt_cv_file_magic_test_file=
4202
lt_cv_deplibs_check_method='unknown'
4203
# Need to set the preceding variable on all platforms that support
4204
# interlibrary dependencies.
4205
# 'none' -- dependencies not supported.
4206
# `unknown' -- same as none, but documents that we really don't know.
4207
# 'pass_all' -- all dependencies passed with no checks.
4208
# 'test_compile' -- check by making test program.
4209
# 'file_magic [[regex]]' -- check by looking for files in library path
4210
# which responds to the $file_magic_cmd with a given egrep regex.
4211
# If you have `file' or equivalent on your system and you're not sure
4212
# whether `pass_all' will *always* work, you probably want this one.
4216
lt_cv_deplibs_check_method=pass_all
4220
lt_cv_deplibs_check_method=pass_all
4224
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4225
lt_cv_file_magic_cmd='/usr/bin/file -L'
4226
lt_cv_file_magic_test_file=/shlib/libc.so
4229
cygwin* | mingw* | pw32*)
4230
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4231
lt_cv_file_magic_cmd='$OBJDUMP -f'
4234
darwin* | rhapsody*)
4235
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4236
lt_cv_file_magic_cmd='/usr/bin/file -L'
4238
rhapsody* | darwin1.[[012]])
4239
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4242
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4248
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4251
# Not sure whether the presence of OpenBSD here was a mistake.
4252
# Let's accept both of them until this is cleared up.
4253
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4254
lt_cv_file_magic_cmd=/usr/bin/file
4255
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4259
lt_cv_deplibs_check_method=pass_all
4264
lt_cv_deplibs_check_method=pass_all
4268
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4269
lt_cv_file_magic_cmd=/usr/bin/file
4270
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4276
# this will be overridden with pass_all, but let us keep it just in case
4277
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4281
*-32|*"-32 ") libmagic=32-bit;;
4282
*-n32|*"-n32 ") libmagic=N32;;
4283
*-64|*"-64 ") libmagic=64-bit;;
4284
*) libmagic=never-match;;
4286
# this will be overridden with pass_all, but let us keep it just in case
4287
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4290
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4291
lt_cv_deplibs_check_method=pass_all
4294
# This must be Linux ELF.
4297
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
4298
lt_cv_deplibs_check_method=pass_all ;;
4300
# glibc up to 2.1.1 does not perform some relocations on ARM
4301
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4303
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4307
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4308
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4310
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4315
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4316
lt_cv_file_magic_cmd=/usr/bin/file
4317
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4321
lt_cv_file_magic_cmd=/usr/bin/file
4322
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4323
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4324
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4326
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4330
osf3* | osf4* | osf5*)
4331
# this will be overridden with pass_all, but let us keep it just in case
4332
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4333
lt_cv_file_magic_test_file=/shlib/libc.so
4334
lt_cv_deplibs_check_method=pass_all
4338
lt_cv_deplibs_check_method=pass_all
4342
lt_cv_deplibs_check_method=pass_all
4343
lt_cv_file_magic_test_file=/lib/libc.so
4346
sysv5uw[[78]]* | sysv4*uw2*)
4347
lt_cv_deplibs_check_method=pass_all
4350
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4351
case $host_vendor in
4353
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]]'
4354
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4357
lt_cv_deplibs_check_method=pass_all
4360
lt_cv_file_magic_cmd='/bin/file'
4361
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4364
lt_cv_file_magic_cmd='/bin/file'
4365
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4366
lt_cv_file_magic_test_file=/lib/libc.so
4372
file_magic_cmd=$lt_cv_file_magic_cmd
4373
deplibs_check_method=$lt_cv_deplibs_check_method
4377
# AC_PROG_NM - find the path to a BSD-compatible name lister
4378
AC_DEFUN([AC_PROG_NM],
4379
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4380
AC_MSG_CHECKING([for BSD-compatible nm])
4381
AC_CACHE_VAL(lt_cv_path_NM,
4382
[if test -n "$NM"; then
4383
# Let the user override the test.
4386
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4387
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4388
test -z "$ac_dir" && ac_dir=.
4389
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4390
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4391
# Check to see if the nm accepts a BSD-compat flag.
4392
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4393
# nm: unknown option "B" ignored
4394
# Tru64's nm complains that /dev/null is an invalid object file
4395
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4396
lt_cv_path_NM="$tmp_nm -B"
4398
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4399
lt_cv_path_NM="$tmp_nm -p"
4402
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4403
continue # so that we can try to find one that supports BSD flags
4408
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4411
AC_MSG_RESULT([$NM])
4414
# AC_CHECK_LIBM - check for math library
4415
AC_DEFUN([AC_CHECK_LIBM],
4416
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4419
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4420
# These system don't have libm
4423
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4424
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4427
AC_CHECK_LIB(m, main, LIBM="-lm")
4432
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4433
# the libltdl convenience library and INCLTDL to the include flags for
4434
# the libltdl header and adds --enable-ltdl-convenience to the
4435
# configure arguments. Note that LIBLTDL and INCLTDL are not
4436
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4437
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4438
# with '${top_builddir}/' and INCLTDL will be prefixed with
4439
# '${top_srcdir}/' (note the single quotes!). If your package is not
4440
# flat and you're not using automake, define top_builddir and
4441
# top_srcdir appropriately in the Makefiles.
4442
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4443
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4444
case $enable_ltdl_convenience in
4445
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4446
"") enable_ltdl_convenience=yes
4447
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4449
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4450
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4453
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4454
# the libltdl installable library and INCLTDL to the include flags for
4455
# the libltdl header and adds --enable-ltdl-install to the configure
4456
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4457
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4458
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4459
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4460
# with '${top_srcdir}/' (note the single quotes!). If your package is
4461
# not flat and you're not using automake, define top_builddir and
4462
# top_srcdir appropriately in the Makefiles.
4463
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4464
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4465
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4466
AC_CHECK_LIB(ltdl, main,
4467
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4468
[if test x"$enable_ltdl_install" = xno; then
4469
AC_MSG_WARN([libltdl not installed, but installation disabled])
4471
enable_ltdl_install=yes
4474
if test x"$enable_ltdl_install" = x"yes"; then
4475
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4476
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4477
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4479
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
6709
4486
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])