2054
1974
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2055
1975
AC_MSG_RESULT([$hard_links])
2056
1976
if test "$hard_links" = no; then
2057
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1977
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2058
1978
need_locks=warn
2064
if test "$GCC" = yes; then
2065
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2066
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2067
echo "int some_variable = 0;" > conftest.$ac_ext
2068
save_CFLAGS="$CFLAGS"
2069
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2070
compiler_rtti_exceptions=no
2071
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2072
# The compiler can only warn and ignore the option if not recognized
2073
# So say no if there are warnings
2074
if test -s conftest.err; then
2075
compiler_rtti_exceptions=no
2077
compiler_rtti_exceptions=yes
2080
CFLAGS="$save_CFLAGS"
2081
AC_MSG_RESULT([$compiler_rtti_exceptions])
2083
if test "$compiler_rtti_exceptions" = "yes"; then
2084
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2086
no_builtin_flag=' -fno-builtin'
2090
# See if the linker supports building shared libraries.
2091
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2093
allow_undefined_flag=
2095
need_lib_prefix=unknown
2096
need_version=unknown
2097
# when you set need_version to no, make sure it does not cause -set_version
2098
# flags to be left without arguments
2100
archive_expsym_cmds=
2101
old_archive_from_new_cmds=
2102
old_archive_from_expsyms_cmds=
2103
export_dynamic_flag_spec=
2104
whole_archive_flag_spec=
2105
thread_safe_flag_spec=
2106
hardcode_into_libs=no
2107
hardcode_libdir_flag_spec=
2108
hardcode_libdir_separator=
2111
hardcode_shlibpath_var=unsupported
2113
link_all_deplibs=unknown
2114
always_export_symbols=no
2115
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2116
# include_expsyms should be a list of space-separated symbols to be *always*
2117
# included in the symbol list
2119
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2120
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2121
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2122
# as well as any symbol that contains `d'.
2123
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2124
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2125
# platforms (ab)use it in PIC code, but their linkers get confused if
2126
# the symbol is explicitly referenced. Since portable code cannot
2127
# rely on this symbol name, it's probably fine to never include it in
2128
# preloaded symbol tables.
2129
extract_expsyms_cmds=
2132
cygwin* | mingw* | pw32*)
2133
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2134
# When not using gcc, we currently assume that we are using
2135
# Microsoft Visual C++.
2136
if test "$GCC" != yes; then
2146
if test "$with_gnu_ld" = yes; then
2147
# If archive_cmds runs LD, not CC, wlarc should be empty
2150
# See if GNU ld supports shared libraries.
2152
aix3* | aix4* | aix5*)
2153
# On AIX, the GNU linker is very broken
2154
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2158
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2159
*** to be unable to reliably create shared libraries on AIX.
2160
*** Therefore, libtool is disabling shared libraries support. If you
2161
*** really care for shared libraries, you may want to modify your PATH
2162
*** so that a non-GNU linker is found, and then restart.
2168
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)'
2169
hardcode_libdir_flag_spec='-L$libdir'
2170
hardcode_minus_L=yes
2172
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2173
# that the semantics of dynamic libraries on AmigaOS, at least up
2174
# to version 4, is to share data among multiple programs linked
2175
# with the same dynamic library. Since this doesn't match the
2176
# behavior of shared libraries on other platforms, we can use
2182
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2183
allow_undefined_flag=unsupported
2184
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2185
# support --undefined. This deserves some investigation. FIXME
2186
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2192
cygwin* | mingw* | pw32*)
2193
# hardcode_libdir_flag_spec is actually meaningless, as there is
2194
# no search path for DLLs.
2195
hardcode_libdir_flag_spec='-L$libdir'
2196
allow_undefined_flag=unsupported
2197
always_export_symbols=yes
2199
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2200
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2201
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2202
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2203
else $CC -o impgen impgen.c ; fi)~
2204
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2206
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2208
# cygwin and mingw dlls have different entry points and sets of symbols
2210
# FIXME: what about values for MSVC?
2211
dll_entry=__cygwin_dll_entry@12
2212
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2216
dll_entry=_DllMainCRTStartup@12
2217
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2221
# mingw and cygwin differ, and it's simplest to just exclude the union
2222
# of the two symbol sets.
2223
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2225
# recent cygwin and mingw systems supply a stub DllMain which the user
2226
# can override, but on older systems we have to supply one (in ltdll.c)
2227
if test "x$lt_cv_need_dllmain" = "xyes"; then
2228
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2229
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~
2230
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2236
# Extract the symbol export list from an `--export-all' def file,
2237
# then regenerate the def file from the symbol export list, so that
2238
# the compiled dll only exports the symbol export list.
2239
# Be careful not to strip the DATA tag left be newer dlltools.
2240
export_symbols_cmds="$ltdll_cmds"'
2241
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2242
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2244
# If the export-symbols file already is a .def file (1st line
2245
# is EXPORTS), use it as is.
2246
# If DATA tags from a recent dlltool are present, honour them!
2247
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2248
cp $export_symbols $output_objdir/$soname-def;
2250
echo EXPORTS > $output_objdir/$soname-def;
2252
cat $export_symbols | while read symbol; do
2255
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2256
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2257
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2259
_lt_hint=`expr 1 + \$_lt_hint`;
2263
$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~
2264
$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~
2265
$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~
2266
$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~
2267
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2271
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2272
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2275
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2276
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2281
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2285
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2286
*** create shared libraries on Solaris systems. Therefore, libtool
2287
*** is disabling shared libraries support. We urge you to upgrade GNU
2288
*** binutils to release 2.9.1 or newer. Another option is to modify
2289
*** your PATH or compiler configuration so that the native linker is
2290
*** used, and then restart.
2293
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2294
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2295
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2302
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2305
hardcode_shlibpath_var=no
2309
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2310
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2311
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2318
if test "$ld_shlibs" = yes; then
2319
runpath_var=LD_RUN_PATH
2320
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2321
export_dynamic_flag_spec='${wl}--export-dynamic'
2323
cygwin* | mingw* | pw32*)
2324
# dlltool doesn't understand --whole-archive et. al.
2325
whole_archive_flag_spec=
2328
# ancient GNU ld didn't support --whole-archive et. al.
2329
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2330
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2332
whole_archive_flag_spec=
1983
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1988
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1989
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1990
[rm -f .libs 2>/dev/null
1991
mkdir .libs 2>/dev/null
1992
if test -d .libs; then
2338
# PORTME fill in a description of your system's linker (not GNU ld)
2341
allow_undefined_flag=unsupported
2342
always_export_symbols=yes
2343
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'
2344
# Note: this linker hardcodes the directories in LIBPATH if there
2345
# are no directories specified by -L.
2346
hardcode_minus_L=yes
2347
if test "$GCC" = yes && test -z "$link_static_flag"; then
2348
# Neither direct hardcoding nor static linking is supported with a
2350
hardcode_direct=unsupported
2355
if test "$host_cpu" = ia64; then
2356
# On IA64, the linker does run time linking by default, so we don't
2357
# have to do anything special.
2358
aix_use_runtimelinking=no
2359
exp_sym_flag='-Bexport'
2362
aix_use_runtimelinking=no
2364
# Test if we are trying to use run time linking or normal
2365
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2366
# need to do runtime linking.
2367
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2368
for ld_flag in $LDFLAGS; do
2371
aix_use_runtimelinking=yes
2378
exp_sym_flag='-bexport'
2379
no_entry_flag='-bnoentry'
2382
# When large executables or shared objects are built, AIX ld can
2383
# have problems creating the table of contents. If linking a library
2384
# or program results in "error TOC overflow" add -mminimal-toc to
2385
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2386
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2390
hardcode_libdir_separator=':'
2391
if test "$GCC" = yes; then
2392
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2393
collect2name=`${CC} -print-prog-name=collect2`
2394
if test -f "$collect2name" && \
2395
strings "$collect2name" | grep resolve_lib_name >/dev/null
2397
# We have reworked collect2
2400
# We have old collect2
2401
hardcode_direct=unsupported
2402
# It fails to find uninstalled libraries when the uninstalled
2403
# path is not listed in the libpath. Setting hardcode_minus_L
2404
# to unsupported forces relinking
2405
hardcode_minus_L=yes
2406
hardcode_libdir_flag_spec='-L$libdir'
2407
hardcode_libdir_separator=
2411
shared_flag='-shared'
2414
if test "$host_cpu" = ia64; then
2415
shared_flag='${wl}-G'
2417
if test "$aix_use_runtimelinking" = yes; then
2418
shared_flag='${wl}-G'
2420
shared_flag='${wl}-bM:SRE'
2425
# It seems that -bexpall can do strange things, so it is better to
2426
# generate a list of symbols to export.
2427
always_export_symbols=yes
2428
if test "$aix_use_runtimelinking" = yes; then
2429
# Warning - without using the other runtime loading flags (-brtl),
2430
# -berok will link without error, but may produce a broken library.
2431
allow_undefined_flag='-berok'
2432
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2433
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"
2435
if test "$host_cpu" = ia64; then
2436
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2437
allow_undefined_flag="-z nodefs"
2438
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"
2440
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2441
# Warning - without using the other run time loading flags,
2442
# -berok will link without error, but may produce a broken library.
2443
allow_undefined_flag='${wl}-berok'
2444
# This is a bit strange, but is similar to how AIX traditionally builds
2445
# it's shared libraries.
2446
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'
2452
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)'
2453
hardcode_libdir_flag_spec='-L$libdir'
2454
hardcode_minus_L=yes
2455
# see comment about different semantics on the GNU ld section
2459
cygwin* | mingw* | pw32*)
2460
# When not using gcc, we currently assume that we are using
2461
# Microsoft Visual C++.
2462
# hardcode_libdir_flag_spec is actually meaningless, as there is
2463
# no search path for DLLs.
2464
hardcode_libdir_flag_spec=' '
2465
allow_undefined_flag=unsupported
2466
# Tell ltmain to make .lib files, not .a files.
2468
# FIXME: Setting linknames here is a bad hack.
2469
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2470
# The linker will automatically build a .lib file if we build a DLL.
2471
old_archive_from_new_cmds='true'
2472
# FIXME: Should let the user specify the lib program.
2473
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2474
fix_srcfile_path='`cygpath -w "$srcfile"`'
2477
darwin* | rhapsody*)
2479
rhapsody* | darwin1.[[012]])
2480
allow_undefined_flag='-undefined suppress'
2483
allow_undefined_flag='-flat_namespace -undefined suppress'
2486
# FIXME: Relying on posixy $() will cause problems for
2487
# cross-compilation, but unfortunately the echo tests do not
2488
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2489
# `"' quotes if we put them in here... so don't!
2490
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2491
# We need to add '_' to the symbols in $export_symbols first
2492
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2494
hardcode_shlibpath_var=no
2495
whole_archive_flag_spec='-all_load $convenience'
2502
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2503
# support. Future versions do this automatically, but an explicit c++rt0.o
2504
# does not break anything, and helps significantly (at the cost of a little
2507
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2508
hardcode_libdir_flag_spec='-R$libdir'
2510
hardcode_shlibpath_var=no
2513
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2515
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2517
hardcode_minus_L=yes
2518
hardcode_shlibpath_var=no
2521
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2523
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2524
hardcode_libdir_flag_spec='-R$libdir'
2526
hardcode_shlibpath_var=no
2529
hpux9* | hpux10* | hpux11*)
2531
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' ;;
2532
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2534
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2535
hardcode_libdir_separator=:
2537
hardcode_minus_L=yes # Not in the search PATH, but as the default
2538
# location of the library.
2539
export_dynamic_flag_spec='${wl}-E'
2542
irix5* | irix6* | nonstopux*)
2543
if test "$GCC" = yes; then
2544
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'
2545
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2547
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'
2548
hardcode_libdir_flag_spec='-rpath $libdir'
2550
hardcode_libdir_separator=:
2551
link_all_deplibs=yes
2555
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2556
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2558
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2560
hardcode_libdir_flag_spec='-R$libdir'
2562
hardcode_shlibpath_var=no
2566
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2568
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2569
hardcode_libdir_separator=:
2570
hardcode_shlibpath_var=no
2575
hardcode_shlibpath_var=no
2576
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2577
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2578
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2579
export_dynamic_flag_spec='${wl}-E'
2582
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2583
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2584
hardcode_libdir_flag_spec='-R$libdir'
2587
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2588
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2595
hardcode_libdir_flag_spec='-L$libdir'
2596
hardcode_minus_L=yes
2597
allow_undefined_flag=unsupported
2598
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'
2599
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2603
if test "$GCC" = yes; then
2604
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2605
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'
2607
allow_undefined_flag=' -expect_unresolved \*'
2608
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'
2610
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2611
hardcode_libdir_separator=:
2614
osf4* | osf5*) # as osf3* with the addition of -msym flag
2615
if test "$GCC" = yes; then
2616
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2617
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'
2618
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2620
allow_undefined_flag=' -expect_unresolved \*'
2621
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'
2622
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2623
$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'
2625
#Both c and cxx compiler support -rpath directly
2626
hardcode_libdir_flag_spec='-rpath $libdir'
2628
hardcode_libdir_separator=:
2632
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2633
hardcode_shlibpath_var=no
2634
runpath_var=LD_RUN_PATH
2635
hardcode_runpath_var=yes
2636
export_dynamic_flag_spec='${wl}-Bexport'
2640
# gcc --version < 3.0 without binutils cannot create self contained
2641
# shared libraries reliably, requiring libgcc.a to resolve some of
2642
# the object symbols generated in some cases. Libraries that use
2643
# assert need libgcc.a to resolve __eprintf, for example. Linking
2644
# a copy of libgcc.a into every shared library to guarantee resolving
2645
# such symbols causes other problems: According to Tim Van Holder
2646
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2647
# (to the application) exception stack for one thing.
2648
no_undefined_flag=' -z defs'
2649
if test "$GCC" = yes; then
2650
case `$CC --version 2>/dev/null` in
2654
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2655
*** create self contained shared libraries on Solaris systems, without
2656
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2657
*** -no-undefined support, which will at least allow you to build shared
2658
*** libraries. However, you may find that when you link such libraries
2659
*** into an application without using GCC, you have to manually add
2660
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2661
*** upgrade to a newer version of GCC. Another option is to rebuild your
2662
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2669
# $CC -shared without GNU ld will not create a library from C++
2670
# object files and a static libstdc++, better avoid it by now
2671
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2672
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2673
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2674
hardcode_libdir_flag_spec='-R$libdir'
2675
hardcode_shlibpath_var=no
2677
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2678
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2679
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2681
link_all_deplibs=yes
2685
if test "x$host_vendor" = xsequent; then
2686
# Use $CC to link under sequent, because it throws in some extra .o
2687
# files that make .init and .fini sections work.
2688
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2690
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2692
hardcode_libdir_flag_spec='-L$libdir'
2694
hardcode_minus_L=yes
2695
hardcode_shlibpath_var=no
2699
case $host_vendor in
2701
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2702
hardcode_direct=yes # is this really true???
2705
## LD is ld it makes a PLAMLIB
2706
## CC just makes a GrossModule.
2707
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2708
reload_cmds='$CC -r -o $output$reload_objs'
2712
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2713
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2716
runpath_var='LD_RUN_PATH'
2717
hardcode_shlibpath_var=no
2721
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2722
hardcode_shlibpath_var=no
2723
export_dynamic_flag_spec='-Bexport'
2727
no_undefined_flag=' -z text'
2728
# $CC -shared without GNU ld will not create a library from C++
2729
# object files and a static libstdc++, better avoid it by now
2730
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2731
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2732
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2733
hardcode_libdir_flag_spec=
2734
hardcode_shlibpath_var=no
2735
runpath_var='LD_RUN_PATH'
2739
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2740
hardcode_libdir_flag_spec='-L$libdir'
2741
hardcode_shlibpath_var=no
2745
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2746
hardcode_libdir_flag_spec='-L$libdir'
2747
hardcode_shlibpath_var=no
2751
if test -d /usr/nec; then
2752
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2753
hardcode_shlibpath_var=no
2754
runpath_var=LD_RUN_PATH
2755
hardcode_runpath_var=yes
2761
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2764
hardcode_shlibpath_var=no
2765
hardcode_runpath_var=yes
2766
runpath_var=LD_RUN_PATH
2769
sysv5uw7* | unixware7*)
2770
no_undefined_flag='${wl}-z ${wl}text'
2771
if test "$GCC" = yes; then
2772
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2774
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2776
runpath_var='LD_RUN_PATH'
2777
hardcode_shlibpath_var=no
1995
# MS-DOS does not allow filenames that begin with a dot.
2785
AC_MSG_RESULT([$ld_shlibs])
2786
test "$ld_shlibs" = no && can_build_shared=no
1998
rmdir .libs 2>/dev/null])
1999
objdir=$lt_cv_objdir
2000
])# AC_LIBTOOL_OBJDIR
2003
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2004
# ----------------------------------------------
2788
2005
# Check hardcoding attributes.
2789
AC_MSG_CHECKING([how to hardcode library paths into programs])
2791
if test -n "$hardcode_libdir_flag_spec" || \
2792
test -n "$runpath_var"; then
2006
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2007
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2008
_LT_AC_TAGVAR(hardcode_action, $1)=
2009
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2010
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
2011
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2794
2013
# We can hardcode non-existant directories.
2795
if test "$hardcode_direct" != no &&
2014
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2796
2015
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2797
2016
# have to relink, otherwise we might link with an installed library
2798
2017
# when we should be linking with a yet-to-be-installed one
2799
## test "$hardcode_shlibpath_var" != no &&
2800
test "$hardcode_minus_L" != no; then
2018
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2019
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2801
2020
# Linking always hardcodes the temporary library directory.
2802
hardcode_action=relink
2021
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2804
2023
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2805
hardcode_action=immediate
2024
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2808
2027
# We cannot hardcode anything, or else we can only hardcode existing
2810
hardcode_action=unsupported
2812
AC_MSG_RESULT([$hardcode_action])
2029
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2031
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2033
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2034
# Fast installation is not supported
2035
enable_fast_install=no
2036
elif test "$shlibpath_overrides_runpath" = yes ||
2037
test "$enable_shared" = no; then
2038
# Fast installation is not necessary
2039
enable_fast_install=needless
2041
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2044
# AC_LIBTOOL_SYS_LIB_STRIP
2045
# ------------------------
2046
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2816
2049
AC_MSG_CHECKING([whether stripping libraries is possible])
2817
2050
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3228
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3229
soname_spec='${libname}${release}.so$major'
3230
shlibpath_var=LD_LIBRARY_PATH
3237
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3238
soname_spec='${libname}${release}.so$major'
3239
shlibpath_var=LD_LIBRARY_PATH
3243
2588
if test -d /usr/nec ;then
3244
2589
version_type=linux
3245
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3246
soname_spec='$libname.so.$major'
2590
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2591
soname_spec='$libname${shared_ext}.$major'
3247
2592
shlibpath_var=LD_LIBRARY_PATH
2598
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2599
soname_spec='${libname}${release}${shared_ext}$major'
2600
shlibpath_var=LD_LIBRARY_PATH
3252
2604
dynamic_linker=no
3255
2607
AC_MSG_RESULT([$dynamic_linker])
3256
2608
test "$dynamic_linker" = no && can_build_shared=no
3258
# Report the final consequences.
3259
AC_MSG_CHECKING([if libtool supports shared libraries])
3260
AC_MSG_RESULT([$can_build_shared])
3262
AC_MSG_CHECKING([whether to build shared libraries])
3263
test "$can_build_shared" = "no" && enable_shared=no
3265
# On AIX, shared libraries and static libraries use the same namespace, and
3266
# are all built from PIC.
3269
test "$enable_shared" = yes && enable_static=no
3270
if test -n "$RANLIB"; then
3271
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3272
postinstall_cmds='$RANLIB $lib'
3277
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3278
test "$enable_shared" = yes && enable_static=no
3282
AC_MSG_RESULT([$enable_shared])
3284
AC_MSG_CHECKING([whether to build static libraries])
3285
# Make sure either enable_shared or enable_static is yes.
3286
test "$enable_shared" = yes || enable_static=yes
3287
AC_MSG_RESULT([$enable_static])
3289
if test "$hardcode_action" = relink; then
3290
# Fast installation is not supported
3291
enable_fast_install=no
3292
elif test "$shlibpath_overrides_runpath" = yes ||
3293
test "$enable_shared" = no; then
3294
# Fast installation is not necessary
3295
enable_fast_install=needless
3298
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3299
if test "$GCC" = yes; then
3300
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3303
AC_LIBTOOL_DLOPEN_SELF
3305
if test "$enable_shared" = yes && test "$GCC" = yes; then
3306
case $archive_cmds in
3308
# FIXME: we may have to deal with multi-command sequences.
3311
# Test whether the compiler implicitly links with -lc since on some
3312
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3313
# to ld, don't add -lc before -lgcc.
3314
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3315
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3317
echo 'static int dummy;' > conftest.$ac_ext
3319
if AC_TRY_EVAL(ac_compile); then
3322
libobjs=conftest.$ac_objext
3324
wl=$lt_cv_prog_cc_wl
3330
save_allow_undefined_flag=$allow_undefined_flag
3331
allow_undefined_flag=
3332
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3334
lt_cv_archive_cmds_need_lc=no
3336
lt_cv_archive_cmds_need_lc=yes
3338
allow_undefined_flag=$save_allow_undefined_flag
2609
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2614
AC_DEFUN([_LT_AC_TAGCONFIG],
2615
[AC_ARG_WITH([tags],
2616
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2617
[include additional configurations @<:@automatic@:>@])],
2618
[tagnames="$withval"])
2620
if test -f "$ltmain" && test -n "$tagnames"; then
2621
if test ! -f "${ofile}"; then
2622
AC_MSG_WARN([output file `$ofile' does not exist])
2625
if test -z "$LTCC"; then
2626
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2627
if test -z "$LTCC"; then
2628
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3340
cat conftest.err 1>&5
3342
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3346
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3348
# The second clause should only fire when bootstrapping the
3349
# libtool distribution, otherwise you forgot to ship ltmain.sh
3350
# with your package, and you will get complaints that there are
3351
# no rules to generate ltmain.sh.
3352
if test -f "$ltmain"; then
3355
# If there is no Makefile yet, we rely on a make rule to execute
3356
# `config.status --recheck' to rerun these tests and create the
3357
# libtool script then.
3358
test -f Makefile && make "$ltmain"
3361
if test -f "$ltmain"; then
3362
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3365
echo creating $ofile
3367
# Now quote all the things that may contain metacharacters while being
3368
# careful not to overquote the AC_SUBSTed values. We take copies of the
3369
# variables and quote the copies for generation of the libtool script.
3370
for var in echo old_CC old_CFLAGS SED \
3371
AR AR_FLAGS CC LD LN_S NM SHELL \
3372
reload_flag reload_cmds wl \
3373
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3374
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3375
library_names_spec soname_spec \
3376
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3377
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3378
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3379
old_striplib striplib file_magic_cmd export_symbols_cmds \
3380
deplibs_check_method allow_undefined_flag no_undefined_flag \
3381
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3382
global_symbol_to_c_name_address \
3383
hardcode_libdir_flag_spec hardcode_libdir_separator \
3384
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3385
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3388
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3389
old_postinstall_cmds | old_postuninstall_cmds | \
3390
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3391
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3392
postinstall_cmds | postuninstall_cmds | \
3393
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3394
# Double-quote double-evaled strings.
3395
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3398
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2630
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2634
# Extract list of available tagged configurations in $ofile.
2635
# Note that this assumes the entire list is on one line.
2636
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2638
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2639
for tagname in $tagnames; do
2641
# Check whether tagname contains only valid characters
2642
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2644
*) AC_MSG_ERROR([invalid tag name: $tagname])
2648
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2650
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2653
# Update the list of available tags.
2654
if test -n "$tagname"; then
2655
echo appending configuration tag \"$tagname\" to $ofile
2659
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2660
AC_LIBTOOL_LANG_CXX_CONFIG
2667
if test -n "$F77" && test "X$F77" != "Xno"; then
2668
AC_LIBTOOL_LANG_F77_CONFIG
2675
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2676
AC_LIBTOOL_LANG_GCJ_CONFIG
2683
AC_LIBTOOL_LANG_RC_CONFIG
2687
AC_MSG_ERROR([Unsupported tag name: $tagname])
2691
# Append the new tag name to the list of available tags.
2692
if test -n "$tagname" ; then
2693
available_tags="$available_tags $tagname"
3403
cat <<__EOF__ > "${ofile}T"
3406
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3407
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3408
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3410
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3411
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3413
# This program is free software; you can redistribute it and/or modify
3414
# it under the terms of the GNU General Public License as published by
3415
# the Free Software Foundation; either version 2 of the License, or
3416
# (at your option) any later version.
3418
# This program is distributed in the hope that it will be useful, but
3419
# WITHOUT ANY WARRANTY; without even the implied warranty of
3420
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3421
# General Public License for more details.
3423
# You should have received a copy of the GNU General Public License
3424
# along with this program; if not, write to the Free Software
3425
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3427
# As a special exception to the GNU General Public License, if you
3428
# distribute this file as part of a program that contains a
3429
# configuration script generated by Autoconf, you may include it under
3430
# the same distribution terms that you use for the rest of that program.
3432
# A sed that does not truncate output.
3435
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3436
Xsed="${SED} -e s/^X//"
3438
# The HP-UX ksh and POSIX shell print the target directory to stdout
3440
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3442
# ### BEGIN LIBTOOL CONFIG
3444
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3446
# Shell to use when invoking shell scripts.
3449
# Whether or not to build shared libraries.
3450
build_libtool_libs=$enable_shared
3452
# Whether or not to build static libraries.
3453
build_old_libs=$enable_static
3455
# Whether or not to add -lc for building shared libraries.
3456
build_libtool_need_lc=$need_lc
3458
# Whether or not to optimize for fast installation.
3459
fast_install=$enable_fast_install
3462
host_alias=$host_alias
3465
# An echo program that does not interpret backslashes.
3470
AR_FLAGS=$lt_AR_FLAGS
3472
# The default C compiler.
3475
# Is the compiler the GNU C compiler?
3478
# The linker used to build libraries.
3481
# Whether we need hard or soft links.
3484
# A BSD-compatible nm program.
3487
# A symbol stripping program
3490
# Used to examine libraries when file_magic_cmd begins "file"
3491
MAGIC_CMD=$MAGIC_CMD
3493
# Used on cygwin: DLL creation program.
3496
# Used on cygwin: object dumper.
3499
# Used on cygwin: assembler.
3502
# The name of the directory that contains temporary libtool files.
3505
# How to create reloadable object files.
3506
reload_flag=$lt_reload_flag
3507
reload_cmds=$lt_reload_cmds
3509
# How to pass a linker flag through the compiler.
3512
# Object file suffix (normally "o").
3515
# Old archive suffix (normally "a").
3518
# Executable file suffix (normally "").
3521
# Additional compiler flags for building library objects.
3522
pic_flag=$lt_pic_flag
3525
# Does compiler simultaneously support -c and -o options?
3526
compiler_c_o=$lt_compiler_c_o
3528
# Can we write directly to a .lo ?
3529
compiler_o_lo=$lt_compiler_o_lo
3531
# Must we lock files when doing compilation ?
3532
need_locks=$lt_need_locks
3534
# Do we need the lib prefix for modules?
3535
need_lib_prefix=$need_lib_prefix
3537
# Do we need a version for libraries?
3538
need_version=$need_version
3540
# Whether dlopen is supported.
3541
dlopen_support=$enable_dlopen
3543
# Whether dlopen of programs is supported.
3544
dlopen_self=$enable_dlopen_self
3546
# Whether dlopen of statically linked programs is supported.
3547
dlopen_self_static=$enable_dlopen_self_static
3549
# Compiler flag to prevent dynamic linking.
3550
link_static_flag=$lt_link_static_flag
3552
# Compiler flag to turn off builtin functions.
3553
no_builtin_flag=$lt_no_builtin_flag
3555
# Compiler flag to allow reflexive dlopens.
3556
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3558
# Compiler flag to generate shared objects directly from archives.
3559
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3561
# Compiler flag to generate thread-safe objects.
3562
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3564
# Library versioning type.
3565
version_type=$version_type
3567
# Format of library name prefix.
3568
libname_spec=$lt_libname_spec
3570
# List of archive names. First name is the real one, the rest are links.
3571
# The last name is the one that the linker finds with -lNAME.
3572
library_names_spec=$lt_library_names_spec
3574
# The coded name of the library, if different from the real name.
3575
soname_spec=$lt_soname_spec
3577
# Commands used to build and install an old-style archive.
3579
old_archive_cmds=$lt_old_archive_cmds
3580
old_postinstall_cmds=$lt_old_postinstall_cmds
3581
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3583
# Create an old-style archive from a shared archive.
3584
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3586
# Create a temporary old-style archive to link instead of a shared archive.
3587
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3589
# Commands used to build and install a shared archive.
3590
archive_cmds=$lt_archive_cmds
3591
archive_expsym_cmds=$lt_archive_expsym_cmds
3592
postinstall_cmds=$lt_postinstall_cmds
3593
postuninstall_cmds=$lt_postuninstall_cmds
3595
# Commands to strip libraries.
3596
old_striplib=$lt_old_striplib
3597
striplib=$lt_striplib
3599
# Method to check whether dependent libraries are shared objects.
3600
deplibs_check_method=$lt_deplibs_check_method
3602
# Command to use when deplibs_check_method == file_magic.
3603
file_magic_cmd=$lt_file_magic_cmd
3605
# Flag that allows shared libraries with undefined symbols to be built.
3606
allow_undefined_flag=$lt_allow_undefined_flag
3608
# Flag that forces no undefined symbols.
3609
no_undefined_flag=$lt_no_undefined_flag
3611
# Commands used to finish a libtool library installation in a directory.
3612
finish_cmds=$lt_finish_cmds
3614
# Same as above, but a single script fragment to be evaled but not shown.
3615
finish_eval=$lt_finish_eval
3617
# Take the output of nm and produce a listing of raw symbols and C names.
3618
global_symbol_pipe=$lt_global_symbol_pipe
3620
# Transform the output of nm in a proper C declaration
3621
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3623
# Transform the output of nm in a C name address pair
3624
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3626
# This is the shared library runtime path variable.
3627
runpath_var=$runpath_var
3629
# This is the shared library path variable.
3630
shlibpath_var=$shlibpath_var
3632
# Is shlibpath searched before the hard-coded library search path?
3633
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3635
# How to hardcode a shared library path into an executable.
3636
hardcode_action=$hardcode_action
3638
# Whether we should hardcode library paths into libraries.
3639
hardcode_into_libs=$hardcode_into_libs
3641
# Flag to hardcode \$libdir into a binary during linking.
3642
# This must work even if \$libdir does not exist.
3643
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3645
# Whether we need a single -rpath flag with a separated argument.
3646
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3648
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3650
hardcode_direct=$hardcode_direct
3652
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3654
hardcode_minus_L=$hardcode_minus_L
3656
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3657
# the resulting binary.
3658
hardcode_shlibpath_var=$hardcode_shlibpath_var
3660
# Variables whose values should be saved in libtool wrapper scripts and
3661
# restored at relink time.
3662
variables_saved_for_relink="$variables_saved_for_relink"
3664
# Whether libtool must link a program against all its dependency libraries.
3665
link_all_deplibs=$link_all_deplibs
3667
# Compile-time system search path for libraries
3668
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3670
# Run-time system search path for libraries
3671
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3673
# Fix the shell variable \$srcfile for the compiler.
3674
fix_srcfile_path="$fix_srcfile_path"
3676
# Set to yes if exported symbols are required.
3677
always_export_symbols=$always_export_symbols
3679
# The commands to list exported symbols.
3680
export_symbols_cmds=$lt_export_symbols_cmds
3682
# The commands to extract the exported symbol list from a shared archive.
3683
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3685
# Symbols that should not be listed in the preloaded symbols.
3686
exclude_expsyms=$lt_exclude_expsyms
3688
# Symbols that must always be exported.
3689
include_expsyms=$lt_include_expsyms
3691
# ### END LIBTOOL CONFIG
3697
cat <<\EOF >> "${ofile}T"
3699
# AIX sometimes has problems with the GCC collect2 program. For some
3700
# reason, if we set the COLLECT_NAMES environment variable, the problems
3701
# vanish in a puff of smoke.
3702
if test "X${COLLECT_NAMES+set}" != Xset; then
3704
export COLLECT_NAMES
3711
cygwin* | mingw* | pw32* | os2*)
3712
cat <<'EOF' >> "${ofile}T"
3713
# This is a source program that is used to create dlls on Windows
3714
# Don't remove nor modify the starting and closing comments
3715
# /* ltdll.c starts here */
3716
# #define WIN32_LEAN_AND_MEAN
3717
# #include <windows.h>
3718
# #undef WIN32_LEAN_AND_MEAN
3719
# #include <stdio.h>
3721
# #ifndef __CYGWIN__
3722
# # ifdef __CYGWIN32__
3723
# # define __CYGWIN__ __CYGWIN32__
3727
# #ifdef __cplusplus
3730
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3731
# #ifdef __cplusplus
3736
# #include <cygwin/cygwin_dll.h>
3737
# DECLARE_CYGWIN_DLL( DllMain );
3739
# HINSTANCE __hDllInstance_base;
3742
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3744
# __hDllInstance_base = hInst;
3747
# /* ltdll.c ends here */
3748
# This is a source program that is used to create import libraries
3749
# on Windows for dlls which lack them. Don't remove nor modify the
3750
# starting and closing comments
3751
# /* impgen.c starts here */
3752
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3754
# This file is part of GNU libtool.
3756
# This program is free software; you can redistribute it and/or modify
3757
# it under the terms of the GNU General Public License as published by
3758
# the Free Software Foundation; either version 2 of the License, or
3759
# (at your option) any later version.
3761
# This program is distributed in the hope that it will be useful,
3762
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3763
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3764
# GNU General Public License for more details.
3766
# You should have received a copy of the GNU General Public License
3767
# along with this program; if not, write to the Free Software
3768
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3771
# #include <stdio.h> /* for printf() */
3772
# #include <unistd.h> /* for open(), lseek(), read() */
3773
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3774
# #include <string.h> /* for strdup() */
3776
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3778
# #define O_BINARY 0
3781
# static unsigned int
3782
# pe_get16 (fd, offset)
3786
# unsigned char b[2];
3787
# lseek (fd, offset, SEEK_SET);
3789
# return b[0] + (b[1]<<8);
3792
# static unsigned int
3793
# pe_get32 (fd, offset)
3797
# unsigned char b[4];
3798
# lseek (fd, offset, SEEK_SET);
3800
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3803
# static unsigned int
3807
# unsigned char *b = ptr;
3808
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3817
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3818
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3819
# unsigned long name_rvas, nexp;
3820
# unsigned char *expdata, *erva;
3821
# char *filename, *dll_name;
3823
# filename = argv[1];
3825
# dll = open(filename, O_RDONLY|O_BINARY);
3829
# dll_name = filename;
3831
# for (i=0; filename[i]; i++)
3832
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3833
# dll_name = filename + i +1;
3835
# pe_header_offset = pe_get32 (dll, 0x3c);
3836
# opthdr_ofs = pe_header_offset + 4 + 20;
3837
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3839
# if (num_entries < 1) /* no exports */
3842
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3843
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3844
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3845
# secptr = (pe_header_offset + 4 + 20 +
3846
# pe_get16 (dll, pe_header_offset + 4 + 16));
3849
# for (i = 0; i < nsections; i++)
3852
# unsigned long secptr1 = secptr + 40 * i;
3853
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3854
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3855
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3856
# lseek(dll, secptr1, SEEK_SET);
3857
# read(dll, sname, 8);
3858
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3860
# expptr = fptr + (export_rva - vaddr);
3861
# if (export_rva + export_size > vaddr + vsize)
3862
# export_size = vsize - (export_rva - vaddr);
3867
# expdata = (unsigned char*)malloc(export_size);
3868
# lseek (dll, expptr, SEEK_SET);
3869
# read (dll, expdata, export_size);
3870
# erva = expdata - export_rva;
3872
# nexp = pe_as32 (expdata+24);
3873
# name_rvas = pe_as32 (expdata+32);
3875
# printf ("EXPORTS\n");
3876
# for (i = 0; i<nexp; i++)
3878
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3879
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3884
# /* impgen.c ends here */
3890
# We use sed instead of cat because bash on DJGPP gets confused if
3891
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3892
# text mode, it properly converts lines to CR/LF. This bash problem
3893
# is reportedly fixed, but why not run on old versions too?
3894
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3896
mv -f "${ofile}T" "$ofile" || \
3897
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3901
])# _LT_AC_LTCONFIG_HACK
3903
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3904
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3906
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3907
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3909
# AC_ENABLE_SHARED - implement the --enable-shared flag
3910
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3911
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2699
# Now substitute the updated list of available tags.
2700
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2701
mv "${ofile}T" "$ofile"
2705
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2708
])# _LT_AC_TAGCONFIG
2713
# enable checks for dlopen support
2714
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2715
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2716
])# AC_LIBTOOL_DLOPEN
2719
# AC_LIBTOOL_WIN32_DLL
2720
# --------------------
2721
# declare package support for building win32 dll's
2722
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2723
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2724
])# AC_LIBTOOL_WIN32_DLL
2727
# AC_ENABLE_SHARED([DEFAULT])
2728
# ---------------------------
2729
# implement the --enable-shared flag
2730
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3913
2731
AC_DEFUN([AC_ENABLE_SHARED],
3914
2732
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3915
AC_ARG_ENABLE(shared,
3916
changequote(<<, >>)dnl
3917
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3918
changequote([, ])dnl
3919
[p=${PACKAGE-default}
3921
yes) enable_shared=yes ;;
3922
no) enable_shared=no ;;
3925
# Look at the argument we got. We use all the common list separators.
3926
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3927
for pkg in $enableval; do
3928
if test "X$pkg" = "X$p"; then
3935
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3938
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
2733
AC_ARG_ENABLE([shared],
2734
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2735
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2736
[p=${PACKAGE-default}
2738
yes) enable_shared=yes ;;
2739
no) enable_shared=no ;;
2742
# Look at the argument we got. We use all the common list separators.
2743
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2744
for pkg in $enableval; do
2746
if test "X$pkg" = "X$p"; then
2753
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2754
])# AC_ENABLE_SHARED
2759
#- set the default shared flag to --disable-shared
3939
2760
AC_DEFUN([AC_DISABLE_SHARED],
3940
2761
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3941
AC_ENABLE_SHARED(no)])
3943
# AC_ENABLE_STATIC - implement the --enable-static flag
3944
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3945
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2762
AC_ENABLE_SHARED(no)
2763
])# AC_DISABLE_SHARED
2766
# AC_ENABLE_STATIC([DEFAULT])
2767
# ---------------------------
2768
# implement the --enable-static flag
2769
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3947
2770
AC_DEFUN([AC_ENABLE_STATIC],
3948
2771
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3949
AC_ARG_ENABLE(static,
3950
changequote(<<, >>)dnl
3951
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3952
changequote([, ])dnl
3953
[p=${PACKAGE-default}
3955
yes) enable_static=yes ;;
3956
no) enable_static=no ;;
3959
# Look at the argument we got. We use all the common list separators.
3960
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3961
for pkg in $enableval; do
3962
if test "X$pkg" = "X$p"; then
3969
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3972
# AC_DISABLE_STATIC - set the default static flag to --disable-static
2772
AC_ARG_ENABLE([static],
2773
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2774
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2775
[p=${PACKAGE-default}
2777
yes) enable_static=yes ;;
2778
no) enable_static=no ;;
2781
# Look at the argument we got. We use all the common list separators.
2782
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2783
for pkg in $enableval; do
2785
if test "X$pkg" = "X$p"; then
2792
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2793
])# AC_ENABLE_STATIC
2798
# set the default static flag to --disable-static
3973
2799
AC_DEFUN([AC_DISABLE_STATIC],
3974
2800
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3975
AC_ENABLE_STATIC(no)])
3978
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3979
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3980
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2801
AC_ENABLE_STATIC(no)
2802
])# AC_DISABLE_STATIC
2805
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2806
# ---------------------------------
2807
# implement the --enable-fast-install flag
2808
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3982
2809
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3983
2810
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3984
AC_ARG_ENABLE(fast-install,
3985
changequote(<<, >>)dnl
3986
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3987
changequote([, ])dnl
3988
[p=${PACKAGE-default}
3990
yes) enable_fast_install=yes ;;
3991
no) enable_fast_install=no ;;
3993
enable_fast_install=no
3994
# Look at the argument we got. We use all the common list separators.
3995
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3996
for pkg in $enableval; do
3997
if test "X$pkg" = "X$p"; then
3998
enable_fast_install=yes
4004
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4007
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
2811
AC_ARG_ENABLE([fast-install],
2812
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2813
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2814
[p=${PACKAGE-default}
2816
yes) enable_fast_install=yes ;;
2817
no) enable_fast_install=no ;;
2819
enable_fast_install=no
2820
# Look at the argument we got. We use all the common list separators.
2821
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2822
for pkg in $enableval; do
2824
if test "X$pkg" = "X$p"; then
2825
enable_fast_install=yes
2831
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2832
])# AC_ENABLE_FAST_INSTALL
2835
# AC_DISABLE_FAST_INSTALL
2836
# -----------------------
2837
# set the default to --disable-fast-install
4008
2838
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4009
2839
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4010
AC_ENABLE_FAST_INSTALL(no)])
4012
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4013
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4014
# Where MODE is either `yes' or `no'. If omitted, it defaults to
2840
AC_ENABLE_FAST_INSTALL(no)
2841
])# AC_DISABLE_FAST_INSTALL
2844
# AC_LIBTOOL_PICMODE([MODE])
2845
# --------------------------
2846
# implement the --with-pic flag
2847
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
4016
2848
AC_DEFUN([AC_LIBTOOL_PICMODE],
4017
2849
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4018
pic_mode=ifelse($#,1,$1,default)])
4021
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
2850
pic_mode=ifelse($#,1,$1,default)
2851
])# AC_LIBTOOL_PICMODE
2856
# This is predefined starting with Autoconf 2.54, so this conditional
2857
# definition can be removed once we require Autoconf 2.54 or later.
2858
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2859
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2860
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2861
then ac_cv_prog_egrep='grep -E'
2862
else ac_cv_prog_egrep='egrep'
2864
EGREP=$ac_cv_prog_egrep
2869
# AC_PATH_TOOL_PREFIX
2870
# -------------------
2871
# find a file program which can recognise shared library
4022
2872
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4023
[AC_MSG_CHECKING([for $1])
2873
[AC_REQUIRE([AC_PROG_EGREP])dnl
2874
AC_MSG_CHECKING([for $1])
4024
2875
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4025
2876
[case $MAGIC_CMD in
2877
[[\\/*] | ?:[\\/]*])
4027
2878
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4030
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4033
ac_save_MAGIC_CMD="$MAGIC_CMD"
4034
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2881
lt_save_MAGIC_CMD="$MAGIC_CMD"
2882
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4035
2883
dnl $ac_dummy forces splitting on constant user-supplied paths.
4036
2884
dnl POSIX.2 word splitting is done only on the output of word expansions,
4037
2885
dnl not every word. This closes a longstanding sh security hole.
4038
2886
ac_dummy="ifelse([$2], , $PATH, [$2])"
4039
2887
for ac_dir in $ac_dummy; do
4040
2889
test -z "$ac_dir" && ac_dir=.
4041
2890
if test -f $ac_dir/$1; then
4042
2891
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4487
3396
# For backwards non-gettext consistent compatibility...
4488
3397
INCLTDL="$LTDLINCL"
3398
])# AC_LIBLTDL_INSTALLABLE
3403
# enable support for C++ libraries
3404
AC_DEFUN([AC_LIBTOOL_CXX],
3405
[AC_REQUIRE([_LT_AC_LANG_CXX])
3411
AC_DEFUN([_LT_AC_LANG_CXX],
3412
[AC_REQUIRE([AC_PROG_CXX])
3413
AC_REQUIRE([AC_PROG_CXXCPP])
3414
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
3420
# enable support for Fortran 77 libraries
3421
AC_DEFUN([AC_LIBTOOL_F77],
3422
[AC_REQUIRE([_LT_AC_LANG_F77])
3428
AC_DEFUN([_LT_AC_LANG_F77],
3429
[AC_REQUIRE([AC_PROG_F77])
3430
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
3436
# enable support for GCJ libraries
3437
AC_DEFUN([AC_LIBTOOL_GCJ],
3438
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3444
AC_DEFUN([_LT_AC_LANG_GCJ],
3445
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3446
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3447
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3448
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3449
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3450
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3451
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
3457
# enable support for Windows resource files
3458
AC_DEFUN([AC_LIBTOOL_RC],
3459
[AC_REQUIRE([LT_AC_PROG_RC])
3460
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
3464
# AC_LIBTOOL_LANG_C_CONFIG
3465
# ------------------------
3466
# Ensure that the configuration vars for the C compiler are
3467
# suitably defined. Those variables are subsequently used by
3468
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3469
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3470
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3474
# Source file extension for C test sources.
3477
# Object file extension for compiled C test sources.
3479
_LT_AC_TAGVAR(objext, $1)=$objext
3481
# Code to be used in simple compile tests
3482
lt_simple_compile_test_code="int some_variable = 0;\n"
3484
# Code to be used in simple link tests
3485
lt_simple_link_test_code='int main(){return(0);}\n'
3490
# Check for any special shared library compilation flags.
3492
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3493
if test "$GCC" = no; then
3496
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3500
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3501
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3502
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3504
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3505
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3511
# Check to make sure the static flag actually works.
3513
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3514
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3515
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3517
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3520
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3521
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3522
AC_LIBTOOL_PROG_CC_C_O($1)
3523
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3524
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3525
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3526
AC_LIBTOOL_SYS_LIB_STRIP
3527
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3528
AC_LIBTOOL_DLOPEN_SELF($1)
3530
# Report which librarie types wil actually be built
3531
AC_MSG_CHECKING([if libtool supports shared libraries])
3532
AC_MSG_RESULT([$can_build_shared])
3534
AC_MSG_CHECKING([whether to build shared libraries])
3535
test "$can_build_shared" = "no" && enable_shared=no
3537
# On AIX, shared libraries and static libraries use the same namespace, and
3538
# are all built from PIC.
3541
test "$enable_shared" = yes && enable_static=no
3542
if test -n "$RANLIB"; then
3543
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3544
postinstall_cmds='$RANLIB $lib'
3549
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3550
test "$enable_shared" = yes && enable_static=no
3553
darwin* | rhapsody*)
3554
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3555
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3557
rhapsody* | darwin1.[[012]])
3558
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3561
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3564
# FIXME: Relying on posixy $() will cause problems for
3565
# cross-compilation, but unfortunately the echo tests do not
3566
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
3567
# `"' quotes if we put them in here... so don't!
3568
output_verbose_link_cmd='echo'
3569
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3570
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3571
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3572
_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}'
3573
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3574
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3575
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3576
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3577
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3578
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3582
AC_MSG_RESULT([$enable_shared])
3584
AC_MSG_CHECKING([whether to build static libraries])
3585
# Make sure either enable_shared or enable_static is yes.
3586
test "$enable_shared" = yes || enable_static=yes
3587
AC_MSG_RESULT([$enable_static])
3589
AC_LIBTOOL_CONFIG($1)
3593
])# AC_LIBTOOL_LANG_C_CONFIG
3596
# AC_LIBTOOL_LANG_CXX_CONFIG
3597
# --------------------------
3598
# Ensure that the configuration vars for the C compiler are
3599
# suitably defined. Those variables are subsequently used by
3600
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3601
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3602
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3604
AC_REQUIRE([AC_PROG_CXX])
3605
AC_REQUIRE([AC_PROG_CXXCPP])
3607
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3608
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3609
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3610
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3611
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3612
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3613
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3614
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3615
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3616
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3617
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3618
_LT_AC_TAGVAR(module_cmds, $1)=
3619
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3620
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3621
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3622
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3623
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3624
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3626
# Dependencies to place before and after the object being linked:
3627
_LT_AC_TAGVAR(predep_objects, $1)=
3628
_LT_AC_TAGVAR(postdep_objects, $1)=
3629
_LT_AC_TAGVAR(predeps, $1)=
3630
_LT_AC_TAGVAR(postdeps, $1)=
3631
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3633
# Source file extension for C++ test sources.
3636
# Object file extension for compiled C++ test sources.
3638
_LT_AC_TAGVAR(objext, $1)=$objext
3640
# Code to be used in simple compile tests
3641
lt_simple_compile_test_code="int some_variable = 0;\n"
3643
# Code to be used in simple link tests
3644
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3646
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3649
# Allow CC to be a program name with arguments.
3654
lt_save_with_gnu_ld=$with_gnu_ld
3655
lt_save_path_LD=$lt_cv_path_LD
3656
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3657
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3659
unset lt_cv_prog_gnu_ld
3661
if test -n "${lt_cv_path_LDCXX+set}"; then
3662
lt_cv_path_LD=$lt_cv_path_LDCXX
3666
test -z "${LDCXX+set}" || LD=$LDCXX
3669
_LT_AC_TAGVAR(compiler, $1)=$CC
3670
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3672
# We don't want -fno-exception wen compiling C++ code, so set the
3673
# no_builtin_flag separately
3674
if test "$GXX" = yes; then
3675
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3677
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3680
if test "$GXX" = yes; then
3681
# Set up default GNU C++ configuration
3685
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3686
# archiving commands below assume that GNU ld is being used.
3687
if test "$with_gnu_ld" = yes; then
3688
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3689
_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'
3691
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3692
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3694
# If archive_cmds runs LD, not CC, wlarc should be empty
3695
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3696
# investigate it a little bit more. (MM)
3699
# ancient GNU ld didn't support --whole-archive et. al.
3700
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3701
grep 'no-whole-archive' > /dev/null; then
3702
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3704
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3710
# A generic and very simple default shared library creation
3711
# command for GNU C++ for the case where it uses the native
3712
# linker, instead of GNU ld. If possible, this setting should
3713
# overridden to take advantage of the native linker features on
3714
# the platform it is being used on.
3715
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3718
# Commands to make compiler produce verbose output that lists
3719
# what "hidden" libraries, object files and flags are used when
3720
# linking a shared library.
3721
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3729
# PORTME: fill in a description of your system's C++ link characteristics
3730
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3731
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3734
# FIXME: insert proper C++ library support
3735
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3738
if test "$host_cpu" = ia64; then
3739
# On IA64, the linker does run time linking by default, so we don't
3740
# have to do anything special.
3741
aix_use_runtimelinking=no
3742
exp_sym_flag='-Bexport'
3745
aix_use_runtimelinking=no
3747
# Test if we are trying to use run time linking or normal
3748
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3749
# need to do runtime linking.
3750
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3751
for ld_flag in $LDFLAGS; do
3754
aix_use_runtimelinking=yes
3761
exp_sym_flag='-bexport'
3762
no_entry_flag='-bnoentry'
3765
# When large executables or shared objects are built, AIX ld can
3766
# have problems creating the table of contents. If linking a library
3767
# or program results in "error TOC overflow" add -mminimal-toc to
3768
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3769
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3771
_LT_AC_TAGVAR(archive_cmds, $1)=''
3772
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3773
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3774
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3776
if test "$GXX" = yes; then
3777
case $host_os in aix4.[012]|aix4.[012].*)
3778
# We only want to do this on AIX 4.2 and lower, the check
3779
# below for broken collect2 doesn't work under 4.3+
3780
collect2name=`${CC} -print-prog-name=collect2`
3781
if test -f "$collect2name" && \
3782
strings "$collect2name" | grep resolve_lib_name >/dev/null
3784
# We have reworked collect2
3785
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3787
# We have old collect2
3788
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3789
# It fails to find uninstalled libraries when the uninstalled
3790
# path is not listed in the libpath. Setting hardcode_minus_L
3791
# to unsupported forces relinking
3792
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3793
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3794
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3797
shared_flag='-shared'
3800
if test "$host_cpu" = ia64; then
3801
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3802
# chokes on -Wl,-G. The following line is correct:
3805
if test "$aix_use_runtimelinking" = yes; then
3806
shared_flag='${wl}-G'
3808
shared_flag='${wl}-bM:SRE'
3813
# It seems that -bexpall does not export symbols beginning with
3814
# underscore (_), so it is better to generate a list of symbols to export.
3815
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3816
if test "$aix_use_runtimelinking" = yes; then
3817
# Warning - without using the other runtime loading flags (-brtl),
3818
# -berok will link without error, but may produce a broken library.
3819
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3820
# Determine the default libpath from the value encoded in an empty executable.
3821
_LT_AC_SYS_LIBPATH_AIX
3822
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3824
_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"
3826
if test "$host_cpu" = ia64; then
3827
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3828
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3829
_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"
3831
# Determine the default libpath from the value encoded in an empty executable.
3832
_LT_AC_SYS_LIBPATH_AIX
3833
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3834
# Warning - without using the other run time loading flags,
3835
# -berok will link without error, but may produce a broken library.
3836
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3837
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3838
# -bexpall does not export symbols beginning with underscore (_)
3839
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3840
# Exported symbols can be pulled into shared objects from archives
3841
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3842
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3843
# This is similar to how AIX traditionally builds it's shared libraries.
3844
_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'
3849
case $cc_basename in
3851
# FIXME: insert proper C++ library support
3852
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3857
cygwin* | mingw* | pw32*)
3858
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3859
# as there is no search path for DLLs.
3860
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3861
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3862
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3863
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3865
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3866
_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'
3867
# If the export-symbols file already is a .def file (1st line
3868
# is EXPORTS), use it as is; otherwise, prepend...
3869
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3870
cp $export_symbols $output_objdir/$soname.def;
3872
echo EXPORTS > $output_objdir/$soname.def;
3873
cat $export_symbols >> $output_objdir/$soname.def;
3875
$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'
3877
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3881
darwin* | rhapsody*)
3882
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3883
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3885
rhapsody* | darwin1.[[012]])
3886
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3889
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3892
lt_int_apple_cc_single_mod=no
3893
output_verbose_link_cmd='echo'
3894
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3895
lt_int_apple_cc_single_mod=yes
3897
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3898
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3900
_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'
3902
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3904
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3905
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3906
_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}'
3908
_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}'
3910
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3911
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3912
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3913
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3914
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3915
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3920
case $cc_basename in
3922
# FIXME: insert proper C++ library support
3923
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3926
# Green Hills C++ Compiler
3927
# FIXME: insert proper C++ library support
3928
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3931
# FIXME: insert proper C++ library support
3932
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3937
# C++ shared libraries reported to be fairly broken before switch to ELF
3938
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3941
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3944
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3946
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3952
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3953
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3954
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3955
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3956
# but as the default
3957
# location of the library.
3959
case $cc_basename in
3961
# FIXME: insert proper C++ library support
3962
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3965
_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'
3966
# Commands to make compiler produce verbose output that lists
3967
# what "hidden" libraries, object files and flags are used when
3968
# linking a shared library.
3970
# There doesn't appear to be a way to prevent this compiler from
3971
# explicitly linking system object files so we need to strip them
3972
# from the output so that they don't get included in the library
3974
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3977
if test "$GXX" = yes; then
3978
_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'
3980
# FIXME: insert proper C++ library support
3981
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3987
if test $with_gnu_ld = no; then
3990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3991
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3992
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3995
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3998
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3999
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4000
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4006
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4007
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4010
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4011
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4012
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4013
# but as the default
4014
# location of the library.
4017
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4018
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4019
# but as the default
4020
# location of the library.
4024
case $cc_basename in
4026
# FIXME: insert proper C++ library support
4027
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4032
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4035
_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'
4038
# Commands to make compiler produce verbose output that lists
4039
# what "hidden" libraries, object files and flags are used when
4040
# linking a shared library.
4042
# There doesn't appear to be a way to prevent this compiler from
4043
# explicitly linking system object files so we need to strip them
4044
# from the output so that they don't get included in the library
4046
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'
4049
if test "$GXX" = yes; then
4050
if test $with_gnu_ld = no; then
4053
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4056
_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'
4061
# FIXME: insert proper C++ library support
4062
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4068
case $cc_basename in
4071
_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'
4073
# Archives containing C++ object files must be created using
4074
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4075
# necessary to make sure instantiated templates are included
4077
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4080
if test "$GXX" = yes; then
4081
if test "$with_gnu_ld" = no; then
4082
_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'
4084
_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'
4087
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4090
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4091
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4094
case $cc_basename in
4096
# Kuck and Associates, Inc. (KAI) C++ Compiler
4098
# KCC will only create a shared library if the output file
4099
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4100
# to its proper name (with version) after linking.
4101
_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'
4102
_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'
4103
# Commands to make compiler produce verbose output that lists
4104
# what "hidden" libraries, object files and flags are used when
4105
# linking a shared library.
4107
# There doesn't appear to be a way to prevent this compiler from
4108
# explicitly linking system object files so we need to strip them
4109
# from the output so that they don't get included in the library
4111
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'
4113
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4114
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4116
# Archives containing C++ object files must be created using
4117
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4118
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4123
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4124
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4125
_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'
4126
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4127
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4128
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4132
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4133
_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'
4135
runpath_var=LD_RUN_PATH
4136
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4137
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4139
# Commands to make compiler produce verbose output that lists
4140
# what "hidden" libraries, object files and flags are used when
4141
# linking a shared library.
4143
# There doesn't appear to be a way to prevent this compiler from
4144
# explicitly linking system object files so we need to strip them
4145
# from the output so that they don't get included in the library
4147
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'
4152
# FIXME: insert proper C++ library support
4153
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4156
# FIXME: insert proper C++ library support
4157
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4160
case $cc_basename in
4162
# FIXME: insert proper C++ library support
4163
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4166
# FIXME: insert proper C++ library support
4167
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4172
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4173
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4175
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4176
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4177
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4179
# Workaround some broken pre-1.5 toolchains
4180
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4183
case $cc_basename in
4185
# Kuck and Associates, Inc. (KAI) C++ Compiler
4187
# KCC will only create a shared library if the output file
4188
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4189
# to its proper name (with version) after linking.
4190
_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'
4192
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4193
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4195
# Archives containing C++ object files must be created using
4196
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4197
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4201
# Rational C++ 2.4.1
4202
# FIXME: insert proper C++ library support
4203
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4206
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4207
_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'
4209
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4210
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4212
# Commands to make compiler produce verbose output that lists
4213
# what "hidden" libraries, object files and flags are used when
4214
# linking a shared library.
4216
# There doesn't appear to be a way to prevent this compiler from
4217
# explicitly linking system object files so we need to strip them
4218
# from the output so that they don't get included in the library
4220
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'
4223
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4224
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4225
_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'
4227
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4228
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4230
# Commands to make compiler produce verbose output that lists
4231
# what "hidden" libraries, object files and flags are used when
4232
# linking a shared library.
4233
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4236
# FIXME: insert proper C++ library support
4237
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4243
case $cc_basename in
4245
# Kuck and Associates, Inc. (KAI) C++ Compiler
4247
# KCC will only create a shared library if the output file
4248
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4249
# to its proper name (with version) after linking.
4250
_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'
4252
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4253
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4255
# Archives containing C++ object files must be created using
4256
# the KAI C++ compiler.
4257
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4260
# Rational C++ 2.4.1
4261
# FIXME: insert proper C++ library support
4262
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4265
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4266
_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'
4267
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4268
echo "-hidden">> $lib.exp~
4269
$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~
4272
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4273
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4275
# Commands to make compiler produce verbose output that lists
4276
# what "hidden" libraries, object files and flags are used when
4277
# linking a shared library.
4279
# There doesn't appear to be a way to prevent this compiler from
4280
# explicitly linking system object files so we need to strip them
4281
# from the output so that they don't get included in the library
4283
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'
4286
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4287
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4288
_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'
4290
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4291
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4293
# Commands to make compiler produce verbose output that lists
4294
# what "hidden" libraries, object files and flags are used when
4295
# linking a shared library.
4296
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4299
# FIXME: insert proper C++ library support
4300
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4306
# FIXME: insert proper C++ library support
4307
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4310
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4311
case $cc_basename in
4313
# FIXME: insert proper C++ library support
4314
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4317
# FIXME: insert proper C++ library support
4318
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4323
case $cc_basename in
4326
# FIXME: insert proper C++ library support
4327
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4331
# FIXME: insert proper C++ library support
4332
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4335
# FIXME: insert proper C++ library support
4336
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4341
case $cc_basename in
4343
# Sun C++ 4.2, 5.x and Centerline C++
4344
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4345
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4346
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4347
$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'
4349
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4350
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4352
solaris2.[0-5] | solaris2.[0-5].*) ;;
4354
# The C++ compiler is used as linker so we must use $wl
4355
# flag to pass the commands to the underlying system
4357
# Supported since Solaris 2.6 (maybe 2.5.1?)
4358
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4361
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4363
# Commands to make compiler produce verbose output that lists
4364
# what "hidden" libraries, object files and flags are used when
4365
# linking a shared library.
4367
# There doesn't appear to be a way to prevent this compiler from
4368
# explicitly linking system object files so we need to strip them
4369
# from the output so that they don't get included in the library
4371
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'
4373
# Archives containing C++ object files must be created using
4374
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4375
# necessary to make sure instantiated templates are included
4377
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4380
# Green Hills C++ Compiler
4381
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4383
# The C++ compiler must be used to create the archive.
4384
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4387
# GNU C++ compiler with Solaris linker
4388
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4389
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4390
if $CC --version | grep -v '^2\.7' > /dev/null; then
4391
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4392
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4393
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4395
# Commands to make compiler produce verbose output that lists
4396
# what "hidden" libraries, object files and flags are used when
4397
# linking a shared library.
4398
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4400
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4402
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4403
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4404
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4406
# Commands to make compiler produce verbose output that lists
4407
# what "hidden" libraries, object files and flags are used when
4408
# linking a shared library.
4409
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4417
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4418
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4421
case $cc_basename in
4423
# NonStop-UX NCC 3.20
4424
# FIXME: insert proper C++ library support
4425
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4428
# FIXME: insert proper C++ library support
4429
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4434
# FIXME: insert proper C++ library support
4435
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4438
# FIXME: insert proper C++ library support
4439
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4442
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4443
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4445
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4446
_LT_AC_TAGVAR(LD, $1)="$LD"
4448
AC_LIBTOOL_POSTDEP_PREDEP($1)
4449
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4450
AC_LIBTOOL_PROG_CC_C_O($1)
4451
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4452
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4453
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4454
AC_LIBTOOL_SYS_LIB_STRIP
4455
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4456
AC_LIBTOOL_DLOPEN_SELF($1)
4458
AC_LIBTOOL_CONFIG($1)
4465
with_gnu_ldcxx=$with_gnu_ld
4466
with_gnu_ld=$lt_save_with_gnu_ld
4467
lt_cv_path_LDCXX=$lt_cv_path_LD
4468
lt_cv_path_LD=$lt_save_path_LD
4469
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4470
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4471
])# AC_LIBTOOL_LANG_CXX_CONFIG
4473
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4474
# ------------------------
4475
# Figure out "hidden" library dependencies from verbose
4476
# compiler output when linking a shared library.
4477
# Parse the compiler output and extract the necessary
4478
# objects, libraries and library flags.
4479
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4480
dnl we can't use the lt_simple_compile_test_code here,
4481
dnl because it contains code intended for an executable,
4482
dnl not a library. It's possible we should let each
4483
dnl tag define a new lt_????_link_test_code variable,
4484
dnl but it's only used here...
4485
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4487
void foo (void) { a = 0; }
4489
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4493
Foo (void) { a = 0; }
4498
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4506
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4509
public void bar (void) {
4515
dnl Parse the compiler output and extract the necessary
4516
dnl objects, libraries and library flags.
4517
if AC_TRY_EVAL(ac_compile); then
4518
# Parse the compiler output and extract the necessary
4519
# objects, libraries and library flags.
4521
# Sentinel used to keep track of whether or not we are before
4522
# the conftest object file.
4523
pre_test_object_deps_done=no
4525
# The `*' in the case matches for architectures that use `case' in
4526
# $output_verbose_cmd can trigger glob expansion during the loop
4527
# eval without this substitution.
4528
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4530
for p in `eval $output_verbose_link_cmd`; do
4534
# Some compilers place space between "-{L,R}" and the path.
4537
|| test $p = "-R"; then
4544
if test "$pre_test_object_deps_done" = no; then
4547
# Internal compiler library paths should come after those
4548
# provided the user. The postdeps already come after the
4549
# user supplied libs so there is no need to process them.
4550
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4551
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4553
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4556
# The "-l" case would never come before the object being
4557
# linked, so don't bother handling this case.
4560
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4561
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4563
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4569
# This assumes that the test object file only shows up
4570
# once in the compiler output.
4571
if test "$p" = "conftest.$objext"; then
4572
pre_test_object_deps_done=yes
4576
if test "$pre_test_object_deps_done" = no; then
4577
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4578
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4580
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4583
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4584
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4586
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4591
*) ;; # Ignore the rest.
4599
echo "libtool.m4: error: problem compiling $1 test program"
4602
$rm -f confest.$objext
4604
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4605
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4607
])# AC_LIBTOOL_POSTDEP_PREDEP
4609
# AC_LIBTOOL_LANG_F77_CONFIG
4610
# ------------------------
4611
# Ensure that the configuration vars for the C compiler are
4612
# suitably defined. Those variables are subsequently used by
4613
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4614
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4615
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4616
[AC_REQUIRE([AC_PROG_F77])
4617
AC_LANG_PUSH(Fortran 77)
4619
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4620
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4621
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4622
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4623
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4624
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4625
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4626
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4627
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4628
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4629
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4630
_LT_AC_TAGVAR(module_cmds, $1)=
4631
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4632
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4633
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4634
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4635
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4636
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4638
# Source file extension for f77 test sources.
4641
# Object file extension for compiled f77 test sources.
4643
_LT_AC_TAGVAR(objext, $1)=$objext
4645
# Code to be used in simple compile tests
4646
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4648
# Code to be used in simple link tests
4649
lt_simple_link_test_code=" program t\n end\n"
4651
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4654
# Allow CC to be a program name with arguments.
4658
_LT_AC_TAGVAR(compiler, $1)=$CC
4659
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4661
AC_MSG_CHECKING([if libtool supports shared libraries])
4662
AC_MSG_RESULT([$can_build_shared])
4664
AC_MSG_CHECKING([whether to build shared libraries])
4665
test "$can_build_shared" = "no" && enable_shared=no
4667
# On AIX, shared libraries and static libraries use the same namespace, and
4668
# are all built from PIC.
4671
test "$enable_shared" = yes && enable_static=no
4672
if test -n "$RANLIB"; then
4673
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4674
postinstall_cmds='$RANLIB $lib'
4678
test "$enable_shared" = yes && enable_static=no
4681
AC_MSG_RESULT([$enable_shared])
4683
AC_MSG_CHECKING([whether to build static libraries])
4684
# Make sure either enable_shared or enable_static is yes.
4685
test "$enable_shared" = yes || enable_static=yes
4686
AC_MSG_RESULT([$enable_static])
4688
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4690
_LT_AC_TAGVAR(GCC, $1)="$G77"
4691
_LT_AC_TAGVAR(LD, $1)="$LD"
4693
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4694
AC_LIBTOOL_PROG_CC_C_O($1)
4695
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4696
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4697
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4698
AC_LIBTOOL_SYS_LIB_STRIP
4699
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4701
AC_LIBTOOL_CONFIG($1)
4705
])# AC_LIBTOOL_LANG_F77_CONFIG
4708
# AC_LIBTOOL_LANG_GCJ_CONFIG
4709
# --------------------------
4710
# Ensure that the configuration vars for the C compiler are
4711
# suitably defined. Those variables are subsequently used by
4712
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4713
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4714
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4717
# Source file extension for Java test sources.
4720
# Object file extension for compiled Java test sources.
4722
_LT_AC_TAGVAR(objext, $1)=$objext
4724
# Code to be used in simple compile tests
4725
lt_simple_compile_test_code="class foo {}\n"
4727
# Code to be used in simple link tests
4728
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4730
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4733
# Allow CC to be a program name with arguments.
4737
_LT_AC_TAGVAR(compiler, $1)=$CC
4739
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4740
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4742
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4743
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4744
AC_LIBTOOL_PROG_CC_C_O($1)
4745
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4746
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4747
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4748
AC_LIBTOOL_SYS_LIB_STRIP
4749
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4750
AC_LIBTOOL_DLOPEN_SELF($1)
4752
AC_LIBTOOL_CONFIG($1)
4756
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4759
# AC_LIBTOOL_LANG_RC_CONFIG
4760
# --------------------------
4761
# Ensure that the configuration vars for the Windows resource compiler are
4762
# suitably defined. Those variables are subsequently used by
4763
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4764
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4765
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4768
# Source file extension for RC test sources.
4771
# Object file extension for compiled RC test sources.
4773
_LT_AC_TAGVAR(objext, $1)=$objext
4775
# Code to be used in simple compile tests
4776
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4778
# Code to be used in simple link tests
4779
lt_simple_link_test_code="$lt_simple_compile_test_code"
4781
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4784
# Allow CC to be a program name with arguments.
4788
_LT_AC_TAGVAR(compiler, $1)=$CC
4789
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4791
AC_LIBTOOL_CONFIG($1)
4795
])# AC_LIBTOOL_LANG_RC_CONFIG
4798
# AC_LIBTOOL_CONFIG([TAGNAME])
4799
# ----------------------------
4800
# If TAGNAME is not passed, then create an initial libtool script
4801
# with a default configuration from the untagged config vars. Otherwise
4802
# add code to config.status for appending the configuration named by
4803
# TAGNAME from the matching tagged config vars.
4804
AC_DEFUN([AC_LIBTOOL_CONFIG],
4805
[# The else clause should only fire when bootstrapping the
4806
# libtool distribution, otherwise you forgot to ship ltmain.sh
4807
# with your package, and you will get complaints that there are
4808
# no rules to generate ltmain.sh.
4809
if test -f "$ltmain"; then
4810
# See if we are running on zsh, and set the options which allow our commands through
4811
# without removal of \ escapes.
4812
if test -n "${ZSH_VERSION+set}" ; then
4813
setopt NO_GLOB_SUBST
4815
# Now quote all the things that may contain metacharacters while being
4816
# careful not to overquote the AC_SUBSTed values. We take copies of the
4817
# variables and quote the copies for generation of the libtool script.
4818
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4819
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4820
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4821
deplibs_check_method reload_flag reload_cmds need_locks \
4822
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4823
lt_cv_sys_global_symbol_to_c_name_address \
4824
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4825
old_postinstall_cmds old_postuninstall_cmds \
4826
_LT_AC_TAGVAR(compiler, $1) \
4827
_LT_AC_TAGVAR(CC, $1) \
4828
_LT_AC_TAGVAR(LD, $1) \
4829
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4830
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4831
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4832
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4833
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4834
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4835
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4836
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4837
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4838
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4839
_LT_AC_TAGVAR(predep_objects, $1) \
4840
_LT_AC_TAGVAR(postdep_objects, $1) \
4841
_LT_AC_TAGVAR(predeps, $1) \
4842
_LT_AC_TAGVAR(postdeps, $1) \
4843
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4844
_LT_AC_TAGVAR(archive_cmds, $1) \
4845
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4846
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4847
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4848
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4849
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4850
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4851
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4852
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4853
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4854
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4855
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4856
_LT_AC_TAGVAR(module_cmds, $1) \
4857
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4858
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4859
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4860
_LT_AC_TAGVAR(include_expsyms, $1); do
4863
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4864
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4865
_LT_AC_TAGVAR(archive_cmds, $1) | \
4866
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4867
_LT_AC_TAGVAR(module_cmds, $1) | \
4868
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4869
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4870
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4871
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4872
postinstall_cmds | postuninstall_cmds | \
4873
old_postinstall_cmds | old_postuninstall_cmds | \
4874
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4875
# Double-quote double-evaled strings.
4876
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4879
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4885
*'\[$]0 --fallback-echo"')
4886
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4891
[cfgfile="${ofile}T"
4892
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4894
AC_MSG_NOTICE([creating $ofile])],
4897
cat <<__EOF__ >> "$cfgfile"
4901
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4902
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4903
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4905
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4906
# Free Software Foundation, Inc.
4908
# This file is part of GNU Libtool:
4909
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4911
# This program is free software; you can redistribute it and/or modify
4912
# it under the terms of the GNU General Public License as published by
4913
# the Free Software Foundation; either version 2 of the License, or
4914
# (at your option) any later version.
4916
# This program is distributed in the hope that it will be useful, but
4917
# WITHOUT ANY WARRANTY; without even the implied warranty of
4918
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4919
# General Public License for more details.
4921
# You should have received a copy of the GNU General Public License
4922
# along with this program; if not, write to the Free Software
4923
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4925
# As a special exception to the GNU General Public License, if you
4926
# distribute this file as part of a program that contains a
4927
# configuration script generated by Autoconf, you may include it under
4928
# the same distribution terms that you use for the rest of that program.
4930
# A sed program that does not truncate output.
4933
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4934
Xsed="$SED -e s/^X//"
4936
# The HP-UX ksh and POSIX shell print the target directory to stdout
4938
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4940
# The names of the tagged configurations supported by this script.
4943
# ### BEGIN LIBTOOL CONFIG],
4944
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4946
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4948
# Shell to use when invoking shell scripts.
4951
# Whether or not to build shared libraries.
4952
build_libtool_libs=$enable_shared
4954
# Whether or not to build static libraries.
4955
build_old_libs=$enable_static
4957
# Whether or not to add -lc for building shared libraries.
4958
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4960
# Whether or not to disallow shared libs when runtime libs are static
4961
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4963
# Whether or not to optimize for fast installation.
4964
fast_install=$enable_fast_install
4967
host_alias=$host_alias
4970
# An echo program that does not interpret backslashes.
4975
AR_FLAGS=$lt_AR_FLAGS
4980
# A language-specific compiler.
4981
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4983
# Is the compiler the GNU C compiler?
4984
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4989
# The linker used to build libraries.
4990
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4992
# Whether we need hard or soft links.
4995
# A BSD-compatible nm program.
4998
# A symbol stripping program
5001
# Used to examine libraries when file_magic_cmd begins "file"
5002
MAGIC_CMD=$MAGIC_CMD
5004
# Used on cygwin: DLL creation program.
5007
# Used on cygwin: object dumper.
5010
# Used on cygwin: assembler.
5013
# The name of the directory that contains temporary libtool files.
5016
# How to create reloadable object files.
5017
reload_flag=$lt_reload_flag
5018
reload_cmds=$lt_reload_cmds
5020
# How to pass a linker flag through the compiler.
5021
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5023
# Object file suffix (normally "o").
5026
# Old archive suffix (normally "a").
5029
# Shared library suffix (normally ".so").
5032
# Executable file suffix (normally "").
5035
# Additional compiler flags for building library objects.
5036
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5039
# What is the maximum length of a command?
5040
max_cmd_len=$lt_cv_sys_max_cmd_len
5042
# Does compiler simultaneously support -c and -o options?
5043
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5045
# Must we lock files when doing compilation ?
5046
need_locks=$lt_need_locks
5048
# Do we need the lib prefix for modules?
5049
need_lib_prefix=$need_lib_prefix
5051
# Do we need a version for libraries?
5052
need_version=$need_version
5054
# Whether dlopen is supported.
5055
dlopen_support=$enable_dlopen
5057
# Whether dlopen of programs is supported.
5058
dlopen_self=$enable_dlopen_self
5060
# Whether dlopen of statically linked programs is supported.
5061
dlopen_self_static=$enable_dlopen_self_static
5063
# Compiler flag to prevent dynamic linking.
5064
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5066
# Compiler flag to turn off builtin functions.
5067
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5069
# Compiler flag to allow reflexive dlopens.
5070
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5072
# Compiler flag to generate shared objects directly from archives.
5073
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5075
# Compiler flag to generate thread-safe objects.
5076
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5078
# Library versioning type.
5079
version_type=$version_type
5081
# Format of library name prefix.
5082
libname_spec=$lt_libname_spec
5084
# List of archive names. First name is the real one, the rest are links.
5085
# The last name is the one that the linker finds with -lNAME.
5086
library_names_spec=$lt_library_names_spec
5088
# The coded name of the library, if different from the real name.
5089
soname_spec=$lt_soname_spec
5091
# Commands used to build and install an old-style archive.
5093
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5094
old_postinstall_cmds=$lt_old_postinstall_cmds
5095
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5097
# Create an old-style archive from a shared archive.
5098
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5100
# Create a temporary old-style archive to link instead of a shared archive.
5101
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5103
# Commands used to build and install a shared archive.
5104
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5105
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5106
postinstall_cmds=$lt_postinstall_cmds
5107
postuninstall_cmds=$lt_postuninstall_cmds
5109
# Commands used to build a loadable module (assumed same as above if empty)
5110
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5111
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5113
# Commands to strip libraries.
5114
old_striplib=$lt_old_striplib
5115
striplib=$lt_striplib
5117
# Dependencies to place before the objects being linked to create a
5119
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5121
# Dependencies to place after the objects being linked to create a
5123
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5125
# Dependencies to place before the objects being linked to create a
5127
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5129
# Dependencies to place after the objects being linked to create a
5131
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5133
# The library search path used internally by the compiler when linking
5135
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5137
# Method to check whether dependent libraries are shared objects.
5138
deplibs_check_method=$lt_deplibs_check_method
5140
# Command to use when deplibs_check_method == file_magic.
5141
file_magic_cmd=$lt_file_magic_cmd
5143
# Flag that allows shared libraries with undefined symbols to be built.
5144
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5146
# Flag that forces no undefined symbols.
5147
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5149
# Commands used to finish a libtool library installation in a directory.
5150
finish_cmds=$lt_finish_cmds
5152
# Same as above, but a single script fragment to be evaled but not shown.
5153
finish_eval=$lt_finish_eval
5155
# Take the output of nm and produce a listing of raw symbols and C names.
5156
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5158
# Transform the output of nm in a proper C declaration
5159
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5161
# Transform the output of nm in a C name address pair
5162
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5164
# This is the shared library runtime path variable.
5165
runpath_var=$runpath_var
5167
# This is the shared library path variable.
5168
shlibpath_var=$shlibpath_var
5170
# Is shlibpath searched before the hard-coded library search path?
5171
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5173
# How to hardcode a shared library path into an executable.
5174
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5176
# Whether we should hardcode library paths into libraries.
5177
hardcode_into_libs=$hardcode_into_libs
5179
# Flag to hardcode \$libdir into a binary during linking.
5180
# This must work even if \$libdir does not exist.
5181
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5183
# If ld is used when linking, flag to hardcode \$libdir into
5184
# a binary during linking. This must work even if \$libdir does
5186
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5188
# Whether we need a single -rpath flag with a separated argument.
5189
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5191
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5193
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5195
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5197
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5199
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5200
# the resulting binary.
5201
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5203
# Set to yes if building a shared library automatically hardcodes DIR into the library
5204
# and all subsequent libraries and executables linked against it.
5205
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5207
# Variables whose values should be saved in libtool wrapper scripts and
5208
# restored at relink time.
5209
variables_saved_for_relink="$variables_saved_for_relink"
5211
# Whether libtool must link a program against all its dependency libraries.
5212
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5214
# Compile-time system search path for libraries
5215
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5217
# Run-time system search path for libraries
5218
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5220
# Fix the shell variable \$srcfile for the compiler.
5221
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5223
# Set to yes if exported symbols are required.
5224
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5226
# The commands to list exported symbols.
5227
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5229
# The commands to extract the exported symbol list from a shared archive.
5230
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5232
# Symbols that should not be listed in the preloaded symbols.
5233
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5235
# Symbols that must always be exported.
5236
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5239
[# ### END LIBTOOL CONFIG],
5240
[# ### END LIBTOOL TAG CONFIG: $tagname])
5247
cat <<\EOF >> "$cfgfile"
5249
# AIX sometimes has problems with the GCC collect2 program. For some
5250
# reason, if we set the COLLECT_NAMES environment variable, the problems
5251
# vanish in a puff of smoke.
5252
if test "X${COLLECT_NAMES+set}" != Xset; then
5254
export COLLECT_NAMES
5260
# We use sed instead of cat because bash on DJGPP gets confused if
5261
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5262
# text mode, it properly converts lines to CR/LF. This bash problem
5263
# is reportedly fixed, but why not run on old versions too?
5264
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5266
mv -f "$cfgfile" "$ofile" || \
5267
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5271
# If there is no Makefile yet, we rely on a make rule to execute
5272
# `config.status --recheck' to rerun these tests and create the
5273
# libtool script then.
5274
test -f Makefile && make "$ltmain"
5276
])# AC_LIBTOOL_CONFIG
5279
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5280
# -------------------------------------------
5281
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5282
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5284
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5286
if test "$GCC" = yes; then
5287
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5289
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5290
lt_cv_prog_compiler_rtti_exceptions,
5291
[-fno-rtti -fno-exceptions], [],
5292
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5294
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5297
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5298
# ---------------------------------
5299
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5300
[AC_REQUIRE([AC_CANONICAL_HOST])
5301
AC_REQUIRE([AC_PROG_NM])
5302
AC_REQUIRE([AC_OBJEXT])
5303
# Check for command to grab the raw symbol name followed by C symbol from nm.
5304
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5305
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5307
# These are sane defaults that work on at least a few old systems.
5308
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5310
# Character class describing NM global symbol codes.
5311
symcode='[[BCDEGRST]]'
5313
# Regexp to match symbols that can be accessed directly from C.
5314
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5316
# Transform the above into a raw symbol and a C symbol.
5317
symxfrm='\1 \2\3 \3'
5319
# Transform an extracted symbol line into a proper C declaration
5320
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5322
# Transform an extracted symbol line into symbol name and symbol address
5323
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'"
5325
# Define system-specific variables.
5330
cygwin* | mingw* | pw32*)
5331
symcode='[[ABCDGISTW]]'
5333
hpux*) # Its linker distinguishes data from code symbols
5334
if test "$host_cpu" = ia64; then
5335
symcode='[[ABCDEGRST]]'
5337
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5338
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'"
5341
symcode='[[BCDEGRST]]'
5344
symcode='[[BCDEGQRST]]'
5350
symcode='[[DFNSTU]]'
5354
# Handle CRLF in mingw tool chain
5358
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5362
# If we're using GNU nm, then use its standard symbol codes.
5363
case `$NM -V 2>&1` in
5364
*GNU* | *'with BFD'*)
5365
symcode='[[ABCDGIRSTW]]' ;;
5368
# Try without a prefix undercore, then with it.
5369
for ac_symprfx in "" "_"; do
5371
# Write the raw and C identifiers.
5372
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5374
# Check to see that the pipe works correctly.
5378
cat > conftest.$ac_ext <<EOF
5383
void nm_test_func(){}
5387
int main(){nm_test_var='a';nm_test_func();return(0);}
5390
if AC_TRY_EVAL(ac_compile); then
5391
# Now try to grab the symbols.
5393
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5394
# Try sorting and uniquifying the output.
5395
if sort "$nlist" | uniq > "$nlist"T; then
5396
mv -f "$nlist"T "$nlist"
5401
# Make sure that we snagged all the symbols we need.
5402
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5403
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5404
cat <<EOF > conftest.$ac_ext
5410
# Now generate the symbol file.
5411
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5413
cat <<EOF >> conftest.$ac_ext
5414
#if defined (__STDC__) && __STDC__
5415
# define lt_ptr_t void *
5417
# define lt_ptr_t char *
5421
/* The mapping between symbol names and symbols. */
5426
lt_preloaded_symbols[[]] =
5429
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5430
cat <<\EOF >> conftest.$ac_ext
5438
# Now try linking the two files.
5439
mv conftest.$ac_objext conftstm.$ac_objext
5440
lt_save_LIBS="$LIBS"
5441
lt_save_CFLAGS="$CFLAGS"
5442
LIBS="conftstm.$ac_objext"
5443
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5444
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5447
LIBS="$lt_save_LIBS"
5448
CFLAGS="$lt_save_CFLAGS"
5450
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5453
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5456
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5459
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5460
cat conftest.$ac_ext >&5
5462
rm -f conftest* conftst*
5464
# Do not use the global_symbol_pipe unless it works.
5465
if test "$pipe_works" = yes; then
5468
lt_cv_sys_global_symbol_pipe=
5472
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5473
lt_cv_sys_global_symbol_to_cdecl=
5475
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5476
AC_MSG_RESULT(failed)
5480
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5483
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5484
# ---------------------------------------
5485
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5486
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5487
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5488
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5490
AC_MSG_CHECKING([for $compiler option to produce PIC])
5492
# C++ specific cases for pic, static, wl, etc.
5493
if test "$GXX" = yes; then
5494
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5495
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5499
# All AIX code is PIC.
5500
if test "$host_cpu" = ia64; then
5501
# AIX 5 now supports IA64 processor
5502
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5506
# FIXME: we need at least 68020 code to build shared libraries, but
5507
# adding the `-m68020' flag to GCC prevents building anything better,
5509
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5511
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5512
# PIC is the default for these OSes.
5514
mingw* | os2* | pw32*)
5515
# This hack is so that the source file can tell whether it is being
5516
# built for inclusion in a dll (and should export symbols for example).
5517
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5519
darwin* | rhapsody*)
5520
# PIC is the default on this platform
5521
# Common symbols not allowed in MH_DYLIB files
5522
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5525
# DJGPP does not support shared libraries at all
5526
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5529
if test -d /usr/nec; then
5530
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5534
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5540
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5545
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5551
# All AIX code is PIC.
5552
if test "$host_cpu" = ia64; then
5553
# AIX 5 now supports IA64 processor
5554
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5556
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5560
case $cc_basename in
5562
# Green Hills C++ Compiler
5563
# _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"
5568
case $cc_basename in
5570
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5573
# Green Hills C++ Compiler
5574
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5581
# FreeBSD uses GNU C++
5583
hpux9* | hpux10* | hpux11*)
5584
case $cc_basename in
5586
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5587
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5588
if test "$host_cpu" != ia64; then
5589
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5593
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5594
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5600
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5608
irix5* | irix6* | nonstopux*)
5609
case $cc_basename in
5611
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5612
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5613
# CC pic flag -KPIC is the default.
5620
case $cc_basename in
5623
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5624
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5628
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5629
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5630
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5634
# Make sure the PIC flag is empty. It appears that all Alpha
5635
# Linux and Compaq Tru64 Unix objects are PIC.
5636
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5637
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5648
case $cc_basename in
5650
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5658
osf3* | osf4* | osf5*)
5659
case $cc_basename in
5661
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5664
# Rational C++ 2.4.1
5665
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5668
# Digital/Compaq C++
5669
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5670
# Make sure the PIC flag is empty. It appears that all Alpha
5671
# Linux and Compaq Tru64 Unix objects are PIC.
5672
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5673
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5682
case $cc_basename in
5684
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5691
case $cc_basename in
5693
# Sun C++ 4.2, 5.x and Centerline C++
5694
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5695
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5696
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5699
# Green Hills C++ Compiler
5700
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5707
case $cc_basename in
5710
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5711
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5715
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5722
case $cc_basename in
5724
# NonStop-UX NCC 3.20
5725
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5736
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5742
if test "$GCC" = yes; then
5743
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5744
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5748
# All AIX code is PIC.
5749
if test "$host_cpu" = ia64; then
5750
# AIX 5 now supports IA64 processor
5751
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5756
# FIXME: we need at least 68020 code to build shared libraries, but
5757
# adding the `-m68020' flag to GCC prevents building anything better,
5759
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5762
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5763
# PIC is the default for these OSes.
5766
mingw* | pw32* | os2*)
5767
# This hack is so that the source file can tell whether it is being
5768
# built for inclusion in a dll (and should export symbols for example).
5769
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5772
darwin* | rhapsody*)
5773
# PIC is the default on this platform
5774
# Common symbols not allowed in MH_DYLIB files
5775
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5779
# Just because we use GCC doesn't mean we suddenly get shared libraries
5780
# on systems that don't support them.
5781
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5786
if test -d /usr/nec; then
5787
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5792
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5799
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5805
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5809
# PORTME Check for flag to pass linker flags through the system compiler.
5812
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5813
if test "$host_cpu" = ia64; then
5814
# AIX 5 now supports IA64 processor
5815
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5817
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5821
mingw* | pw32* | os2*)
5822
# This hack is so that the source file can tell whether it is being
5823
# built for inclusion in a dll (and should export symbols for example).
5824
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5827
hpux9* | hpux10* | hpux11*)
5828
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5829
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5836
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5839
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5840
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5843
irix5* | irix6* | nonstopux*)
5844
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5845
# PIC (with -KPIC) is the default.
5846
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5850
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5851
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5857
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5858
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5859
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5862
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5863
# All Alpha code is PIC.
5864
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5869
osf3* | osf4* | osf5*)
5870
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5871
# All OSF/1 code is PIC.
5872
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5876
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5877
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5881
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5882
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5883
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5887
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5888
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5889
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5892
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5893
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5894
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5895
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5899
if test -d /usr/nec ;then
5900
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5901
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5906
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5907
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5911
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5916
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5919
# Check to make sure the PIC flag actually works.
5921
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5922
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5923
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5924
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5925
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5927
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5929
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5930
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5933
# For platforms which do not support PIC, -DPIC is meaningless:
5935
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5938
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5944
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5945
# ------------------------------------
5946
# See if the linker supports building shared libraries.
5947
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5948
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5950
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5953
# If we're using GNU nm, then we don't want the "-C" option.
5954
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5955
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5956
_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'
5958
_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'
5962
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5965
_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'
5968
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5973
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5974
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5975
_LT_AC_TAGVAR(archive_cmds, $1)=
5976
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5977
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5978
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5979
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5980
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5981
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5982
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5983
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5984
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5985
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5986
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5987
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5988
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5989
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5990
_LT_AC_TAGVAR(module_cmds, $1)=
5991
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5992
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5993
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5994
# include_expsyms should be a list of space-separated symbols to be *always*
5995
# included in the symbol list
5996
_LT_AC_TAGVAR(include_expsyms, $1)=
5997
# exclude_expsyms can be an extended regexp of symbols to exclude
5998
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5999
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6000
# as well as any symbol that contains `d'.
6001
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6002
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6003
# platforms (ab)use it in PIC code, but their linkers get confused if
6004
# the symbol is explicitly referenced. Since portable code cannot
6005
# rely on this symbol name, it's probably fine to never include it in
6006
# preloaded symbol tables.
6007
extract_expsyms_cmds=
6010
cygwin* | mingw* | pw32*)
6011
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6012
# When not using gcc, we currently assume that we are using
6013
# Microsoft Visual C++.
6014
if test "$GCC" != yes; then
6023
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6024
if test "$with_gnu_ld" = yes; then
6025
# If archive_cmds runs LD, not CC, wlarc should be empty
6028
# See if GNU ld supports shared libraries.
6030
aix3* | aix4* | aix5*)
6031
# On AIX/PPC, the GNU linker is very broken
6032
if test "$host_cpu" != ia64; then
6033
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6036
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6037
*** to be unable to reliably create shared libraries on AIX.
6038
*** Therefore, libtool is disabling shared libraries support. If you
6039
*** really care for shared libraries, you may want to modify your PATH
6040
*** so that a non-GNU linker is found, and then restart.
6047
_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)'
6048
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6049
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6051
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6052
# that the semantics of dynamic libraries on AmigaOS, at least up
6053
# to version 4, is to share data among multiple programs linked
6054
# with the same dynamic library. Since this doesn't match the
6055
# behavior of shared libraries on other platforms, we can't use
6057
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6061
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6062
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6063
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6064
# support --undefined. This deserves some investigation. FIXME
6065
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6067
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6071
cygwin* | mingw* | pw32*)
6072
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6073
# as there is no search path for DLLs.
6074
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6075
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6076
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6077
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6078
_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'
6080
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6081
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6082
# If the export-symbols file already is a .def file (1st line
6083
# is EXPORTS), use it as is; otherwise, prepend...
6084
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6085
cp $export_symbols $output_objdir/$soname.def;
6087
echo EXPORTS > $output_objdir/$soname.def;
6088
cat $export_symbols >> $output_objdir/$soname.def;
6090
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6097
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6098
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6101
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6102
_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'
6107
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6108
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6111
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6112
*** create shared libraries on Solaris systems. Therefore, libtool
6113
*** is disabling shared libraries support. We urge you to upgrade GNU
6114
*** binutils to release 2.9.1 or newer. Another option is to modify
6115
*** your PATH or compiler configuration so that the native linker is
6116
*** used, and then restart.
6119
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6120
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6121
_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'
6123
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6128
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6130
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6131
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6135
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6136
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6137
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6138
supports_anon_versioning=no
6139
case `$LD -v 2>/dev/null` in
6140
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6141
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6142
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6143
*\ 2.11.*) ;; # other 2.11 versions
6144
*) supports_anon_versioning=yes ;;
6146
if test $supports_anon_versioning = yes; then
6147
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6148
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6149
$echo "local: *; };" >> $output_objdir/$libname.ver~
6150
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6152
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6155
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6160
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6161
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6162
_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'
6164
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6169
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6170
runpath_var=LD_RUN_PATH
6171
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6172
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6173
# ancient GNU ld didn't support --whole-archive et. al.
6174
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6175
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6177
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6181
# PORTME fill in a description of your system's linker (not GNU ld)
6184
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6185
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6186
_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'
6187
# Note: this linker hardcodes the directories in LIBPATH if there
6188
# are no directories specified by -L.
6189
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6190
if test "$GCC" = yes && test -z "$link_static_flag"; then
6191
# Neither direct hardcoding nor static linking is supported with a
6193
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6198
if test "$host_cpu" = ia64; then
6199
# On IA64, the linker does run time linking by default, so we don't
6200
# have to do anything special.
6201
aix_use_runtimelinking=no
6202
exp_sym_flag='-Bexport'
6205
# If we're using GNU nm, then we don't want the "-C" option.
6206
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6207
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6208
_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'
6210
_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'
6212
aix_use_runtimelinking=no
6214
# Test if we are trying to use run time linking or normal
6215
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6216
# need to do runtime linking.
6217
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6218
for ld_flag in $LDFLAGS; do
6219
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6220
aix_use_runtimelinking=yes
6226
exp_sym_flag='-bexport'
6227
no_entry_flag='-bnoentry'
6230
# When large executables or shared objects are built, AIX ld can
6231
# have problems creating the table of contents. If linking a library
6232
# or program results in "error TOC overflow" add -mminimal-toc to
6233
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6234
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6236
_LT_AC_TAGVAR(archive_cmds, $1)=''
6237
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6238
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6239
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6241
if test "$GCC" = yes; then
6242
case $host_os in aix4.[012]|aix4.[012].*)
6243
# We only want to do this on AIX 4.2 and lower, the check
6244
# below for broken collect2 doesn't work under 4.3+
6245
collect2name=`${CC} -print-prog-name=collect2`
6246
if test -f "$collect2name" && \
6247
strings "$collect2name" | grep resolve_lib_name >/dev/null
6249
# We have reworked collect2
6250
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6252
# We have old collect2
6253
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6254
# It fails to find uninstalled libraries when the uninstalled
6255
# path is not listed in the libpath. Setting hardcode_minus_L
6256
# to unsupported forces relinking
6257
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6258
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6259
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6262
shared_flag='-shared'
6265
if test "$host_cpu" = ia64; then
6266
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6267
# chokes on -Wl,-G. The following line is correct:
6270
if test "$aix_use_runtimelinking" = yes; then
6271
shared_flag='${wl}-G'
6273
shared_flag='${wl}-bM:SRE'
6278
# It seems that -bexpall does not export symbols beginning with
6279
# underscore (_), so it is better to generate a list of symbols to export.
6280
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6281
if test "$aix_use_runtimelinking" = yes; then
6282
# Warning - without using the other runtime loading flags (-brtl),
6283
# -berok will link without error, but may produce a broken library.
6284
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6285
# Determine the default libpath from the value encoded in an empty executable.
6286
_LT_AC_SYS_LIBPATH_AIX
6287
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6288
_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"
6290
if test "$host_cpu" = ia64; then
6291
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6292
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6293
_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"
6295
# Determine the default libpath from the value encoded in an empty executable.
6296
_LT_AC_SYS_LIBPATH_AIX
6297
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6298
# Warning - without using the other run time loading flags,
6299
# -berok will link without error, but may produce a broken library.
6300
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6301
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6302
# -bexpall does not export symbols beginning with underscore (_)
6303
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6304
# Exported symbols can be pulled into shared objects from archives
6305
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6306
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6307
# This is similar to how AIX traditionally builds it's shared libraries.
6308
_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'
6314
_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)'
6315
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6316
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6317
# see comment about different semantics on the GNU ld section
6318
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6322
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6325
cygwin* | mingw* | pw32*)
6326
# When not using gcc, we currently assume that we are using
6327
# Microsoft Visual C++.
6328
# hardcode_libdir_flag_spec is actually meaningless, as there is
6329
# no search path for DLLs.
6330
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6331
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6332
# Tell ltmain to make .lib files, not .a files.
6334
# Tell ltmain to make .dll files, not .so files.
6336
# FIXME: Setting linknames here is a bad hack.
6337
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6338
# The linker will automatically build a .lib file if we build a DLL.
6339
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6340
# FIXME: Should let the user specify the lib program.
6341
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6342
fix_srcfile_path='`cygpath -w "$srcfile"`'
6343
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6346
darwin* | rhapsody*)
6347
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
6348
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6350
rhapsody* | darwin1.[[012]])
6351
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6354
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6357
# FIXME: Relying on posixy $() will cause problems for
6358
# cross-compilation, but unfortunately the echo tests do not
6359
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
6360
# `"' quotes if we put them in here... so don't!
6361
lt_int_apple_cc_single_mod=no
6362
output_verbose_link_cmd='echo'
6363
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6364
lt_int_apple_cc_single_mod=yes
6366
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6367
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6369
_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'
6371
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
6372
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6373
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6374
_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}'
6376
_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}'
6378
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6379
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6380
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6381
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6382
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6383
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6388
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6389
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6390
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6394
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6397
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6398
# support. Future versions do this automatically, but an explicit c++rt0.o
6399
# does not break anything, and helps significantly (at the cost of a little
6402
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6403
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6404
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6405
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6408
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6410
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6411
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6412
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6413
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6416
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6418
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6419
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6420
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6421
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6425
if test "$GCC" = yes; then
6426
_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'
6428
_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'
6430
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6431
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6432
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6434
# hardcode_minus_L: Not really in the search PATH,
6435
# but as the default location of the library.
6436
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6437
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6441
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6444
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6447
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6453
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6456
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6460
if test "$with_gnu_ld" = no; then
6463
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6464
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6465
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6466
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6467
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6470
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6471
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6472
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6474
# hardcode_minus_L: Not really in the search PATH,
6475
# but as the default location of the library.
6476
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6479
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6480
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6481
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6482
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6484
# hardcode_minus_L: Not really in the search PATH,
6485
# but as the default location of the library.
6486
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6492
irix5* | irix6* | nonstopux*)
6493
if test "$GCC" = yes; then
6494
_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'
6496
_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'
6497
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6499
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6500
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6501
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6505
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6506
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6508
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6510
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6511
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6512
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6516
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6517
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6518
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6519
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6520
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6524
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6525
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6526
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6527
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6528
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6529
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6532
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6533
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6534
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6537
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6538
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6545
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6546
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6547
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6548
_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'
6549
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6553
if test "$GCC" = yes; then
6554
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6555
_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'
6557
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6558
_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'
6560
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6561
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6564
osf4* | osf5*) # as osf3* with the addition of -msym flag
6565
if test "$GCC" = yes; then
6566
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6567
_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'
6568
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6570
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6571
_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'
6572
_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~
6573
$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'
6575
# Both c and cxx compiler support -rpath directly
6576
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6578
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6582
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6583
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6584
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6585
runpath_var=LD_RUN_PATH
6586
hardcode_runpath_var=yes
6590
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6591
if test "$GCC" = yes; then
6592
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6593
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6594
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6596
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6597
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6598
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6600
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6601
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6603
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6604
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
6605
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6607
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6611
if test "x$host_vendor" = xsequent; then
6612
# Use $CC to link under sequent, because it throws in some extra .o
6613
# files that make .init and .fini sections work.
6614
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6616
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6618
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6619
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6620
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6621
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6625
case $host_vendor in
6627
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6628
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6631
## LD is ld it makes a PLAMLIB
6632
## CC just makes a GrossModule.
6633
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6634
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6635
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6638
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6639
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6642
runpath_var='LD_RUN_PATH'
6643
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6647
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6648
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6649
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6653
if test -d /usr/nec; then
6654
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6655
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6656
runpath_var=LD_RUN_PATH
6657
hardcode_runpath_var=yes
6658
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6663
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6664
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6665
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6666
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6667
hardcode_runpath_var=yes
6668
runpath_var=LD_RUN_PATH
6671
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6672
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6673
if test "$GCC" = yes; then
6674
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6676
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6678
runpath_var='LD_RUN_PATH'
6679
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6683
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6684
# $CC -shared without GNU ld will not create a library from C++
6685
# object files and a static libstdc++, better avoid it by now
6686
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6687
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6688
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6689
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6690
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6691
runpath_var='LD_RUN_PATH'
6695
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6696
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6697
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6701
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6706
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6707
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6709
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6710
if test "$GCC" = yes; then
6711
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6715
# Do we need to explicitly link libc?
6717
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6719
# Assume -lc should be added
6720
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6722
if test "$enable_shared" = yes && test "$GCC" = yes; then
6723
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6725
# FIXME: we may have to deal with multi-command sequences.
6728
# Test whether the compiler implicitly links with -lc since on some
6729
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6730
# to ld, don't add -lc before -lgcc.
6731
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6733
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6735
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6738
libobjs=conftest.$ac_objext
6740
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6746
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6747
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6748
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6750
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6752
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6754
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6756
cat conftest.err 1>&5
6759
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6765
])# AC_LIBTOOL_PROG_LD_SHLIBS
6768
# _LT_AC_FILE_LTDLL_C
6769
# -------------------
6770
# Be careful that the start marker always follows a newline.
6771
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6772
# /* ltdll.c starts here */
6773
# #define WIN32_LEAN_AND_MEAN
6774
# #include <windows.h>
6775
# #undef WIN32_LEAN_AND_MEAN
6776
# #include <stdio.h>
6778
# #ifndef __CYGWIN__
6779
# # ifdef __CYGWIN32__
6780
# # define __CYGWIN__ __CYGWIN32__
6784
# #ifdef __cplusplus
6787
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6788
# #ifdef __cplusplus
6793
# #include <cygwin/cygwin_dll.h>
6794
# DECLARE_CYGWIN_DLL( DllMain );
6796
# HINSTANCE __hDllInstance_base;
6799
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6801
# __hDllInstance_base = hInst;
6804
# /* ltdll.c ends here */
6805
])# _LT_AC_FILE_LTDLL_C
6808
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6809
# ---------------------------------
6810
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4492
6814
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])