2004
1860
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2005
1861
AC_MSG_RESULT([$hard_links])
2006
1862
if test "$hard_links" = no; then
2007
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1863
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2008
1864
need_locks=warn
2014
if test "$GCC" = yes; then
2015
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2016
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2017
echo "int some_variable = 0;" > conftest.$ac_ext
2018
save_CFLAGS="$CFLAGS"
2019
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2020
compiler_rtti_exceptions=no
2021
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2022
# The compiler can only warn and ignore the option if not recognized
2023
# So say no if there are warnings
2024
if test -s conftest.err; then
2025
compiler_rtti_exceptions=no
2027
compiler_rtti_exceptions=yes
2030
CFLAGS="$save_CFLAGS"
2031
AC_MSG_RESULT([$compiler_rtti_exceptions])
2033
if test "$compiler_rtti_exceptions" = "yes"; then
2034
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2036
no_builtin_flag=' -fno-builtin'
2040
# See if the linker supports building shared libraries.
2041
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2043
allow_undefined_flag=
2045
need_lib_prefix=unknown
2046
need_version=unknown
2047
# when you set need_version to no, make sure it does not cause -set_version
2048
# flags to be left without arguments
2050
archive_expsym_cmds=
2051
old_archive_from_new_cmds=
2052
old_archive_from_expsyms_cmds=
2053
export_dynamic_flag_spec=
2054
whole_archive_flag_spec=
2055
thread_safe_flag_spec=
2056
hardcode_into_libs=no
2057
hardcode_libdir_flag_spec=
2058
hardcode_libdir_separator=
2061
hardcode_shlibpath_var=unsupported
2063
link_all_deplibs=unknown
2064
always_export_symbols=no
2065
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2066
# include_expsyms should be a list of space-separated symbols to be *always*
2067
# included in the symbol list
2069
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2070
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2071
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2072
# as well as any symbol that contains `d'.
2073
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2074
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2075
# platforms (ab)use it in PIC code, but their linkers get confused if
2076
# the symbol is explicitly referenced. Since portable code cannot
2077
# rely on this symbol name, it's probably fine to never include it in
2078
# preloaded symbol tables.
2079
extract_expsyms_cmds=
2082
cygwin* | mingw* | pw32*)
2083
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2084
# When not using gcc, we currently assume that we are using
2085
# Microsoft Visual C++.
2086
if test "$GCC" != yes; then
2096
if test "$with_gnu_ld" = yes; then
2097
# If archive_cmds runs LD, not CC, wlarc should be empty
2100
# See if GNU ld supports shared libraries.
2102
aix3* | aix4* | aix5*)
2103
# On AIX, the GNU linker is very broken
2104
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2108
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2109
*** to be unable to reliably create shared libraries on AIX.
2110
*** Therefore, libtool is disabling shared libraries support. If you
2111
*** really care for shared libraries, you may want to modify your PATH
2112
*** so that a non-GNU linker is found, and then restart.
2118
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)'
2119
hardcode_libdir_flag_spec='-L$libdir'
2120
hardcode_minus_L=yes
2122
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2123
# that the semantics of dynamic libraries on AmigaOS, at least up
2124
# to version 4, is to share data among multiple programs linked
2125
# with the same dynamic library. Since this doesn't match the
2126
# behavior of shared libraries on other platforms, we can use
2132
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2133
allow_undefined_flag=unsupported
2134
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2135
# support --undefined. This deserves some investigation. FIXME
2136
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2142
cygwin* | mingw* | pw32*)
2143
# hardcode_libdir_flag_spec is actually meaningless, as there is
2144
# no search path for DLLs.
2145
hardcode_libdir_flag_spec='-L$libdir'
2146
allow_undefined_flag=unsupported
2147
always_export_symbols=yes
2149
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2150
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2151
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2152
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2153
else $CC -o impgen impgen.c ; fi)~
2154
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2156
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2158
# cygwin and mingw dlls have different entry points and sets of symbols
2160
# FIXME: what about values for MSVC?
2161
dll_entry=__cygwin_dll_entry@12
2162
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2166
dll_entry=_DllMainCRTStartup@12
2167
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2171
# mingw and cygwin differ, and it's simplest to just exclude the union
2172
# of the two symbol sets.
2173
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2175
# recent cygwin and mingw systems supply a stub DllMain which the user
2176
# can override, but on older systems we have to supply one (in ltdll.c)
2177
if test "x$lt_cv_need_dllmain" = "xyes"; then
2178
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2179
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~
2180
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2186
# Extract the symbol export list from an `--export-all' def file,
2187
# then regenerate the def file from the symbol export list, so that
2188
# the compiled dll only exports the symbol export list.
2189
# Be careful not to strip the DATA tag left be newer dlltools.
2190
export_symbols_cmds="$ltdll_cmds"'
2191
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2192
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2194
# If the export-symbols file already is a .def file (1st line
2195
# is EXPORTS), use it as is.
2196
# If DATA tags from a recent dlltool are present, honour them!
2197
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2198
cp $export_symbols $output_objdir/$soname-def;
2200
echo EXPORTS > $output_objdir/$soname-def;
2202
cat $export_symbols | while read symbol; do
2205
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2206
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2207
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2209
_lt_hint=`expr 1 + \$_lt_hint`;
2213
$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~
2214
$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~
2215
$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~
2216
$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~
2217
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2221
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2222
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2225
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2226
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2231
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2235
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2236
*** create shared libraries on Solaris systems. Therefore, libtool
2237
*** is disabling shared libraries support. We urge you to upgrade GNU
2238
*** binutils to release 2.9.1 or newer. Another option is to modify
2239
*** your PATH or compiler configuration so that the native linker is
2240
*** used, and then restart.
2243
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2244
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2245
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2252
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2255
hardcode_shlibpath_var=no
2259
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2260
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2261
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2268
if test "$ld_shlibs" = yes; then
2269
runpath_var=LD_RUN_PATH
2270
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2271
export_dynamic_flag_spec='${wl}--export-dynamic'
2273
cygwin* | mingw* | pw32*)
2274
# dlltool doesn't understand --whole-archive et. al.
2275
whole_archive_flag_spec=
2278
# ancient GNU ld didn't support --whole-archive et. al.
2279
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2280
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2282
whole_archive_flag_spec=
1869
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1874
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1875
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1876
[rm -f .libs 2>/dev/null
1877
mkdir .libs 2>/dev/null
1878
if test -d .libs; then
2288
# PORTME fill in a description of your system's linker (not GNU ld)
2291
allow_undefined_flag=unsupported
2292
always_export_symbols=yes
2293
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'
2294
# Note: this linker hardcodes the directories in LIBPATH if there
2295
# are no directories specified by -L.
2296
hardcode_minus_L=yes
2297
if test "$GCC" = yes && test -z "$link_static_flag"; then
2298
# Neither direct hardcoding nor static linking is supported with a
2300
hardcode_direct=unsupported
2305
if test "$host_cpu" = ia64; then
2306
# On IA64, the linker does run time linking by default, so we don't
2307
# have to do anything special.
2308
aix_use_runtimelinking=no
2309
exp_sym_flag='-Bexport'
2312
aix_use_runtimelinking=no
2314
# Test if we are trying to use run time linking or normal
2315
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2316
# need to do runtime linking.
2317
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2318
for ld_flag in $LDFLAGS; do
2321
aix_use_runtimelinking=yes
2328
exp_sym_flag='-bexport'
2329
no_entry_flag='-bnoentry'
2332
# When large executables or shared objects are built, AIX ld can
2333
# have problems creating the table of contents. If linking a library
2334
# or program results in "error TOC overflow" add -mminimal-toc to
2335
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2336
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2340
hardcode_libdir_separator=':'
2341
if test "$GCC" = yes; then
2342
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2343
collect2name=`${CC} -print-prog-name=collect2`
2344
if test -f "$collect2name" && \
2345
strings "$collect2name" | grep resolve_lib_name >/dev/null
2347
# We have reworked collect2
2350
# We have old collect2
2351
hardcode_direct=unsupported
2352
# It fails to find uninstalled libraries when the uninstalled
2353
# path is not listed in the libpath. Setting hardcode_minus_L
2354
# to unsupported forces relinking
2355
hardcode_minus_L=yes
2356
hardcode_libdir_flag_spec='-L$libdir'
2357
hardcode_libdir_separator=
2361
shared_flag='-shared'
2364
if test "$host_cpu" = ia64; then
2365
shared_flag='${wl}-G'
2367
if test "$aix_use_runtimelinking" = yes; then
2368
shared_flag='${wl}-G'
2370
shared_flag='${wl}-bM:SRE'
2375
# It seems that -bexpall can do strange things, so it is better to
2376
# generate a list of symbols to export.
2377
always_export_symbols=yes
2378
if test "$aix_use_runtimelinking" = yes; then
2379
# Warning - without using the other runtime loading flags (-brtl),
2380
# -berok will link without error, but may produce a broken library.
2381
allow_undefined_flag='-berok'
2382
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2383
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"
2385
if test "$host_cpu" = ia64; then
2386
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2387
allow_undefined_flag="-z nodefs"
2388
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"
2390
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2391
# Warning - without using the other run time loading flags,
2392
# -berok will link without error, but may produce a broken library.
2393
allow_undefined_flag='${wl}-berok'
2394
# This is a bit strange, but is similar to how AIX traditionally builds
2395
# it's shared libraries.
2396
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname'
2402
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)'
2403
hardcode_libdir_flag_spec='-L$libdir'
2404
hardcode_minus_L=yes
2405
# see comment about different semantics on the GNU ld section
2409
cygwin* | mingw* | pw32*)
2410
# When not using gcc, we currently assume that we are using
2411
# Microsoft Visual C++.
2412
# hardcode_libdir_flag_spec is actually meaningless, as there is
2413
# no search path for DLLs.
2414
hardcode_libdir_flag_spec=' '
2415
allow_undefined_flag=unsupported
2416
# Tell ltmain to make .lib files, not .a files.
2418
# FIXME: Setting linknames here is a bad hack.
2419
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2420
# The linker will automatically build a .lib file if we build a DLL.
2421
old_archive_from_new_cmds='true'
2422
# FIXME: Should let the user specify the lib program.
2423
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2424
fix_srcfile_path='`cygpath -w "$srcfile"`'
2427
darwin* | rhapsody*)
2429
rhapsody* | darwin1.[[012]])
2430
allow_undefined_flag='-undefined suppress'
2433
allow_undefined_flag='-flat_namespace -undefined suppress'
2436
# FIXME: Relying on posixy $() will cause problems for
2437
# cross-compilation, but unfortunately the echo tests do not
2438
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2439
# `"' quotes if we put them in here... so don't!
2440
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)'
2441
# We need to add '_' to the symbols in $export_symbols first
2442
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2444
hardcode_shlibpath_var=no
2445
whole_archive_flag_spec='-all_load $convenience'
2452
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2453
# support. Future versions do this automatically, but an explicit c++rt0.o
2454
# does not break anything, and helps significantly (at the cost of a little
2457
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2458
hardcode_libdir_flag_spec='-R$libdir'
2460
hardcode_shlibpath_var=no
2463
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2465
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2467
hardcode_minus_L=yes
2468
hardcode_shlibpath_var=no
2471
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2473
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2474
hardcode_libdir_flag_spec='-R$libdir'
2476
hardcode_shlibpath_var=no
2479
hpux9* | hpux10* | hpux11*)
2481
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' ;;
2482
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2484
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2485
hardcode_libdir_separator=:
2487
hardcode_minus_L=yes # Not in the search PATH, but as the default
2488
# location of the library.
2489
export_dynamic_flag_spec='${wl}-E'
2492
irix5* | irix6* | nonstopux*)
2493
if test "$GCC" = yes; then
2494
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'
2495
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2497
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'
2498
hardcode_libdir_flag_spec='-rpath $libdir'
2500
hardcode_libdir_separator=:
2501
link_all_deplibs=yes
2505
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2506
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2508
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2510
hardcode_libdir_flag_spec='-R$libdir'
2512
hardcode_shlibpath_var=no
2516
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2518
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2519
hardcode_libdir_separator=:
2520
hardcode_shlibpath_var=no
2525
hardcode_shlibpath_var=no
2526
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2527
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2528
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2529
export_dynamic_flag_spec='${wl}-E'
2532
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2533
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2534
hardcode_libdir_flag_spec='-R$libdir'
2537
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2538
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2545
hardcode_libdir_flag_spec='-L$libdir'
2546
hardcode_minus_L=yes
2547
allow_undefined_flag=unsupported
2548
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'
2549
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2553
if test "$GCC" = yes; then
2554
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2555
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'
2557
allow_undefined_flag=' -expect_unresolved \*'
2558
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'
2560
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2561
hardcode_libdir_separator=:
2564
osf4* | osf5*) # as osf3* with the addition of -msym flag
2565
if test "$GCC" = yes; then
2566
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2567
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'
2568
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2570
allow_undefined_flag=' -expect_unresolved \*'
2571
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'
2572
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2573
$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'
2575
#Both c and cxx compiler support -rpath directly
2576
hardcode_libdir_flag_spec='-rpath $libdir'
2578
hardcode_libdir_separator=:
2582
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2583
hardcode_shlibpath_var=no
2584
runpath_var=LD_RUN_PATH
2585
hardcode_runpath_var=yes
2586
export_dynamic_flag_spec='${wl}-Bexport'
2590
# gcc --version < 3.0 without binutils cannot create self contained
2591
# shared libraries reliably, requiring libgcc.a to resolve some of
2592
# the object symbols generated in some cases. Libraries that use
2593
# assert need libgcc.a to resolve __eprintf, for example. Linking
2594
# a copy of libgcc.a into every shared library to guarantee resolving
2595
# such symbols causes other problems: According to Tim Van Holder
2596
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2597
# (to the application) exception stack for one thing.
2598
no_undefined_flag=' -z defs'
2599
if test "$GCC" = yes; then
2600
case `$CC --version 2>/dev/null` in
2604
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2605
*** create self contained shared libraries on Solaris systems, without
2606
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2607
*** -no-undefined support, which will at least allow you to build shared
2608
*** libraries. However, you may find that when you link such libraries
2609
*** into an application without using GCC, you have to manually add
2610
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2611
*** upgrade to a newer version of GCC. Another option is to rebuild your
2612
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2619
# $CC -shared without GNU ld will not create a library from C++
2620
# object files and a static libstdc++, better avoid it by now
2621
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2622
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2623
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2624
hardcode_libdir_flag_spec='-R$libdir'
2625
hardcode_shlibpath_var=no
2627
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2628
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2629
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2631
link_all_deplibs=yes
2635
if test "x$host_vendor" = xsequent; then
2636
# Use $CC to link under sequent, because it throws in some extra .o
2637
# files that make .init and .fini sections work.
2638
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2640
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2642
hardcode_libdir_flag_spec='-L$libdir'
2644
hardcode_minus_L=yes
2645
hardcode_shlibpath_var=no
2649
case $host_vendor in
2651
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2652
hardcode_direct=yes # is this really true???
2655
## LD is ld it makes a PLAMLIB
2656
## CC just makes a GrossModule.
2657
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2658
reload_cmds='$CC -r -o $output$reload_objs'
2662
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2663
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2666
runpath_var='LD_RUN_PATH'
2667
hardcode_shlibpath_var=no
2671
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2672
hardcode_shlibpath_var=no
2673
export_dynamic_flag_spec='-Bexport'
2677
no_undefined_flag=' -z text'
2678
# $CC -shared without GNU ld will not create a library from C++
2679
# object files and a static libstdc++, better avoid it by now
2680
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2681
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2682
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2683
hardcode_libdir_flag_spec=
2684
hardcode_shlibpath_var=no
2685
runpath_var='LD_RUN_PATH'
2689
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2690
hardcode_libdir_flag_spec='-L$libdir'
2691
hardcode_shlibpath_var=no
2695
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2696
hardcode_libdir_flag_spec='-L$libdir'
2697
hardcode_shlibpath_var=no
2701
if test -d /usr/nec; then
2702
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2703
hardcode_shlibpath_var=no
2704
runpath_var=LD_RUN_PATH
2705
hardcode_runpath_var=yes
2711
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2714
hardcode_shlibpath_var=no
2715
hardcode_runpath_var=yes
2716
runpath_var=LD_RUN_PATH
2719
sysv5uw7* | unixware7*)
2720
no_undefined_flag='${wl}-z ${wl}text'
2721
if test "$GCC" = yes; then
2722
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2724
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2726
runpath_var='LD_RUN_PATH'
2727
hardcode_shlibpath_var=no
1881
# MS-DOS does not allow filenames that begin with a dot.
2735
AC_MSG_RESULT([$ld_shlibs])
2736
test "$ld_shlibs" = no && can_build_shared=no
1884
rmdir .libs 2>/dev/null])
1885
objdir=$lt_cv_objdir
1886
])# AC_LIBTOOL_OBJDIR
1889
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1890
# ----------------------------------------------
2738
1891
# Check hardcoding attributes.
2739
AC_MSG_CHECKING([how to hardcode library paths into programs])
2741
if test -n "$hardcode_libdir_flag_spec" || \
2742
test -n "$runpath_var"; then
1892
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1893
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1894
_LT_AC_TAGVAR(hardcode_action, $1)=
1895
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1896
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1897
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2744
1899
# We can hardcode non-existant directories.
2745
if test "$hardcode_direct" != no &&
1900
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2746
1901
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2747
1902
# have to relink, otherwise we might link with an installed library
2748
1903
# when we should be linking with a yet-to-be-installed one
2749
## test "$hardcode_shlibpath_var" != no &&
2750
test "$hardcode_minus_L" != no; then
1904
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1905
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2751
1906
# Linking always hardcodes the temporary library directory.
2752
hardcode_action=relink
1907
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2754
1909
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2755
hardcode_action=immediate
1910
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2758
1913
# We cannot hardcode anything, or else we can only hardcode existing
2760
hardcode_action=unsupported
2762
AC_MSG_RESULT([$hardcode_action])
1915
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1917
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1919
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1920
# Fast installation is not supported
1921
enable_fast_install=no
1922
elif test "$shlibpath_overrides_runpath" = yes ||
1923
test "$enable_shared" = no; then
1924
# Fast installation is not necessary
1925
enable_fast_install=needless
1927
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1930
# AC_LIBTOOL_SYS_LIB_STRIP
1931
# ------------------------
1932
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2766
1935
AC_MSG_CHECKING([whether stripping libraries is possible])
2767
1936
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3171
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3172
soname_spec='${libname}${release}.so$major'
3173
shlibpath_var=LD_LIBRARY_PATH
3180
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3181
soname_spec='${libname}${release}.so$major'
3182
shlibpath_var=LD_LIBRARY_PATH
3186
2495
if test -d /usr/nec ;then
3187
2496
version_type=linux
3188
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3189
soname_spec='$libname.so.$major'
2497
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2498
soname_spec='$libname${shared_ext}.$major'
3190
2499
shlibpath_var=LD_LIBRARY_PATH
2505
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2506
soname_spec='${libname}${release}${shared_ext}$major'
2507
shlibpath_var=LD_LIBRARY_PATH
3195
2511
dynamic_linker=no
3198
2514
AC_MSG_RESULT([$dynamic_linker])
3199
2515
test "$dynamic_linker" = no && can_build_shared=no
3201
# Report the final consequences.
2516
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2521
AC_DEFUN([_LT_AC_TAGCONFIG],
2522
[AC_ARG_WITH([tags],
2523
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2524
[include additional configurations @<:@automatic@:>@])],
2525
[tagnames="$withval"])
2527
if test -f "$ltmain" && test -n "$tagnames"; then
2528
if test ! -f "${ofile}"; then
2529
AC_MSG_WARN([output file `$ofile' does not exist])
2532
if test -z "$LTCC"; then
2533
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2534
if test -z "$LTCC"; then
2535
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2537
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2541
# Extract list of available tagged configurations in $ofile.
2542
# Note that this assumes the entire list is on one line.
2543
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2545
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2546
for tagname in $tagnames; do
2548
# Check whether tagname contains only valid characters
2549
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2551
*) AC_MSG_ERROR([invalid tag name: $tagname])
2555
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2557
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2560
# Update the list of available tags.
2561
if test -n "$tagname"; then
2562
echo appending configuration tag \"$tagname\" to $ofile
2566
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2567
AC_LIBTOOL_LANG_CXX_CONFIG
2574
if test -n "$F77" && test "X$F77" != "Xno"; then
2575
AC_LIBTOOL_LANG_F77_CONFIG
2582
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2583
AC_LIBTOOL_LANG_GCJ_CONFIG
2590
AC_LIBTOOL_LANG_RC_CONFIG
2594
AC_MSG_ERROR([Unsupported tag name: $tagname])
2598
# Append the new tag name to the list of available tags.
2599
if test -n "$tagname" ; then
2600
available_tags="$available_tags $tagname"
2606
# Now substitute the updated list of available tags.
2607
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2608
mv "${ofile}T" "$ofile"
2612
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2615
])# _LT_AC_TAGCONFIG
2620
# enable checks for dlopen support
2621
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2622
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2623
])# AC_LIBTOOL_DLOPEN
2626
# AC_LIBTOOL_WIN32_DLL
2627
# --------------------
2628
# declare package support for building win32 dll's
2629
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2630
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2631
])# AC_LIBTOOL_WIN32_DLL
2634
# AC_ENABLE_SHARED([DEFAULT])
2635
# ---------------------------
2636
# implement the --enable-shared flag
2637
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2638
AC_DEFUN([AC_ENABLE_SHARED],
2639
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2640
AC_ARG_ENABLE([shared],
2641
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2642
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2643
[p=${PACKAGE-default}
2645
yes) enable_shared=yes ;;
2646
no) enable_shared=no ;;
2649
# Look at the argument we got. We use all the common list separators.
2650
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2651
for pkg in $enableval; do
2653
if test "X$pkg" = "X$p"; then
2660
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2661
])# AC_ENABLE_SHARED
2666
#- set the default shared flag to --disable-shared
2667
AC_DEFUN([AC_DISABLE_SHARED],
2668
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2669
AC_ENABLE_SHARED(no)
2670
])# AC_DISABLE_SHARED
2673
# AC_ENABLE_STATIC([DEFAULT])
2674
# ---------------------------
2675
# implement the --enable-static flag
2676
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2677
AC_DEFUN([AC_ENABLE_STATIC],
2678
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2679
AC_ARG_ENABLE([static],
2680
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2681
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2682
[p=${PACKAGE-default}
2684
yes) enable_static=yes ;;
2685
no) enable_static=no ;;
2688
# Look at the argument we got. We use all the common list separators.
2689
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2690
for pkg in $enableval; do
2692
if test "X$pkg" = "X$p"; then
2699
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2700
])# AC_ENABLE_STATIC
2705
# set the default static flag to --disable-static
2706
AC_DEFUN([AC_DISABLE_STATIC],
2707
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2708
AC_ENABLE_STATIC(no)
2709
])# AC_DISABLE_STATIC
2712
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2713
# ---------------------------------
2714
# implement the --enable-fast-install flag
2715
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2716
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2717
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2718
AC_ARG_ENABLE([fast-install],
2719
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2720
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2721
[p=${PACKAGE-default}
2723
yes) enable_fast_install=yes ;;
2724
no) enable_fast_install=no ;;
2726
enable_fast_install=no
2727
# Look at the argument we got. We use all the common list separators.
2728
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2729
for pkg in $enableval; do
2731
if test "X$pkg" = "X$p"; then
2732
enable_fast_install=yes
2738
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2739
])# AC_ENABLE_FAST_INSTALL
2742
# AC_DISABLE_FAST_INSTALL
2743
# -----------------------
2744
# set the default to --disable-fast-install
2745
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2746
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2747
AC_ENABLE_FAST_INSTALL(no)
2748
])# AC_DISABLE_FAST_INSTALL
2751
# AC_LIBTOOL_PICMODE([MODE])
2752
# --------------------------
2753
# implement the --with-pic flag
2754
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2755
AC_DEFUN([AC_LIBTOOL_PICMODE],
2756
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2757
pic_mode=ifelse($#,1,$1,default)
2758
])# AC_LIBTOOL_PICMODE
2763
# This is predefined starting with Autoconf 2.54, so this conditional
2764
# definition can be removed once we require Autoconf 2.54 or later.
2765
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2766
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2767
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2768
then ac_cv_prog_egrep='grep -E'
2769
else ac_cv_prog_egrep='egrep'
2771
EGREP=$ac_cv_prog_egrep
2776
# AC_PATH_TOOL_PREFIX
2777
# -------------------
2778
# find a file program which can recognise shared library
2779
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2780
[AC_REQUIRE([AC_PROG_EGREP])dnl
2781
AC_MSG_CHECKING([for $1])
2782
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2784
[[\\/*] | ?:[\\/]*])
2785
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2788
lt_save_MAGIC_CMD="$MAGIC_CMD"
2789
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2790
dnl $ac_dummy forces splitting on constant user-supplied paths.
2791
dnl POSIX.2 word splitting is done only on the output of word expansions,
2792
dnl not every word. This closes a longstanding sh security hole.
2793
ac_dummy="ifelse([$2], , $PATH, [$2])"
2794
for ac_dir in $ac_dummy; do
2796
test -z "$ac_dir" && ac_dir=.
2797
if test -f $ac_dir/$1; then
2798
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2799
if test -n "$file_magic_test_file"; then
2800
case $deplibs_check_method in
2802
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2803
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2804
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2805
$EGREP "$file_magic_regex" > /dev/null; then
2810
*** Warning: the command libtool uses to detect shared libraries,
2811
*** $file_magic_cmd, produces output that libtool cannot recognize.
2812
*** The result is that libtool may fail to recognize shared libraries
2813
*** as such. This will affect the creation of libtool libraries that
2814
*** depend on shared libraries, but programs linked with such libtool
2815
*** libraries will work regardless of this problem. Nevertheless, you
2816
*** may want to report the problem to your system manager and/or to
2817
*** bug-libtool@gnu.org
2827
MAGIC_CMD="$lt_save_MAGIC_CMD"
2830
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2831
if test -n "$MAGIC_CMD"; then
2832
AC_MSG_RESULT($MAGIC_CMD)
2836
])# AC_PATH_TOOL_PREFIX
2841
# find a file program which can recognise a shared library
2842
AC_DEFUN([AC_PATH_MAGIC],
2843
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2844
if test -z "$lt_cv_path_MAGIC_CMD"; then
2845
if test -n "$ac_tool_prefix"; then
2846
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2856
# find the pathname to the GNU or non-GNU linker
2857
AC_DEFUN([AC_PROG_LD],
2858
[AC_ARG_WITH([gnu-ld],
2859
[AC_HELP_STRING([--with-gnu-ld],
2860
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2861
[test "$withval" = no || with_gnu_ld=yes],
2863
AC_REQUIRE([LT_AC_PROG_SED])dnl
2864
AC_REQUIRE([AC_PROG_CC])dnl
2865
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2866
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2868
if test "$GCC" = yes; then
2869
# Check if gcc -print-prog-name=ld gives a path.
2870
AC_MSG_CHECKING([for ld used by $CC])
2873
# gcc leaves a trailing carriage return which upsets mingw
2874
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2876
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2879
# Accept absolute paths.
2880
[[\\/]]* | ?:[[\\/]]*)
2881
re_direlt='/[[^/]][[^/]]*/\.\./'
2882
# Canonicalize the pathname of ld
2883
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2884
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2885
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2887
test -z "$LD" && LD="$ac_prog"
2890
# If it fails, then pretend we aren't using GCC.
2894
# If it is relative, then search for the first ld in PATH.
2898
elif test "$with_gnu_ld" = yes; then
2899
AC_MSG_CHECKING([for GNU ld])
2901
AC_MSG_CHECKING([for non-GNU ld])
2903
AC_CACHE_VAL(lt_cv_path_LD,
2904
[if test -z "$LD"; then
2905
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2906
for ac_dir in $PATH; do
2908
test -z "$ac_dir" && ac_dir=.
2909
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2910
lt_cv_path_LD="$ac_dir/$ac_prog"
2911
# Check to see if the program is GNU ld. I'd rather use --version,
2912
# but apparently some GNU ld's only accept -v.
2913
# Break only if it was the GNU/non-GNU ld that we prefer.
2914
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2915
*GNU* | *'with BFD'*)
2916
test "$with_gnu_ld" != no && break
2919
test "$with_gnu_ld" != yes && break
2926
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2929
if test -n "$LD"; then
2934
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2941
AC_DEFUN([AC_PROG_LD_GNU],
2942
[AC_REQUIRE([AC_PROG_EGREP])dnl
2943
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2944
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2945
case `$LD -v 2>&1 </dev/null` in
2946
*GNU* | *'with BFD'*)
2947
lt_cv_prog_gnu_ld=yes
2950
lt_cv_prog_gnu_ld=no
2953
with_gnu_ld=$lt_cv_prog_gnu_ld
2957
# AC_PROG_LD_RELOAD_FLAG
2958
# ----------------------
2959
# find reload flag for linker
2960
# -- PORTME Some linkers may need a different reload flag.
2961
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2962
[AC_CACHE_CHECK([for $LD option to reload object files],
2963
lt_cv_ld_reload_flag,
2964
[lt_cv_ld_reload_flag='-r'])
2965
reload_flag=$lt_cv_ld_reload_flag
2966
case $reload_flag in
2968
*) reload_flag=" $reload_flag" ;;
2970
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2971
])# AC_PROG_LD_RELOAD_FLAG
2974
# AC_DEPLIBS_CHECK_METHOD
2975
# -----------------------
2976
# how to check for library dependencies
2977
# -- PORTME fill in with the dynamic library characteristics
2978
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2979
[AC_CACHE_CHECK([how to recognise dependent libraries],
2980
lt_cv_deplibs_check_method,
2981
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2982
lt_cv_file_magic_test_file=
2983
lt_cv_deplibs_check_method='unknown'
2984
# Need to set the preceding variable on all platforms that support
2985
# interlibrary dependencies.
2986
# 'none' -- dependencies not supported.
2987
# `unknown' -- same as none, but documents that we really don't know.
2988
# 'pass_all' -- all dependencies passed with no checks.
2989
# 'test_compile' -- check by making test program.
2990
# 'file_magic [[regex]]' -- check by looking for files in library path
2991
# which responds to the $file_magic_cmd with a given extended regex.
2992
# If you have `file' or equivalent on your system and you're not sure
2993
# whether `pass_all' will *always* work, you probably want this one.
2997
lt_cv_deplibs_check_method=pass_all
3001
lt_cv_deplibs_check_method=pass_all
3005
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3006
lt_cv_file_magic_cmd='/usr/bin/file -L'
3007
lt_cv_file_magic_test_file=/shlib/libc.so
3011
# func_win32_libid is a shell function defined in ltmain.sh
3012
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3013
lt_cv_file_magic_cmd='func_win32_libid'
3017
# Base MSYS/MinGW do not provide the 'file' command needed by
3018
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
3019
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3020
lt_cv_file_magic_cmd='$OBJDUMP -f'
3023
darwin* | rhapsody*)
3024
lt_cv_deplibs_check_method=pass_all
3027
freebsd* | kfreebsd*-gnu)
3028
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3031
# Not sure whether the presence of OpenBSD here was a mistake.
3032
# Let's accept both of them until this is cleared up.
3033
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3034
lt_cv_file_magic_cmd=/usr/bin/file
3035
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3039
lt_cv_deplibs_check_method=pass_all
3044
lt_cv_deplibs_check_method=pass_all
3047
hpux10.20* | hpux11*)
3048
lt_cv_file_magic_cmd=/usr/bin/file
3051
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3052
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3055
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3056
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3059
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3060
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3065
irix5* | irix6* | nonstopux*)
3067
*-32|*"-32 ") libmagic=32-bit;;
3068
*-n32|*"-n32 ") libmagic=N32;;
3069
*-64|*"-64 ") libmagic=64-bit;;
3070
*) libmagic=never-match;;
3072
lt_cv_deplibs_check_method=pass_all
3075
# This must be Linux ELF.
3077
lt_cv_deplibs_check_method=pass_all
3080
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3081
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3082
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3084
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3089
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3090
lt_cv_file_magic_cmd=/usr/bin/file
3091
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3095
lt_cv_deplibs_check_method=unknown
3099
lt_cv_file_magic_cmd=/usr/bin/file
3100
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3101
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3102
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3104
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3108
osf3* | osf4* | osf5*)
3109
lt_cv_deplibs_check_method=pass_all
3113
lt_cv_deplibs_check_method=pass_all
3117
lt_cv_deplibs_check_method=pass_all
3120
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3121
case $host_vendor in
3123
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3124
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3127
lt_cv_deplibs_check_method=pass_all
3130
lt_cv_file_magic_cmd='/bin/file'
3131
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3134
lt_cv_file_magic_cmd='/bin/file'
3135
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3136
lt_cv_file_magic_test_file=/lib/libc.so
3139
lt_cv_deplibs_check_method=pass_all
3144
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3145
lt_cv_deplibs_check_method=pass_all
3149
file_magic_cmd=$lt_cv_file_magic_cmd
3150
deplibs_check_method=$lt_cv_deplibs_check_method
3151
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3152
])# AC_DEPLIBS_CHECK_METHOD
3157
# find the pathname to a BSD-compatible name lister
3158
AC_DEFUN([AC_PROG_NM],
3159
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3160
[if test -n "$NM"; then
3161
# Let the user override the test.
3164
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3165
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3167
test -z "$ac_dir" && ac_dir=.
3168
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3169
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3170
# Check to see if the nm accepts a BSD-compat flag.
3171
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3172
# nm: unknown option "B" ignored
3173
# Tru64's nm complains that /dev/null is an invalid object file
3174
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3175
*/dev/null* | *'Invalid file or object type'*)
3176
lt_cv_path_NM="$tmp_nm -B"
3180
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3182
lt_cv_path_NM="$tmp_nm -p"
3186
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3187
continue # so that we can try to find one that supports BSD flags
3194
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3202
# check for math library
3203
AC_DEFUN([AC_CHECK_LIBM],
3204
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3207
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3208
# These system don't have libm, or don't need it
3211
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3212
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3215
AC_CHECK_LIB(m, cos, LIBM="-lm")
3221
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3222
# -----------------------------------
3223
# sets LIBLTDL to the link flags for the libltdl convenience library and
3224
# LTDLINCL to the include flags for the libltdl header and adds
3225
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3226
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3227
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3228
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3229
# '${top_srcdir}/' (note the single quotes!). If your package is not
3230
# flat and you're not using automake, define top_builddir and
3231
# top_srcdir appropriately in the Makefiles.
3232
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3233
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3234
case $enable_ltdl_convenience in
3235
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3236
"") enable_ltdl_convenience=yes
3237
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3239
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3240
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3241
# For backwards non-gettext consistent compatibility...
3243
])# AC_LIBLTDL_CONVENIENCE
3246
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3247
# -----------------------------------
3248
# sets LIBLTDL to the link flags for the libltdl installable library and
3249
# LTDLINCL to the include flags for the libltdl header and adds
3250
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3251
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3252
# DIRECTORY is not provided and an installed libltdl is not found, it is
3253
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3254
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3255
# quotes!). If your package is not flat and you're not using automake,
3256
# define top_builddir and top_srcdir appropriately in the Makefiles.
3257
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3258
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3259
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3260
AC_CHECK_LIB(ltdl, lt_dlinit,
3261
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3262
[if test x"$enable_ltdl_install" = xno; then
3263
AC_MSG_WARN([libltdl not installed, but installation disabled])
3265
enable_ltdl_install=yes
3268
if test x"$enable_ltdl_install" = x"yes"; then
3269
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3270
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3271
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3273
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3277
# For backwards non-gettext consistent compatibility...
3279
])# AC_LIBLTDL_INSTALLABLE
3284
# enable support for C++ libraries
3285
AC_DEFUN([AC_LIBTOOL_CXX],
3286
[AC_REQUIRE([_LT_AC_LANG_CXX])
3292
AC_DEFUN([_LT_AC_LANG_CXX],
3293
[AC_REQUIRE([AC_PROG_CXX])
3294
AC_REQUIRE([AC_PROG_CXXCPP])
3295
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3301
# enable support for Fortran 77 libraries
3302
AC_DEFUN([AC_LIBTOOL_F77],
3303
[AC_REQUIRE([_LT_AC_LANG_F77])
3309
AC_DEFUN([_LT_AC_LANG_F77],
3310
[AC_REQUIRE([AC_PROG_F77])
3311
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3317
# enable support for GCJ libraries
3318
AC_DEFUN([AC_LIBTOOL_GCJ],
3319
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3325
AC_DEFUN([_LT_AC_LANG_GCJ],
3326
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3327
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3328
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3329
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3330
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3331
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3332
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3338
# enable support for Windows resource files
3339
AC_DEFUN([AC_LIBTOOL_RC],
3340
[AC_REQUIRE([LT_AC_PROG_RC])
3341
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3345
# AC_LIBTOOL_LANG_C_CONFIG
3346
# ------------------------
3347
# Ensure that the configuration vars for the C compiler are
3348
# suitably defined. Those variables are subsequently used by
3349
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3350
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3351
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3355
# Source file extension for C test sources.
3358
# Object file extension for compiled C test sources.
3360
_LT_AC_TAGVAR(objext, $1)=$objext
3362
# Code to be used in simple compile tests
3363
lt_simple_compile_test_code="int some_variable = 0;\n"
3365
# Code to be used in simple link tests
3366
lt_simple_link_test_code='int main(){return(0);}\n'
3371
# Check for any special shared library compilation flags.
3373
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3374
if test "$GCC" = no; then
3377
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3381
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3382
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3383
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3385
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3386
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3392
# Check to make sure the static flag actually works.
3394
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3395
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3396
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3398
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3401
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3402
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3403
AC_LIBTOOL_PROG_CC_C_O($1)
3404
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3405
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3406
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3407
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3408
AC_LIBTOOL_SYS_LIB_STRIP
3409
AC_LIBTOOL_DLOPEN_SELF($1)
3411
# Report which librarie types wil actually be built
3202
3412
AC_MSG_CHECKING([if libtool supports shared libraries])
3203
3413
AC_MSG_RESULT([$can_build_shared])
3220
3430
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3221
3431
test "$enable_shared" = yes && enable_static=no
3225
AC_MSG_RESULT([$enable_shared])
3227
AC_MSG_CHECKING([whether to build static libraries])
3228
# Make sure either enable_shared or enable_static is yes.
3229
test "$enable_shared" = yes || enable_static=yes
3230
AC_MSG_RESULT([$enable_static])
3232
if test "$hardcode_action" = relink; then
3233
# Fast installation is not supported
3234
enable_fast_install=no
3235
elif test "$shlibpath_overrides_runpath" = yes ||
3236
test "$enable_shared" = no; then
3237
# Fast installation is not necessary
3238
enable_fast_install=needless
3241
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3242
if test "$GCC" = yes; then
3243
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3246
AC_LIBTOOL_DLOPEN_SELF
3248
if test "$enable_shared" = yes && test "$GCC" = yes; then
3249
case $archive_cmds in
3251
# FIXME: we may have to deal with multi-command sequences.
3254
# Test whether the compiler implicitly links with -lc since on some
3255
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3256
# to ld, don't add -lc before -lgcc.
3257
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3258
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3260
echo 'static int dummy;' > conftest.$ac_ext
3262
if AC_TRY_EVAL(ac_compile); then
3265
libobjs=conftest.$ac_objext
3267
wl=$lt_cv_prog_cc_wl
3273
save_allow_undefined_flag=$allow_undefined_flag
3274
allow_undefined_flag=
3275
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3277
lt_cv_archive_cmds_need_lc=no
3279
lt_cv_archive_cmds_need_lc=yes
3281
allow_undefined_flag=$save_allow_undefined_flag
3283
cat conftest.err 1>&5
3285
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3289
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3291
# The second clause should only fire when bootstrapping the
3434
darwin* | rhapsody*)
3435
if test "$GCC" = yes; then
3436
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3438
rhapsody* | darwin1.[[012]])
3439
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3442
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3443
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3445
case ${MACOSX_DEPLOYMENT_TARGET} in
3447
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3450
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3456
output_verbose_link_cmd='echo'
3457
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3458
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3459
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3460
_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}'
3461
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3462
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3463
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3464
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3465
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3466
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3468
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3472
AC_MSG_RESULT([$enable_shared])
3474
AC_MSG_CHECKING([whether to build static libraries])
3475
# Make sure either enable_shared or enable_static is yes.
3476
test "$enable_shared" = yes || enable_static=yes
3477
AC_MSG_RESULT([$enable_static])
3479
AC_LIBTOOL_CONFIG($1)
3483
])# AC_LIBTOOL_LANG_C_CONFIG
3486
# AC_LIBTOOL_LANG_CXX_CONFIG
3487
# --------------------------
3488
# Ensure that the configuration vars for the C compiler are
3489
# suitably defined. Those variables are subsequently used by
3490
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3491
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3492
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3494
AC_REQUIRE([AC_PROG_CXX])
3495
AC_REQUIRE([AC_PROG_CXXCPP])
3497
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3498
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3499
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3500
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3501
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3502
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3503
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3504
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3505
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3506
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3507
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3508
_LT_AC_TAGVAR(module_cmds, $1)=
3509
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3510
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3511
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3512
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3513
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3514
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3516
# Dependencies to place before and after the object being linked:
3517
_LT_AC_TAGVAR(predep_objects, $1)=
3518
_LT_AC_TAGVAR(postdep_objects, $1)=
3519
_LT_AC_TAGVAR(predeps, $1)=
3520
_LT_AC_TAGVAR(postdeps, $1)=
3521
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3523
# Source file extension for C++ test sources.
3526
# Object file extension for compiled C++ test sources.
3528
_LT_AC_TAGVAR(objext, $1)=$objext
3530
# Code to be used in simple compile tests
3531
lt_simple_compile_test_code="int some_variable = 0;\n"
3533
# Code to be used in simple link tests
3534
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3536
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3539
# Allow CC to be a program name with arguments.
3544
lt_save_with_gnu_ld=$with_gnu_ld
3545
lt_save_path_LD=$lt_cv_path_LD
3546
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3547
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3549
unset lt_cv_prog_gnu_ld
3551
if test -n "${lt_cv_path_LDCXX+set}"; then
3552
lt_cv_path_LD=$lt_cv_path_LDCXX
3556
test -z "${LDCXX+set}" || LD=$LDCXX
3559
_LT_AC_TAGVAR(compiler, $1)=$CC
3560
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3562
# We don't want -fno-exception wen compiling C++ code, so set the
3563
# no_builtin_flag separately
3564
if test "$GXX" = yes; then
3565
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3567
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3570
if test "$GXX" = yes; then
3571
# Set up default GNU C++ configuration
3575
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3576
# archiving commands below assume that GNU ld is being used.
3577
if test "$with_gnu_ld" = yes; then
3578
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3579
_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'
3581
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3582
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3584
# If archive_cmds runs LD, not CC, wlarc should be empty
3585
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3586
# investigate it a little bit more. (MM)
3589
# ancient GNU ld didn't support --whole-archive et. al.
3590
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3591
grep 'no-whole-archive' > /dev/null; then
3592
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3594
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3600
# A generic and very simple default shared library creation
3601
# command for GNU C++ for the case where it uses the native
3602
# linker, instead of GNU ld. If possible, this setting should
3603
# overridden to take advantage of the native linker features on
3604
# the platform it is being used on.
3605
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3608
# Commands to make compiler produce verbose output that lists
3609
# what "hidden" libraries, object files and flags are used when
3610
# linking a shared library.
3611
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3619
# PORTME: fill in a description of your system's C++ link characteristics
3620
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3621
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3624
# FIXME: insert proper C++ library support
3625
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3628
if test "$host_cpu" = ia64; then
3629
# On IA64, the linker does run time linking by default, so we don't
3630
# have to do anything special.
3631
aix_use_runtimelinking=no
3632
exp_sym_flag='-Bexport'
3635
aix_use_runtimelinking=no
3637
# Test if we are trying to use run time linking or normal
3638
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3639
# need to do runtime linking.
3640
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3641
for ld_flag in $LDFLAGS; do
3644
aix_use_runtimelinking=yes
3651
exp_sym_flag='-bexport'
3652
no_entry_flag='-bnoentry'
3655
# When large executables or shared objects are built, AIX ld can
3656
# have problems creating the table of contents. If linking a library
3657
# or program results in "error TOC overflow" add -mminimal-toc to
3658
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3659
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3661
_LT_AC_TAGVAR(archive_cmds, $1)=''
3662
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3663
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3664
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3666
if test "$GXX" = yes; then
3667
case $host_os in aix4.[012]|aix4.[012].*)
3668
# We only want to do this on AIX 4.2 and lower, the check
3669
# below for broken collect2 doesn't work under 4.3+
3670
collect2name=`${CC} -print-prog-name=collect2`
3671
if test -f "$collect2name" && \
3672
strings "$collect2name" | grep resolve_lib_name >/dev/null
3674
# We have reworked collect2
3675
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3677
# We have old collect2
3678
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3679
# It fails to find uninstalled libraries when the uninstalled
3680
# path is not listed in the libpath. Setting hardcode_minus_L
3681
# to unsupported forces relinking
3682
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3683
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3684
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3687
shared_flag='-shared'
3690
if test "$host_cpu" = ia64; then
3691
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3692
# chokes on -Wl,-G. The following line is correct:
3695
if test "$aix_use_runtimelinking" = yes; then
3696
shared_flag='${wl}-G'
3698
shared_flag='${wl}-bM:SRE'
3703
# It seems that -bexpall does not export symbols beginning with
3704
# underscore (_), so it is better to generate a list of symbols to export.
3705
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3706
if test "$aix_use_runtimelinking" = yes; then
3707
# Warning - without using the other runtime loading flags (-brtl),
3708
# -berok will link without error, but may produce a broken library.
3709
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3710
# Determine the default libpath from the value encoded in an empty executable.
3711
_LT_AC_SYS_LIBPATH_AIX
3712
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3714
_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"
3716
if test "$host_cpu" = ia64; then
3717
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3718
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3719
_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"
3721
# Determine the default libpath from the value encoded in an empty executable.
3722
_LT_AC_SYS_LIBPATH_AIX
3723
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3724
# Warning - without using the other run time loading flags,
3725
# -berok will link without error, but may produce a broken library.
3726
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3727
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3728
# -bexpall does not export symbols beginning with underscore (_)
3729
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3730
# Exported symbols can be pulled into shared objects from archives
3731
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3732
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3733
# This is similar to how AIX traditionally builds it's shared libraries.
3734
_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'
3739
case $cc_basename in
3741
# FIXME: insert proper C++ library support
3742
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3747
cygwin* | mingw* | pw32*)
3748
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3749
# as there is no search path for DLLs.
3750
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3751
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3752
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3753
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3755
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3756
_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'
3757
# If the export-symbols file already is a .def file (1st line
3758
# is EXPORTS), use it as is; otherwise, prepend...
3759
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3760
cp $export_symbols $output_objdir/$soname.def;
3762
echo EXPORTS > $output_objdir/$soname.def;
3763
cat $export_symbols >> $output_objdir/$soname.def;
3765
$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'
3767
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3771
darwin* | rhapsody*)
3772
if test "$GXX" = yes; then
3773
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3775
rhapsody* | darwin1.[[012]])
3776
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3779
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3780
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3782
case ${MACOSX_DEPLOYMENT_TARGET} in
3784
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3787
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3793
lt_int_apple_cc_single_mod=no
3794
output_verbose_link_cmd='echo'
3795
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3796
lt_int_apple_cc_single_mod=yes
3798
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3799
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3801
_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'
3803
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3805
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3806
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3807
_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}'
3809
_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}'
3811
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3812
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3813
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3814
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3815
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3816
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3818
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3823
case $cc_basename in
3825
# FIXME: insert proper C++ library support
3826
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3829
# Green Hills C++ Compiler
3830
# FIXME: insert proper C++ library support
3831
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3834
# FIXME: insert proper C++ library support
3835
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3840
# C++ shared libraries reported to be fairly broken before switch to ELF
3841
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3844
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3846
freebsd* | kfreebsd*-gnu)
3847
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3849
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3854
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3855
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3856
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3857
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3858
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3859
# but as the default
3860
# location of the library.
3862
case $cc_basename in
3864
# FIXME: insert proper C++ library support
3865
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3868
_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'
3869
# Commands to make compiler produce verbose output that lists
3870
# what "hidden" libraries, object files and flags are used when
3871
# linking a shared library.
3873
# There doesn't appear to be a way to prevent this compiler from
3874
# explicitly linking system object files so we need to strip them
3875
# from the output so that they don't get included in the library
3877
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'
3880
if test "$GXX" = yes; then
3881
_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'
3883
# FIXME: insert proper C++ library support
3884
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3890
if test $with_gnu_ld = no; then
3893
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3894
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3895
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3898
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3901
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3902
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3903
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3909
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3910
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3913
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3914
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3915
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3916
# but as the default
3917
# location of the library.
3920
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3921
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3922
# but as the default
3923
# location of the library.
3927
case $cc_basename in
3929
# FIXME: insert proper C++ library support
3930
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3935
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3938
_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'
3941
# Commands to make compiler produce verbose output that lists
3942
# what "hidden" libraries, object files and flags are used when
3943
# linking a shared library.
3945
# There doesn't appear to be a way to prevent this compiler from
3946
# explicitly linking system object files so we need to strip them
3947
# from the output so that they don't get included in the library
3949
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'
3952
if test "$GXX" = yes; then
3953
if test $with_gnu_ld = no; then
3956
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3959
_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'
3964
# FIXME: insert proper C++ library support
3965
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3971
case $cc_basename in
3974
_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'
3976
# Archives containing C++ object files must be created using
3977
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3978
# necessary to make sure instantiated templates are included
3980
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3983
if test "$GXX" = yes; then
3984
if test "$with_gnu_ld" = no; then
3985
_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'
3987
_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'
3990
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3993
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3994
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3997
case $cc_basename in
3999
# Kuck and Associates, Inc. (KAI) C++ Compiler
4001
# KCC will only create a shared library if the output file
4002
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4003
# to its proper name (with version) after linking.
4004
_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'
4005
_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'
4006
# Commands to make compiler produce verbose output that lists
4007
# what "hidden" libraries, object files and flags are used when
4008
# linking a shared library.
4010
# There doesn't appear to be a way to prevent this compiler from
4011
# explicitly linking system object files so we need to strip them
4012
# from the output so that they don't get included in the library
4014
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'
4016
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4017
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4019
# Archives containing C++ object files must be created using
4020
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4021
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4026
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4027
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4028
_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'
4029
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4030
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4031
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4035
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4036
_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'
4038
runpath_var=LD_RUN_PATH
4039
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4040
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4042
# Commands to make compiler produce verbose output that lists
4043
# what "hidden" libraries, object files and flags are used when
4044
# linking a shared library.
4046
# There doesn't appear to be a way to prevent this compiler from
4047
# explicitly linking system object files so we need to strip them
4048
# from the output so that they don't get included in the library
4050
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'
4055
# FIXME: insert proper C++ library support
4056
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4059
# FIXME: insert proper C++ library support
4060
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4063
case $cc_basename in
4065
# FIXME: insert proper C++ library support
4066
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4069
# FIXME: insert proper C++ library support
4070
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4074
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4075
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4076
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4078
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4079
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4080
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4082
# Workaround some broken pre-1.5 toolchains
4083
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4086
case $cc_basename in
4088
# Kuck and Associates, Inc. (KAI) C++ Compiler
4090
# KCC will only create a shared library if the output file
4091
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4092
# to its proper name (with version) after linking.
4093
_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'
4095
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4096
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4098
# Archives containing C++ object files must be created using
4099
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4100
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4104
# Rational C++ 2.4.1
4105
# FIXME: insert proper C++ library support
4106
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4109
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4110
_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'
4112
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4113
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4115
# Commands to make compiler produce verbose output that lists
4116
# what "hidden" libraries, object files and flags are used when
4117
# linking a shared library.
4119
# There doesn't appear to be a way to prevent this compiler from
4120
# explicitly linking system object files so we need to strip them
4121
# from the output so that they don't get included in the library
4123
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'
4126
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4127
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4128
_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'
4130
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4131
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4133
# Commands to make compiler produce verbose output that lists
4134
# what "hidden" libraries, object files and flags are used when
4135
# linking a shared library.
4136
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4139
# FIXME: insert proper C++ library support
4140
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4146
case $cc_basename in
4148
# Kuck and Associates, Inc. (KAI) C++ Compiler
4150
# KCC will only create a shared library if the output file
4151
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4152
# to its proper name (with version) after linking.
4153
_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'
4155
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4156
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4158
# Archives containing C++ object files must be created using
4159
# the KAI C++ compiler.
4160
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4163
# Rational C++ 2.4.1
4164
# FIXME: insert proper C++ library support
4165
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4168
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4169
_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'
4170
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4171
echo "-hidden">> $lib.exp~
4172
$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~
4175
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4176
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4178
# Commands to make compiler produce verbose output that lists
4179
# what "hidden" libraries, object files and flags are used when
4180
# linking a shared library.
4182
# There doesn't appear to be a way to prevent this compiler from
4183
# explicitly linking system object files so we need to strip them
4184
# from the output so that they don't get included in the library
4186
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'
4189
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4190
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4191
_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'
4193
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4194
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4196
# Commands to make compiler produce verbose output that lists
4197
# what "hidden" libraries, object files and flags are used when
4198
# linking a shared library.
4199
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4202
# FIXME: insert proper C++ library support
4203
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4209
# FIXME: insert proper C++ library support
4210
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4213
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4214
case $cc_basename in
4216
# FIXME: insert proper C++ library support
4217
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4220
# FIXME: insert proper C++ library support
4221
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4226
case $cc_basename in
4229
# FIXME: insert proper C++ library support
4230
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4234
# FIXME: insert proper C++ library support
4235
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4238
# FIXME: insert proper C++ library support
4239
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4244
case $cc_basename in
4246
# Sun C++ 4.2, 5.x and Centerline C++
4247
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4248
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4249
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4250
$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'
4252
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4253
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4255
solaris2.[0-5] | solaris2.[0-5].*) ;;
4257
# The C++ compiler is used as linker so we must use $wl
4258
# flag to pass the commands to the underlying system
4260
# Supported since Solaris 2.6 (maybe 2.5.1?)
4261
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4264
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4266
# Commands to make compiler produce verbose output that lists
4267
# what "hidden" libraries, object files and flags are used when
4268
# linking a shared library.
4270
# There doesn't appear to be a way to prevent this compiler from
4271
# explicitly linking system object files so we need to strip them
4272
# from the output so that they don't get included in the library
4274
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'
4276
# Archives containing C++ object files must be created using
4277
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4278
# necessary to make sure instantiated templates are included
4280
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4283
# Green Hills C++ Compiler
4284
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4286
# The C++ compiler must be used to create the archive.
4287
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4290
# GNU C++ compiler with Solaris linker
4291
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4292
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4293
if $CC --version | grep -v '^2\.7' > /dev/null; then
4294
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4295
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4296
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4298
# Commands to make compiler produce verbose output that lists
4299
# what "hidden" libraries, object files and flags are used when
4300
# linking a shared library.
4301
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4303
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4305
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4306
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4307
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4309
# Commands to make compiler produce verbose output that lists
4310
# what "hidden" libraries, object files and flags are used when
4311
# linking a shared library.
4312
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4315
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4320
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4321
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4324
case $cc_basename in
4326
# NonStop-UX NCC 3.20
4327
# FIXME: insert proper C++ library support
4328
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4331
# FIXME: insert proper C++ library support
4332
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4337
# FIXME: insert proper C++ library support
4338
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4341
# FIXME: insert proper C++ library support
4342
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4345
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4346
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4348
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4349
_LT_AC_TAGVAR(LD, $1)="$LD"
4351
AC_LIBTOOL_POSTDEP_PREDEP($1)
4352
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4353
AC_LIBTOOL_PROG_CC_C_O($1)
4354
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4355
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4356
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4357
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4358
AC_LIBTOOL_SYS_LIB_STRIP
4359
AC_LIBTOOL_DLOPEN_SELF($1)
4361
AC_LIBTOOL_CONFIG($1)
4368
with_gnu_ldcxx=$with_gnu_ld
4369
with_gnu_ld=$lt_save_with_gnu_ld
4370
lt_cv_path_LDCXX=$lt_cv_path_LD
4371
lt_cv_path_LD=$lt_save_path_LD
4372
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4373
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4374
])# AC_LIBTOOL_LANG_CXX_CONFIG
4376
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4377
# ------------------------
4378
# Figure out "hidden" library dependencies from verbose
4379
# compiler output when linking a shared library.
4380
# Parse the compiler output and extract the necessary
4381
# objects, libraries and library flags.
4382
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4383
dnl we can't use the lt_simple_compile_test_code here,
4384
dnl because it contains code intended for an executable,
4385
dnl not a library. It's possible we should let each
4386
dnl tag define a new lt_????_link_test_code variable,
4387
dnl but it's only used here...
4388
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4390
void foo (void) { a = 0; }
4392
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4396
Foo (void) { a = 0; }
4401
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4409
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4412
public void bar (void) {
4418
dnl Parse the compiler output and extract the necessary
4419
dnl objects, libraries and library flags.
4420
if AC_TRY_EVAL(ac_compile); then
4421
# Parse the compiler output and extract the necessary
4422
# objects, libraries and library flags.
4424
# Sentinel used to keep track of whether or not we are before
4425
# the conftest object file.
4426
pre_test_object_deps_done=no
4428
# The `*' in the case matches for architectures that use `case' in
4429
# $output_verbose_cmd can trigger glob expansion during the loop
4430
# eval without this substitution.
4431
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4433
for p in `eval $output_verbose_link_cmd`; do
4437
# Some compilers place space between "-{L,R}" and the path.
4440
|| test $p = "-R"; then
4447
if test "$pre_test_object_deps_done" = no; then
4450
# Internal compiler library paths should come after those
4451
# provided the user. The postdeps already come after the
4452
# user supplied libs so there is no need to process them.
4453
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4454
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4456
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4459
# The "-l" case would never come before the object being
4460
# linked, so don't bother handling this case.
4463
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4464
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4466
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4472
# This assumes that the test object file only shows up
4473
# once in the compiler output.
4474
if test "$p" = "conftest.$objext"; then
4475
pre_test_object_deps_done=yes
4479
if test "$pre_test_object_deps_done" = no; then
4480
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4481
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4483
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4486
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4487
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4489
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4494
*) ;; # Ignore the rest.
4502
echo "libtool.m4: error: problem compiling $1 test program"
4505
$rm -f confest.$objext
4507
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4508
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4510
])# AC_LIBTOOL_POSTDEP_PREDEP
4512
# AC_LIBTOOL_LANG_F77_CONFIG
4513
# ------------------------
4514
# Ensure that the configuration vars for the C compiler are
4515
# suitably defined. Those variables are subsequently used by
4516
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4517
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4518
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4519
[AC_REQUIRE([AC_PROG_F77])
4520
AC_LANG_PUSH(Fortran 77)
4522
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4523
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4524
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4525
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4526
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4527
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4528
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4529
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4530
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4531
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4532
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4533
_LT_AC_TAGVAR(module_cmds, $1)=
4534
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4535
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4536
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4537
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4538
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4539
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4541
# Source file extension for f77 test sources.
4544
# Object file extension for compiled f77 test sources.
4546
_LT_AC_TAGVAR(objext, $1)=$objext
4548
# Code to be used in simple compile tests
4549
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4551
# Code to be used in simple link tests
4552
lt_simple_link_test_code=" program t\n end\n"
4554
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4557
# Allow CC to be a program name with arguments.
4561
_LT_AC_TAGVAR(compiler, $1)=$CC
4562
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4564
AC_MSG_CHECKING([if libtool supports shared libraries])
4565
AC_MSG_RESULT([$can_build_shared])
4567
AC_MSG_CHECKING([whether to build shared libraries])
4568
test "$can_build_shared" = "no" && enable_shared=no
4570
# On AIX, shared libraries and static libraries use the same namespace, and
4571
# are all built from PIC.
4574
test "$enable_shared" = yes && enable_static=no
4575
if test -n "$RANLIB"; then
4576
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4577
postinstall_cmds='$RANLIB $lib'
4581
test "$enable_shared" = yes && enable_static=no
4584
AC_MSG_RESULT([$enable_shared])
4586
AC_MSG_CHECKING([whether to build static libraries])
4587
# Make sure either enable_shared or enable_static is yes.
4588
test "$enable_shared" = yes || enable_static=yes
4589
AC_MSG_RESULT([$enable_static])
4591
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4593
_LT_AC_TAGVAR(GCC, $1)="$G77"
4594
_LT_AC_TAGVAR(LD, $1)="$LD"
4596
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4597
AC_LIBTOOL_PROG_CC_C_O($1)
4598
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4599
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4600
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4601
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4602
AC_LIBTOOL_SYS_LIB_STRIP
4605
AC_LIBTOOL_CONFIG($1)
4609
])# AC_LIBTOOL_LANG_F77_CONFIG
4612
# AC_LIBTOOL_LANG_GCJ_CONFIG
4613
# --------------------------
4614
# Ensure that the configuration vars for the C compiler are
4615
# suitably defined. Those variables are subsequently used by
4616
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4617
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4618
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4621
# Source file extension for Java test sources.
4624
# Object file extension for compiled Java test sources.
4626
_LT_AC_TAGVAR(objext, $1)=$objext
4628
# Code to be used in simple compile tests
4629
lt_simple_compile_test_code="class foo {}\n"
4631
# Code to be used in simple link tests
4632
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4634
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4637
# Allow CC to be a program name with arguments.
4641
_LT_AC_TAGVAR(compiler, $1)=$CC
4643
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4644
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4646
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4647
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4648
AC_LIBTOOL_PROG_CC_C_O($1)
4649
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4650
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4651
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4652
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4653
AC_LIBTOOL_SYS_LIB_STRIP
4654
AC_LIBTOOL_DLOPEN_SELF($1)
4656
AC_LIBTOOL_CONFIG($1)
4660
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4663
# AC_LIBTOOL_LANG_RC_CONFIG
4664
# --------------------------
4665
# Ensure that the configuration vars for the Windows resource compiler are
4666
# suitably defined. Those variables are subsequently used by
4667
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4668
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4669
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4672
# Source file extension for RC test sources.
4675
# Object file extension for compiled RC test sources.
4677
_LT_AC_TAGVAR(objext, $1)=$objext
4679
# Code to be used in simple compile tests
4680
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4682
# Code to be used in simple link tests
4683
lt_simple_link_test_code="$lt_simple_compile_test_code"
4685
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4688
# Allow CC to be a program name with arguments.
4692
_LT_AC_TAGVAR(compiler, $1)=$CC
4693
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4695
AC_LIBTOOL_CONFIG($1)
4699
])# AC_LIBTOOL_LANG_RC_CONFIG
4702
# AC_LIBTOOL_CONFIG([TAGNAME])
4703
# ----------------------------
4704
# If TAGNAME is not passed, then create an initial libtool script
4705
# with a default configuration from the untagged config vars. Otherwise
4706
# add code to config.status for appending the configuration named by
4707
# TAGNAME from the matching tagged config vars.
4708
AC_DEFUN([AC_LIBTOOL_CONFIG],
4709
[# The else clause should only fire when bootstrapping the
3292
4710
# libtool distribution, otherwise you forgot to ship ltmain.sh
3293
4711
# with your package, and you will get complaints that there are
3294
4712
# no rules to generate ltmain.sh.
3295
4713
if test -f "$ltmain"; then
3298
# If there is no Makefile yet, we rely on a make rule to execute
3299
# `config.status --recheck' to rerun these tests and create the
3300
# libtool script then.
3301
test -f Makefile && make "$ltmain"
3304
if test -f "$ltmain"; then
3305
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3308
echo creating $ofile
4714
# See if we are running on zsh, and set the options which allow our commands through
4715
# without removal of \ escapes.
4716
if test -n "${ZSH_VERSION+set}" ; then
4717
setopt NO_GLOB_SUBST
3310
4719
# Now quote all the things that may contain metacharacters while being
3311
4720
# careful not to overquote the AC_SUBSTed values. We take copies of the
3312
4721
# variables and quote the copies for generation of the libtool script.
3313
for var in echo old_CC old_CFLAGS SED \
3314
AR AR_FLAGS CC LD LN_S NM SHELL \
3315
reload_flag reload_cmds wl \
3316
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3317
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3318
library_names_spec soname_spec \
3319
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3320
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3321
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3322
old_striplib striplib file_magic_cmd export_symbols_cmds \
3323
deplibs_check_method allow_undefined_flag no_undefined_flag \
3324
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3325
global_symbol_to_c_name_address \
3326
hardcode_libdir_flag_spec hardcode_libdir_separator \
4722
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4724
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4725
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4726
deplibs_check_method reload_flag reload_cmds need_locks \
4727
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4728
lt_cv_sys_global_symbol_to_c_name_address \
3327
4729
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3328
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4730
old_postinstall_cmds old_postuninstall_cmds \
4731
_LT_AC_TAGVAR(compiler, $1) \
4732
_LT_AC_TAGVAR(CC, $1) \
4733
_LT_AC_TAGVAR(LD, $1) \
4734
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4735
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4736
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4737
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4738
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4739
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4740
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4741
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4742
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4743
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4744
_LT_AC_TAGVAR(predep_objects, $1) \
4745
_LT_AC_TAGVAR(postdep_objects, $1) \
4746
_LT_AC_TAGVAR(predeps, $1) \
4747
_LT_AC_TAGVAR(postdeps, $1) \
4748
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4749
_LT_AC_TAGVAR(archive_cmds, $1) \
4750
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4751
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4752
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4753
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4754
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4755
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4756
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4757
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4758
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4759
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4760
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4761
_LT_AC_TAGVAR(module_cmds, $1) \
4762
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4763
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4764
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4765
_LT_AC_TAGVAR(include_expsyms, $1); do
3331
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4768
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4769
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4770
_LT_AC_TAGVAR(archive_cmds, $1) | \
4771
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4772
_LT_AC_TAGVAR(module_cmds, $1) | \
4773
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4774
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4775
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4776
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4777
postinstall_cmds | postuninstall_cmds | \
3332
4778
old_postinstall_cmds | old_postuninstall_cmds | \
3333
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3334
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3335
postinstall_cmds | postuninstall_cmds | \
3336
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4779
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3337
4780
# Double-quote double-evaled strings.
3338
4781
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3654
cygwin* | mingw* | pw32* | os2*)
3655
cat <<'EOF' >> "${ofile}T"
3656
# This is a source program that is used to create dlls on Windows
3657
# Don't remove nor modify the starting and closing comments
5165
# We use sed instead of cat because bash on DJGPP gets confused if
5166
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5167
# text mode, it properly converts lines to CR/LF. This bash problem
5168
# is reportedly fixed, but why not run on old versions too?
5169
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5171
mv -f "$cfgfile" "$ofile" || \
5172
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5176
# If there is no Makefile yet, we rely on a make rule to execute
5177
# `config.status --recheck' to rerun these tests and create the
5178
# libtool script then.
5179
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5180
if test -f "$ltmain_in"; then
5181
test -f Makefile && make "$ltmain"
5184
])# AC_LIBTOOL_CONFIG
5187
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5188
# -------------------------------------------
5189
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5190
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5192
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5194
if test "$GCC" = yes; then
5195
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5197
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5198
lt_cv_prog_compiler_rtti_exceptions,
5199
[-fno-rtti -fno-exceptions], [],
5200
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5202
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5205
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5206
# ---------------------------------
5207
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5208
[AC_REQUIRE([AC_CANONICAL_HOST])
5209
AC_REQUIRE([AC_PROG_NM])
5210
AC_REQUIRE([AC_OBJEXT])
5211
# Check for command to grab the raw symbol name followed by C symbol from nm.
5212
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5213
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5215
# These are sane defaults that work on at least a few old systems.
5216
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5218
# Character class describing NM global symbol codes.
5219
symcode='[[BCDEGRST]]'
5221
# Regexp to match symbols that can be accessed directly from C.
5222
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5224
# Transform the above into a raw symbol and a C symbol.
5225
symxfrm='\1 \2\3 \3'
5227
# Transform an extracted symbol line into a proper C declaration
5228
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5230
# Transform an extracted symbol line into symbol name and symbol address
5231
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'"
5233
# Define system-specific variables.
5238
cygwin* | mingw* | pw32*)
5239
symcode='[[ABCDGISTW]]'
5241
hpux*) # Its linker distinguishes data from code symbols
5242
if test "$host_cpu" = ia64; then
5243
symcode='[[ABCDEGRST]]'
5245
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5246
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'"
5249
symcode='[[BCDEGRST]]'
5252
symcode='[[BCDEGQRST]]'
5258
symcode='[[DFNSTU]]'
5262
# Handle CRLF in mingw tool chain
5266
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5270
# If we're using GNU nm, then use its standard symbol codes.
5271
case `$NM -V 2>&1` in
5272
*GNU* | *'with BFD'*)
5273
symcode='[[ABCDGIRSTW]]' ;;
5276
# Try without a prefix undercore, then with it.
5277
for ac_symprfx in "" "_"; do
5279
# Write the raw and C identifiers.
5280
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5282
# Check to see that the pipe works correctly.
5286
cat > conftest.$ac_ext <<EOF
5291
void nm_test_func(){}
5295
int main(){nm_test_var='a';nm_test_func();return(0);}
5298
if AC_TRY_EVAL(ac_compile); then
5299
# Now try to grab the symbols.
5301
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5302
# Try sorting and uniquifying the output.
5303
if sort "$nlist" | uniq > "$nlist"T; then
5304
mv -f "$nlist"T "$nlist"
5309
# Make sure that we snagged all the symbols we need.
5310
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5311
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5312
cat <<EOF > conftest.$ac_ext
5318
# Now generate the symbol file.
5319
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5321
cat <<EOF >> conftest.$ac_ext
5322
#if defined (__STDC__) && __STDC__
5323
# define lt_ptr_t void *
5325
# define lt_ptr_t char *
5329
/* The mapping between symbol names and symbols. */
5334
lt_preloaded_symbols[[]] =
5337
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5338
cat <<\EOF >> conftest.$ac_ext
5346
# Now try linking the two files.
5347
mv conftest.$ac_objext conftstm.$ac_objext
5348
lt_save_LIBS="$LIBS"
5349
lt_save_CFLAGS="$CFLAGS"
5350
LIBS="conftstm.$ac_objext"
5351
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5352
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5355
LIBS="$lt_save_LIBS"
5356
CFLAGS="$lt_save_CFLAGS"
5358
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5361
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5364
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5367
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5368
cat conftest.$ac_ext >&5
5370
rm -f conftest* conftst*
5372
# Do not use the global_symbol_pipe unless it works.
5373
if test "$pipe_works" = yes; then
5376
lt_cv_sys_global_symbol_pipe=
5380
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5381
lt_cv_sys_global_symbol_to_cdecl=
5383
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5384
AC_MSG_RESULT(failed)
5388
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5391
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5392
# ---------------------------------------
5393
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5394
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5395
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5396
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5398
AC_MSG_CHECKING([for $compiler option to produce PIC])
5400
# C++ specific cases for pic, static, wl, etc.
5401
if test "$GXX" = yes; then
5402
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5403
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5407
# All AIX code is PIC.
5408
if test "$host_cpu" = ia64; then
5409
# AIX 5 now supports IA64 processor
5410
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5414
# FIXME: we need at least 68020 code to build shared libraries, but
5415
# adding the `-m68020' flag to GCC prevents building anything better,
5417
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5419
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5420
# PIC is the default for these OSes.
5422
mingw* | os2* | pw32*)
5423
# This hack is so that the source file can tell whether it is being
5424
# built for inclusion in a dll (and should export symbols for example).
5425
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5427
darwin* | rhapsody*)
5428
# PIC is the default on this platform
5429
# Common symbols not allowed in MH_DYLIB files
5430
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5433
# DJGPP does not support shared libraries at all
5434
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5437
if test -d /usr/nec; then
5438
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5442
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5448
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5453
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5459
# All AIX code is PIC.
5460
if test "$host_cpu" = ia64; then
5461
# AIX 5 now supports IA64 processor
5462
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5464
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5468
case $cc_basename in
5470
# Green Hills C++ Compiler
5471
# _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"
5476
case $cc_basename in
5478
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5481
# Green Hills C++ Compiler
5482
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5488
freebsd* | kfreebsd*-gnu)
5489
# FreeBSD uses GNU C++
5491
hpux9* | hpux10* | hpux11*)
5492
case $cc_basename in
5494
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5495
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5496
if test "$host_cpu" != ia64; then
5497
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5501
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5502
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5508
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5516
irix5* | irix6* | nonstopux*)
5517
case $cc_basename in
5519
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5520
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5521
# CC pic flag -KPIC is the default.
5528
case $cc_basename in
5531
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5532
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5536
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5537
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5538
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5542
# Make sure the PIC flag is empty. It appears that all Alpha
5543
# Linux and Compaq Tru64 Unix objects are PIC.
5544
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5545
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5556
case $cc_basename in
5558
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5564
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5566
osf3* | osf4* | osf5*)
5567
case $cc_basename in
5569
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5572
# Rational C++ 2.4.1
5573
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5576
# Digital/Compaq C++
5577
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5578
# Make sure the PIC flag is empty. It appears that all Alpha
5579
# Linux and Compaq Tru64 Unix objects are PIC.
5580
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5581
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5590
case $cc_basename in
5592
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5599
case $cc_basename in
5601
# Sun C++ 4.2, 5.x and Centerline C++
5602
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5603
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5604
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5607
# Green Hills C++ Compiler
5608
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5615
case $cc_basename in
5618
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5619
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5623
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5630
case $cc_basename in
5632
# NonStop-UX NCC 3.20
5633
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5644
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5650
if test "$GCC" = yes; then
5651
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5652
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5656
# All AIX code is PIC.
5657
if test "$host_cpu" = ia64; then
5658
# AIX 5 now supports IA64 processor
5659
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5664
# FIXME: we need at least 68020 code to build shared libraries, but
5665
# adding the `-m68020' flag to GCC prevents building anything better,
5667
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5670
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5671
# PIC is the default for these OSes.
5674
mingw* | pw32* | os2*)
5675
# This hack is so that the source file can tell whether it is being
5676
# built for inclusion in a dll (and should export symbols for example).
5677
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5680
darwin* | rhapsody*)
5681
# PIC is the default on this platform
5682
# Common symbols not allowed in MH_DYLIB files
5683
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5687
# Just because we use GCC doesn't mean we suddenly get shared libraries
5688
# on systems that don't support them.
5689
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5694
if test -d /usr/nec; then
5695
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5700
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5707
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5713
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5717
# PORTME Check for flag to pass linker flags through the system compiler.
5720
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5721
if test "$host_cpu" = ia64; then
5722
# AIX 5 now supports IA64 processor
5723
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5725
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5729
mingw* | pw32* | os2*)
5730
# This hack is so that the source file can tell whether it is being
5731
# built for inclusion in a dll (and should export symbols for example).
5732
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5735
hpux9* | hpux10* | hpux11*)
5736
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5737
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5744
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5747
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5748
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5751
irix5* | irix6* | nonstopux*)
5752
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5753
# PIC (with -KPIC) is the default.
5754
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5758
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5759
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5765
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5766
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5767
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5770
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5771
# All Alpha code is PIC.
5772
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5777
osf3* | osf4* | osf5*)
5778
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5779
# All OSF/1 code is PIC.
5780
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5784
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5785
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5789
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5790
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5791
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5795
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5796
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5797
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5800
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5801
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5802
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5803
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5807
if test -d /usr/nec ;then
5808
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5809
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5814
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5815
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5819
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5824
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5827
# Check to make sure the PIC flag actually works.
5829
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5830
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5831
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5832
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5833
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5835
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5837
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5838
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5841
# For platforms which do not support PIC, -DPIC is meaningless:
5843
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5846
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5852
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5853
# ------------------------------------
5854
# See if the linker supports building shared libraries.
5855
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5856
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5858
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5861
# If we're using GNU nm, then we don't want the "-C" option.
5862
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5863
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5864
_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'
5866
_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'
5870
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5873
_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'
5876
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
5879
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5884
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5885
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5886
_LT_AC_TAGVAR(archive_cmds, $1)=
5887
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5888
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5889
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5890
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5891
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5892
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5893
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5894
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5895
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5896
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5897
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5898
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5899
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5900
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5901
_LT_AC_TAGVAR(module_cmds, $1)=
5902
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5903
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5904
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5905
# include_expsyms should be a list of space-separated symbols to be *always*
5906
# included in the symbol list
5907
_LT_AC_TAGVAR(include_expsyms, $1)=
5908
# exclude_expsyms can be an extended regexp of symbols to exclude
5909
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5910
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5911
# as well as any symbol that contains `d'.
5912
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5913
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5914
# platforms (ab)use it in PIC code, but their linkers get confused if
5915
# the symbol is explicitly referenced. Since portable code cannot
5916
# rely on this symbol name, it's probably fine to never include it in
5917
# preloaded symbol tables.
5918
extract_expsyms_cmds=
5921
cygwin* | mingw* | pw32*)
5922
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5923
# When not using gcc, we currently assume that we are using
5924
# Microsoft Visual C++.
5925
if test "$GCC" != yes; then
5934
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5935
if test "$with_gnu_ld" = yes; then
5936
# If archive_cmds runs LD, not CC, wlarc should be empty
5939
# See if GNU ld supports shared libraries.
5941
aix3* | aix4* | aix5*)
5942
# On AIX/PPC, the GNU linker is very broken
5943
if test "$host_cpu" != ia64; then
5944
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5947
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5948
*** to be unable to reliably create shared libraries on AIX.
5949
*** Therefore, libtool is disabling shared libraries support. If you
5950
*** really care for shared libraries, you may want to modify your PATH
5951
*** so that a non-GNU linker is found, and then restart.
5958
_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)'
5959
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5960
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5962
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5963
# that the semantics of dynamic libraries on AmigaOS, at least up
5964
# to version 4, is to share data among multiple programs linked
5965
# with the same dynamic library. Since this doesn't match the
5966
# behavior of shared libraries on other platforms, we can't use
5968
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5972
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5973
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5974
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5975
# support --undefined. This deserves some investigation. FIXME
5976
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5978
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5982
cygwin* | mingw* | pw32*)
5983
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5984
# as there is no search path for DLLs.
5985
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5986
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5987
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5988
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5989
_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'
5991
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5992
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5993
# If the export-symbols file already is a .def file (1st line
5994
# is EXPORTS), use it as is; otherwise, prepend...
5995
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5996
cp $export_symbols $output_objdir/$soname.def;
5998
echo EXPORTS > $output_objdir/$soname.def;
5999
cat $export_symbols >> $output_objdir/$soname.def;
6001
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6007
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6008
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6009
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6012
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6013
_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'
6018
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6019
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6022
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6023
*** create shared libraries on Solaris systems. Therefore, libtool
6024
*** is disabling shared libraries support. We urge you to upgrade GNU
6025
*** binutils to release 2.9.1 or newer. Another option is to modify
6026
*** your PATH or compiler configuration so that the native linker is
6027
*** used, and then restart.
6030
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6031
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6032
_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'
6034
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6039
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6041
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6042
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6046
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6047
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6048
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6049
supports_anon_versioning=no
6050
case `$LD -v 2>/dev/null` in
6051
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6052
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6053
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6054
*\ 2.11.*) ;; # other 2.11 versions
6055
*) supports_anon_versioning=yes ;;
6057
if test $supports_anon_versioning = yes; then
6058
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6059
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6060
$echo "local: *; };" >> $output_objdir/$libname.ver~
6061
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6063
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6065
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6067
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6072
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6073
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6074
_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'
6076
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6081
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6082
runpath_var=LD_RUN_PATH
6083
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6084
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6085
# ancient GNU ld didn't support --whole-archive et. al.
6086
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6087
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6089
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6093
# PORTME fill in a description of your system's linker (not GNU ld)
6096
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6097
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6098
_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'
6099
# Note: this linker hardcodes the directories in LIBPATH if there
6100
# are no directories specified by -L.
6101
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6102
if test "$GCC" = yes && test -z "$link_static_flag"; then
6103
# Neither direct hardcoding nor static linking is supported with a
6105
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6110
if test "$host_cpu" = ia64; then
6111
# On IA64, the linker does run time linking by default, so we don't
6112
# have to do anything special.
6113
aix_use_runtimelinking=no
6114
exp_sym_flag='-Bexport'
6117
# If we're using GNU nm, then we don't want the "-C" option.
6118
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6119
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6120
_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'
6122
_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'
6124
aix_use_runtimelinking=no
6126
# Test if we are trying to use run time linking or normal
6127
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6128
# need to do runtime linking.
6129
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6130
for ld_flag in $LDFLAGS; do
6131
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6132
aix_use_runtimelinking=yes
6138
exp_sym_flag='-bexport'
6139
no_entry_flag='-bnoentry'
6142
# When large executables or shared objects are built, AIX ld can
6143
# have problems creating the table of contents. If linking a library
6144
# or program results in "error TOC overflow" add -mminimal-toc to
6145
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6146
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6148
_LT_AC_TAGVAR(archive_cmds, $1)=''
6149
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6150
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6151
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6153
if test "$GCC" = yes; then
6154
case $host_os in aix4.[012]|aix4.[012].*)
6155
# We only want to do this on AIX 4.2 and lower, the check
6156
# below for broken collect2 doesn't work under 4.3+
6157
collect2name=`${CC} -print-prog-name=collect2`
6158
if test -f "$collect2name" && \
6159
strings "$collect2name" | grep resolve_lib_name >/dev/null
6161
# We have reworked collect2
6162
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6164
# We have old collect2
6165
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6166
# It fails to find uninstalled libraries when the uninstalled
6167
# path is not listed in the libpath. Setting hardcode_minus_L
6168
# to unsupported forces relinking
6169
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6170
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6171
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6174
shared_flag='-shared'
6177
if test "$host_cpu" = ia64; then
6178
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6179
# chokes on -Wl,-G. The following line is correct:
6182
if test "$aix_use_runtimelinking" = yes; then
6183
shared_flag='${wl}-G'
6185
shared_flag='${wl}-bM:SRE'
6190
# It seems that -bexpall does not export symbols beginning with
6191
# underscore (_), so it is better to generate a list of symbols to export.
6192
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6193
if test "$aix_use_runtimelinking" = yes; then
6194
# Warning - without using the other runtime loading flags (-brtl),
6195
# -berok will link without error, but may produce a broken library.
6196
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6197
# Determine the default libpath from the value encoded in an empty executable.
6198
_LT_AC_SYS_LIBPATH_AIX
6199
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6200
_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"
6202
if test "$host_cpu" = ia64; then
6203
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6204
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6205
_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"
6207
# Determine the default libpath from the value encoded in an empty executable.
6208
_LT_AC_SYS_LIBPATH_AIX
6209
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6210
# Warning - without using the other run time loading flags,
6211
# -berok will link without error, but may produce a broken library.
6212
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6213
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6214
# -bexpall does not export symbols beginning with underscore (_)
6215
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6216
# Exported symbols can be pulled into shared objects from archives
6217
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6218
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6219
# This is similar to how AIX traditionally builds it's shared libraries.
6220
_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'
6226
_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)'
6227
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6228
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6229
# see comment about different semantics on the GNU ld section
6230
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6234
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6237
cygwin* | mingw* | pw32*)
6238
# When not using gcc, we currently assume that we are using
6239
# Microsoft Visual C++.
6240
# hardcode_libdir_flag_spec is actually meaningless, as there is
6241
# no search path for DLLs.
6242
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6243
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6244
# Tell ltmain to make .lib files, not .a files.
6246
# Tell ltmain to make .dll files, not .so files.
6248
# FIXME: Setting linknames here is a bad hack.
6249
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6250
# The linker will automatically build a .lib file if we build a DLL.
6251
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6252
# FIXME: Should let the user specify the lib program.
6253
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6254
fix_srcfile_path='`cygpath -w "$srcfile"`'
6255
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6258
darwin* | rhapsody*)
6259
if test "$GXX" = yes ; then
6260
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6262
rhapsody* | darwin1.[[012]])
6263
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6266
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6267
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6269
case ${MACOSX_DEPLOYMENT_TARGET} in
6271
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6274
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6280
lt_int_apple_cc_single_mod=no
6281
output_verbose_link_cmd='echo'
6282
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6283
lt_int_apple_cc_single_mod=yes
6285
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6286
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6288
_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'
6290
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6291
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6292
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6293
_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}'
6295
_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}'
6297
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6298
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6299
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6300
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6301
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6302
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6304
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6309
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6310
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6311
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6315
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6318
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6319
# support. Future versions do this automatically, but an explicit c++rt0.o
6320
# does not break anything, and helps significantly (at the cost of a little
6323
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6324
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6325
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6326
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6329
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6331
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6332
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6333
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6334
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6337
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6338
freebsd* | kfreebsd*-gnu)
6339
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6340
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6341
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6342
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6346
if test "$GCC" = yes; then
6347
_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'
6349
_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'
6351
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6352
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6353
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6355
# hardcode_minus_L: Not really in the search PATH,
6356
# but as the default location of the library.
6357
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6358
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6362
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6365
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6368
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6374
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6377
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6381
if test "$with_gnu_ld" = no; then
6384
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6385
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6386
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6387
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6388
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6391
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6392
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6393
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6395
# hardcode_minus_L: Not really in the search PATH,
6396
# but as the default location of the library.
6397
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6400
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6401
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6402
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6403
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6405
# hardcode_minus_L: Not really in the search PATH,
6406
# but as the default location of the library.
6407
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6413
irix5* | irix6* | nonstopux*)
6414
if test "$GCC" = yes; then
6415
_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'
6417
_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'
6418
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6420
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6421
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6422
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6425
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6426
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6427
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6429
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6431
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6432
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6433
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6437
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6438
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6439
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6440
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6441
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6445
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6446
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6447
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6448
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6449
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6450
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6453
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6454
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6455
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6458
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6459
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6466
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6467
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6468
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6469
_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'
6470
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6474
if test "$GCC" = yes; then
6475
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6476
_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'
6478
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6479
_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'
6481
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6482
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6485
osf4* | osf5*) # as osf3* with the addition of -msym flag
6486
if test "$GCC" = yes; then
6487
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6488
_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'
6489
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6491
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6492
_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'
6493
_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~
6494
$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'
6496
# Both c and cxx compiler support -rpath directly
6497
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6499
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6503
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6504
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6505
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6506
runpath_var=LD_RUN_PATH
6507
hardcode_runpath_var=yes
6511
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6512
if test "$GCC" = yes; then
6513
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6514
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6515
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6517
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6518
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6519
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6521
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6522
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6524
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6525
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
6526
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6528
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6532
if test "x$host_vendor" = xsequent; then
6533
# Use $CC to link under sequent, because it throws in some extra .o
6534
# files that make .init and .fini sections work.
6535
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6537
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6539
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6540
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6541
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6542
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6546
case $host_vendor in
6548
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6549
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6552
## LD is ld it makes a PLAMLIB
6553
## CC just makes a GrossModule.
6554
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6555
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6556
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6559
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6560
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6563
runpath_var='LD_RUN_PATH'
6564
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6568
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6569
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6570
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6574
if test -d /usr/nec; then
6575
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6576
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6577
runpath_var=LD_RUN_PATH
6578
hardcode_runpath_var=yes
6579
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6584
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6585
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6586
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6587
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6588
hardcode_runpath_var=yes
6589
runpath_var=LD_RUN_PATH
6592
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6593
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6594
if test "$GCC" = yes; then
6595
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6597
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6599
runpath_var='LD_RUN_PATH'
6600
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6604
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6605
# $CC -shared without GNU ld will not create a library from C++
6606
# object files and a static libstdc++, better avoid it by now
6607
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6608
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6609
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6610
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6611
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6612
runpath_var='LD_RUN_PATH'
6616
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6617
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6618
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6622
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6627
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6628
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6630
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6631
if test "$GCC" = yes; then
6632
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6636
# Do we need to explicitly link libc?
6638
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6640
# Assume -lc should be added
6641
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6643
if test "$enable_shared" = yes && test "$GCC" = yes; then
6644
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6646
# FIXME: we may have to deal with multi-command sequences.
6649
# Test whether the compiler implicitly links with -lc since on some
6650
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6651
# to ld, don't add -lc before -lgcc.
6652
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6654
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6656
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6659
libobjs=conftest.$ac_objext
6661
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6667
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6668
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6669
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6671
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6673
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6675
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6677
cat conftest.err 1>&5
6680
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6686
])# AC_LIBTOOL_PROG_LD_SHLIBS
6689
# _LT_AC_FILE_LTDLL_C
6690
# -------------------
6691
# Be careful that the start marker always follows a newline.
6692
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3658
6693
# /* ltdll.c starts here */
3659
6694
# #define WIN32_LEAN_AND_MEAN
3660
6695
# #include <windows.h>
3690
6725
# /* ltdll.c ends here */
3691
# This is a source program that is used to create import libraries
3692
# on Windows for dlls which lack them. Don't remove nor modify the
3693
# starting and closing comments
3694
# /* impgen.c starts here */
3695
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3697
# This file is part of GNU libtool.
3699
# This program is free software; you can redistribute it and/or modify
3700
# it under the terms of the GNU General Public License as published by
3701
# the Free Software Foundation; either version 2 of the License, or
3702
# (at your option) any later version.
3704
# This program is distributed in the hope that it will be useful,
3705
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3706
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3707
# GNU General Public License for more details.
3709
# You should have received a copy of the GNU General Public License
3710
# along with this program; if not, write to the Free Software
3711
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3714
# #include <stdio.h> /* for printf() */
3715
# #include <unistd.h> /* for open(), lseek(), read() */
3716
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3717
# #include <string.h> /* for strdup() */
3719
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3721
# #define O_BINARY 0
3724
# static unsigned int
3725
# pe_get16 (fd, offset)
3729
# unsigned char b[2];
3730
# lseek (fd, offset, SEEK_SET);
3732
# return b[0] + (b[1]<<8);
3735
# static unsigned int
3736
# pe_get32 (fd, offset)
3740
# unsigned char b[4];
3741
# lseek (fd, offset, SEEK_SET);
3743
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3746
# static unsigned int
3750
# unsigned char *b = ptr;
3751
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3760
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3761
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3762
# unsigned long name_rvas, nexp;
3763
# unsigned char *expdata, *erva;
3764
# char *filename, *dll_name;
3766
# filename = argv[1];
3768
# dll = open(filename, O_RDONLY|O_BINARY);
3772
# dll_name = filename;
3774
# for (i=0; filename[i]; i++)
3775
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3776
# dll_name = filename + i +1;
3778
# pe_header_offset = pe_get32 (dll, 0x3c);
3779
# opthdr_ofs = pe_header_offset + 4 + 20;
3780
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3782
# if (num_entries < 1) /* no exports */
3785
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3786
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3787
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3788
# secptr = (pe_header_offset + 4 + 20 +
3789
# pe_get16 (dll, pe_header_offset + 4 + 16));
3792
# for (i = 0; i < nsections; i++)
3795
# unsigned long secptr1 = secptr + 40 * i;
3796
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3797
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3798
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3799
# lseek(dll, secptr1, SEEK_SET);
3800
# read(dll, sname, 8);
3801
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3803
# expptr = fptr + (export_rva - vaddr);
3804
# if (export_rva + export_size > vaddr + vsize)
3805
# export_size = vsize - (export_rva - vaddr);
3810
# expdata = (unsigned char*)malloc(export_size);
3811
# lseek (dll, expptr, SEEK_SET);
3812
# read (dll, expdata, export_size);
3813
# erva = expdata - export_rva;
3815
# nexp = pe_as32 (expdata+24);
3816
# name_rvas = pe_as32 (expdata+32);
3818
# printf ("EXPORTS\n");
3819
# for (i = 0; i<nexp; i++)
3821
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3822
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3827
# /* impgen.c ends here */
3833
# We use sed instead of cat because bash on DJGPP gets confused if
3834
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3835
# text mode, it properly converts lines to CR/LF. This bash problem
3836
# is reportedly fixed, but why not run on old versions too?
3837
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3839
mv -f "${ofile}T" "$ofile" || \
3840
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3844
])# _LT_AC_LTCONFIG_HACK
3846
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3847
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3849
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3850
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3852
# AC_ENABLE_SHARED - implement the --enable-shared flag
3853
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3854
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3856
AC_DEFUN([AC_ENABLE_SHARED],
3857
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3858
AC_ARG_ENABLE(shared,
3859
changequote(<<, >>)dnl
3860
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3861
changequote([, ])dnl
3862
[p=${PACKAGE-default}
3864
yes) enable_shared=yes ;;
3865
no) enable_shared=no ;;
3868
# Look at the argument we got. We use all the common list separators.
3869
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3870
for pkg in $enableval; do
3871
if test "X$pkg" = "X$p"; then
3878
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3881
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3882
AC_DEFUN([AC_DISABLE_SHARED],
3883
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3884
AC_ENABLE_SHARED(no)])
3886
# AC_ENABLE_STATIC - implement the --enable-static flag
3887
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3888
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3890
AC_DEFUN([AC_ENABLE_STATIC],
3891
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3892
AC_ARG_ENABLE(static,
3893
changequote(<<, >>)dnl
3894
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3895
changequote([, ])dnl
3896
[p=${PACKAGE-default}
3898
yes) enable_static=yes ;;
3899
no) enable_static=no ;;
3902
# Look at the argument we got. We use all the common list separators.
3903
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3904
for pkg in $enableval; do
3905
if test "X$pkg" = "X$p"; then
3912
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3915
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3916
AC_DEFUN([AC_DISABLE_STATIC],
3917
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3918
AC_ENABLE_STATIC(no)])
3921
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3922
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3923
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3925
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3926
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3927
AC_ARG_ENABLE(fast-install,
3928
changequote(<<, >>)dnl
3929
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3930
changequote([, ])dnl
3931
[p=${PACKAGE-default}
3933
yes) enable_fast_install=yes ;;
3934
no) enable_fast_install=no ;;
3936
enable_fast_install=no
3937
# Look at the argument we got. We use all the common list separators.
3938
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3939
for pkg in $enableval; do
3940
if test "X$pkg" = "X$p"; then
3941
enable_fast_install=yes
3947
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3950
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3951
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3952
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3953
AC_ENABLE_FAST_INSTALL(no)])
3955
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3956
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3957
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3959
AC_DEFUN([AC_LIBTOOL_PICMODE],
3960
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3961
pic_mode=ifelse($#,1,$1,default)])
3964
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3965
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3966
[AC_MSG_CHECKING([for $1])
3967
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3970
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3973
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3976
ac_save_MAGIC_CMD="$MAGIC_CMD"
3977
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3978
dnl $ac_dummy forces splitting on constant user-supplied paths.
3979
dnl POSIX.2 word splitting is done only on the output of word expansions,
3980
dnl not every word. This closes a longstanding sh security hole.
3981
ac_dummy="ifelse([$2], , $PATH, [$2])"
3982
for ac_dir in $ac_dummy; do
3983
test -z "$ac_dir" && ac_dir=.
3984
if test -f $ac_dir/$1; then
3985
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3986
if test -n "$file_magic_test_file"; then
3987
case $deplibs_check_method in
3989
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3990
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3991
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3992
egrep "$file_magic_regex" > /dev/null; then
3997
*** Warning: the command libtool uses to detect shared libraries,
3998
*** $file_magic_cmd, produces output that libtool cannot recognize.
3999
*** The result is that libtool may fail to recognize shared libraries
4000
*** as such. This will affect the creation of libtool libraries that
4001
*** depend on shared libraries, but programs linked with such libtool
4002
*** libraries will work regardless of this problem. Nevertheless, you
4003
*** may want to report the problem to your system manager and/or to
4004
*** bug-libtool@gnu.org
4014
MAGIC_CMD="$ac_save_MAGIC_CMD"
4017
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4018
if test -n "$MAGIC_CMD"; then
4019
AC_MSG_RESULT($MAGIC_CMD)
4026
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4027
AC_DEFUN([AC_PATH_MAGIC],
4028
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4029
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4030
if test -z "$lt_cv_path_MAGIC_CMD"; then
4031
if test -n "$ac_tool_prefix"; then
4032
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4040
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4041
AC_DEFUN([AC_PROG_LD],
4042
[AC_ARG_WITH(gnu-ld,
4043
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4044
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4045
AC_REQUIRE([AC_PROG_CC])dnl
4046
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4047
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4048
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4050
if test "$GCC" = yes; then
4051
# Check if gcc -print-prog-name=ld gives a path.
4052
AC_MSG_CHECKING([for ld used by GCC])
4055
# gcc leaves a trailing carriage return which upsets mingw
4056
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4058
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4061
# Accept absolute paths.
4062
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4063
re_direlt='/[[^/]][[^/]]*/\.\./'
4064
# Canonicalize the path of ld
4065
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4066
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4067
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4069
test -z "$LD" && LD="$ac_prog"
4072
# If it fails, then pretend we aren't using GCC.
4076
# If it is relative, then search for the first ld in PATH.
4080
elif test "$with_gnu_ld" = yes; then
4081
AC_MSG_CHECKING([for GNU ld])
4083
AC_MSG_CHECKING([for non-GNU ld])
4085
AC_CACHE_VAL(lt_cv_path_LD,
4086
[if test -z "$LD"; then
4087
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4088
for ac_dir in $PATH; do
4089
test -z "$ac_dir" && ac_dir=.
4090
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4091
lt_cv_path_LD="$ac_dir/$ac_prog"
4092
# Check to see if the program is GNU ld. I'd rather use --version,
4093
# but apparently some GNU ld's only accept -v.
4094
# Break only if it was the GNU/non-GNU ld that we prefer.
4095
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4096
test "$with_gnu_ld" != no && break
4098
test "$with_gnu_ld" != yes && break
4104
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4107
if test -n "$LD"; then
4112
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4117
AC_DEFUN([AC_PROG_LD_GNU],
4118
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4119
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4120
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4121
lt_cv_prog_gnu_ld=yes
4123
lt_cv_prog_gnu_ld=no
4125
with_gnu_ld=$lt_cv_prog_gnu_ld
4128
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4129
# -- PORTME Some linkers may need a different reload flag.
4130
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4131
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4132
[lt_cv_ld_reload_flag='-r'])
4133
reload_flag=$lt_cv_ld_reload_flag
4134
test -n "$reload_flag" && reload_flag=" $reload_flag"
4137
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4138
# -- PORTME fill in with the dynamic library characteristics
4139
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4140
[AC_CACHE_CHECK([how to recognise dependent libraries],
4141
lt_cv_deplibs_check_method,
4142
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4143
lt_cv_file_magic_test_file=
4144
lt_cv_deplibs_check_method='unknown'
4145
# Need to set the preceding variable on all platforms that support
4146
# interlibrary dependencies.
4147
# 'none' -- dependencies not supported.
4148
# `unknown' -- same as none, but documents that we really don't know.
4149
# 'pass_all' -- all dependencies passed with no checks.
4150
# 'test_compile' -- check by making test program.
4151
# 'file_magic [[regex]]' -- check by looking for files in library path
4152
# which responds to the $file_magic_cmd with a given egrep regex.
4153
# If you have `file' or equivalent on your system and you're not sure
4154
# whether `pass_all' will *always* work, you probably want this one.
4158
lt_cv_deplibs_check_method=pass_all
4162
lt_cv_deplibs_check_method=pass_all
4166
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4167
lt_cv_file_magic_cmd='/usr/bin/file -L'
4168
lt_cv_file_magic_test_file=/shlib/libc.so
4171
cygwin* | mingw* | pw32*)
4172
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4173
lt_cv_file_magic_cmd='$OBJDUMP -f'
4176
darwin* | rhapsody*)
4177
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4178
lt_cv_file_magic_cmd='/usr/bin/file -L'
4180
rhapsody* | darwin1.[[012]])
4181
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4184
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4190
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4193
# Not sure whether the presence of OpenBSD here was a mistake.
4194
# Let's accept both of them until this is cleared up.
4195
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4196
lt_cv_file_magic_cmd=/usr/bin/file
4197
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4201
lt_cv_deplibs_check_method=pass_all
4206
lt_cv_deplibs_check_method=pass_all
4210
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4211
lt_cv_file_magic_cmd=/usr/bin/file
4212
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4215
irix5* | irix6* | nonstopux*)
4217
irix5* | nonstopux*)
4218
# this will be overridden with pass_all, but let us keep it just in case
4219
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4223
*-32|*"-32 ") libmagic=32-bit;;
4224
*-n32|*"-n32 ") libmagic=N32;;
4225
*-64|*"-64 ") libmagic=64-bit;;
4226
*) libmagic=never-match;;
4228
# this will be overridden with pass_all, but let us keep it just in case
4229
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4232
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4233
lt_cv_deplibs_check_method=pass_all
4236
# This must be Linux ELF.
4239
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4240
lt_cv_deplibs_check_method=pass_all ;;
4242
# glibc up to 2.1.1 does not perform some relocations on ARM
4243
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4245
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4249
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4250
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4252
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4257
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4258
lt_cv_file_magic_cmd=/usr/bin/file
4259
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4263
lt_cv_file_magic_cmd=/usr/bin/file
4264
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4265
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4266
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4268
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4272
osf3* | osf4* | osf5*)
4273
# this will be overridden with pass_all, but let us keep it just in case
4274
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4275
lt_cv_file_magic_test_file=/shlib/libc.so
4276
lt_cv_deplibs_check_method=pass_all
4280
lt_cv_deplibs_check_method=pass_all
4284
lt_cv_deplibs_check_method=pass_all
4285
lt_cv_file_magic_test_file=/lib/libc.so
4288
sysv5uw[[78]]* | sysv4*uw2*)
4289
lt_cv_deplibs_check_method=pass_all
4292
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4293
case $host_vendor in
4295
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4296
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4299
lt_cv_deplibs_check_method=pass_all
4302
lt_cv_file_magic_cmd='/bin/file'
4303
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4306
lt_cv_file_magic_cmd='/bin/file'
4307
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4308
lt_cv_file_magic_test_file=/lib/libc.so
4311
lt_cv_deplibs_check_method=pass_all
4317
file_magic_cmd=$lt_cv_file_magic_cmd
4318
deplibs_check_method=$lt_cv_deplibs_check_method
4322
# AC_PROG_NM - find the path to a BSD-compatible name lister
4323
AC_DEFUN([AC_PROG_NM],
4324
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4325
AC_MSG_CHECKING([for BSD-compatible nm])
4326
AC_CACHE_VAL(lt_cv_path_NM,
4327
[if test -n "$NM"; then
4328
# Let the user override the test.
4331
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4332
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4333
test -z "$ac_dir" && ac_dir=.
4334
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4335
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4336
# Check to see if the nm accepts a BSD-compat flag.
4337
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4338
# nm: unknown option "B" ignored
4339
# Tru64's nm complains that /dev/null is an invalid object file
4340
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4341
lt_cv_path_NM="$tmp_nm -B"
4343
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4344
lt_cv_path_NM="$tmp_nm -p"
4347
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4348
continue # so that we can try to find one that supports BSD flags
4353
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4356
AC_MSG_RESULT([$NM])
4359
# AC_CHECK_LIBM - check for math library
4360
AC_DEFUN([AC_CHECK_LIBM],
4361
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4364
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4365
# These system don't have libm
4368
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4369
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4372
AC_CHECK_LIB(m, main, LIBM="-lm")
4377
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4378
# the libltdl convenience library and LTDLINCL to the include flags for
4379
# the libltdl header and adds --enable-ltdl-convenience to the
4380
# configure arguments. Note that LIBLTDL and LTDLINCL are not
4381
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4382
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4383
# with '${top_builddir}/' and LTDLINCL will be prefixed with
4384
# '${top_srcdir}/' (note the single quotes!). If your package is not
4385
# flat and you're not using automake, define top_builddir and
4386
# top_srcdir appropriately in the Makefiles.
4387
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4388
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4389
case $enable_ltdl_convenience in
4390
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4391
"") enable_ltdl_convenience=yes
4392
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4394
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4395
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4396
# For backwards non-gettext consistent compatibility...
4400
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4401
# the libltdl installable library and LTDLINCL to the include flags for
4402
# the libltdl header and adds --enable-ltdl-install to the configure
4403
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4404
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4405
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4406
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4407
# with '${top_srcdir}/' (note the single quotes!). If your package is
4408
# not flat and you're not using automake, define top_builddir and
4409
# top_srcdir appropriately in the Makefiles.
4410
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4411
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4412
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4413
AC_CHECK_LIB(ltdl, main,
4414
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4415
[if test x"$enable_ltdl_install" = xno; then
4416
AC_MSG_WARN([libltdl not installed, but installation disabled])
4418
enable_ltdl_install=yes
4421
if test x"$enable_ltdl_install" = x"yes"; then
4422
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4423
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4424
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4426
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4430
# For backwards non-gettext consistent compatibility...
6726
])# _LT_AC_FILE_LTDLL_C
6729
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6730
# ---------------------------------
6731
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4435
6735
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4456
6766
AC_CACHE_VAL(lt_cv_path_SED,
4457
6767
[# Loop through the user's path and test for sed and gsed.
4458
6768
# Then use that list of sed's as ones to test for truncation.
4459
as_executable_p="test -f"
4460
6769
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461
6770
for as_dir in $PATH
4463
6772
IFS=$as_save_IFS
4464
6773
test -z "$as_dir" && as_dir=.
4465
for ac_prog in sed gsed; do
6774
for lt_ac_prog in sed gsed; do
4466
6775
for ac_exec_ext in '' $ac_executable_extensions; do
4467
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4468
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
6776
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6777
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4474
# Create a temporary directory, and hook for its removal unless debugging.
4477
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4478
trap '{ (exit 1); exit 1; }' 1 2 13 15
4481
# Create a (secure) tmp directory for tmp files.
4484
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4485
test -n "$tmp" && test -d "$tmp"
4488
tmp=$TMPDIR/sed$$-$RANDOM
4489
(umask 077 && mkdir $tmp)
4492
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4493
{ (exit 1); exit 1; }
4497
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
4498
# along with /bin/sed that truncates output.
4499
for _sed in $_sed_list /usr/xpg4/bin/sed; do
4500
test ! -f ${_sed} && break
4501
cat /dev/null > "$tmp/sed.in"
4503
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4504
# Check for GNU sed and select it if it is found.
4505
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4506
lt_cv_path_SED=${_sed}
6784
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6785
# along with /bin/sed that truncates output.
6786
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6787
test ! -f $lt_ac_sed && break
6788
cat /dev/null > conftest.in
6790
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6791
# Check for GNU sed and select it if it is found.
6792
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6793
lt_cv_path_SED=$lt_ac_sed
6797
cat conftest.in conftest.in >conftest.tmp
6798
mv conftest.tmp conftest.in
6799
cp conftest.in conftest.nl
6801
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6802
cmp -s conftest.out conftest.nl || break
6803
# 10000 chars as input seems more than enough
6804
test $lt_ac_count -gt 10 && break
6805
lt_ac_count=`expr $lt_ac_count + 1`
6806
if test $lt_ac_count -gt $lt_ac_max; then
6807
lt_ac_max=$lt_ac_count
6808
lt_cv_path_SED=$lt_ac_sed
4510
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4511
mv "$tmp/sed.tmp" "$tmp/sed.in"
4512
cp "$tmp/sed.in" "$tmp/sed.nl"
4513
echo >>"$tmp/sed.nl"
4514
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4515
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4516
# 40000 chars as input seems more than enough
4517
test $_count -gt 10 && break
4518
_count=`expr $_count + 1`
4519
if test $_count -gt $_max; then
4521
lt_cv_path_SED=$_sed
4527
if test "X$SED" != "X"; then
4532
6814
AC_MSG_RESULT([$SED])
6817
# gettext.m4 serial 28 (gettext-0.13)
6818
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
6819
dnl This file is free software, distributed under the terms of the GNU
6820
dnl General Public License. As a special exception to the GNU General
6821
dnl Public License, this file may be distributed as part of a program
6822
dnl that contains a configuration script generated by Autoconf, under
6823
dnl the same distribution terms as the rest of that program.
6825
dnl This file can can be used in projects which are not available under
6826
dnl the GNU General Public License or the GNU Library General Public
6827
dnl License but which still want to provide support for the GNU gettext
6829
dnl Please note that the actual code of the GNU gettext library is covered
6830
dnl by the GNU Library General Public License, and the rest of the GNU
6831
dnl gettext package package is covered by the GNU General Public License.
6832
dnl They are *not* in the public domain.
6835
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
6836
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
6838
dnl Macro to add for using GNU gettext.
6840
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
6841
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
6842
dnl default (if it is not specified or empty) is 'no-libtool'.
6843
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
6844
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
6845
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
6846
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
6847
dnl depending on --{enable,disable}-{shared,static} and on the presence of
6848
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
6849
dnl $(top_builddir)/intl/libintl.a will be created.
6850
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
6851
dnl implementations (in libc or libintl) without the ngettext() function
6852
dnl will be ignored. If NEEDSYMBOL is specified and is
6853
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
6854
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
6855
dnl INTLDIR is used to find the intl libraries. If empty,
6856
dnl the value `$(top_builddir)/intl/' is used.
6858
dnl The result of the configuration is one of three cases:
6859
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
6861
dnl Catalog format: GNU --> install in $(datadir)
6862
dnl Catalog extension: .mo after installation, .gmo in source tree
6863
dnl 2) GNU gettext has been found in the system's C library.
6864
dnl Catalog format: GNU --> install in $(datadir)
6865
dnl Catalog extension: .mo after installation, .gmo in source tree
6866
dnl 3) No internationalization, always use English msgid.
6867
dnl Catalog format: none
6868
dnl Catalog extension: none
6869
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
6870
dnl The use of .gmo is historical (it was needed to avoid overwriting the
6871
dnl GNU format catalogs when building on a platform with an X/Open gettext),
6872
dnl but we keep it in order not to force irrelevant filename changes on the
6875
AC_DEFUN([AM_GNU_GETTEXT],
6877
dnl Argument checking.
6878
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
6879
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
6881
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
6882
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
6884
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
6885
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
6887
AC_REQUIRE([AM_PO_SUBDIRS])dnl
6888
ifelse(gt_included_intl, yes, [
6889
AC_REQUIRE([AM_INTL_SUBDIR])dnl
6892
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
6893
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6894
AC_REQUIRE([AC_LIB_RPATH])
6896
dnl Sometimes libintl requires libiconv, so first search for libiconv.
6897
dnl Ideally we would do this search only after the
6898
dnl if test "$USE_NLS" = "yes"; then
6899
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
6900
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
6901
dnl the configure script would need to contain the same shell code
6902
dnl again, outside any 'if'. There are two solutions:
6903
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
6904
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
6905
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
6906
dnl documented, we avoid it.
6907
ifelse(gt_included_intl, yes, , [
6908
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
6914
ifelse(gt_included_intl, yes, [
6915
BUILD_INCLUDED_LIBINTL=no
6916
USE_INCLUDED_LIBINTL=no
6922
dnl If we use NLS figure out what method
6923
if test "$USE_NLS" = "yes"; then
6924
gt_use_preinstalled_gnugettext=no
6925
ifelse(gt_included_intl, yes, [
6926
AC_MSG_CHECKING([whether included gettext is requested])
6927
AC_ARG_WITH(included-gettext,
6928
[ --with-included-gettext use the GNU gettext library included here],
6929
nls_cv_force_use_gnu_gettext=$withval,
6930
nls_cv_force_use_gnu_gettext=no)
6931
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
6933
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6934
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6936
dnl User does not insist on using GNU NLS library. Figure out what
6937
dnl to use. If GNU gettext is available we use this. Else we have
6938
dnl to fall back to GNU NLS library.
6940
dnl Add a version number to the cache macros.
6941
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
6942
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
6943
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
6945
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
6946
[AC_TRY_LINK([#include <libintl.h>
6947
]ifelse([$2], [need-formatstring-macros],
6948
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
6949
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
6952
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
6954
], [])[extern int _nl_msg_cat_cntr;
6955
extern int *_nl_domain_bindings;],
6956
[bindtextdomain ("", "");
6957
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
6958
gt_cv_func_gnugettext_libc=yes,
6959
gt_cv_func_gnugettext_libc=no)])
6961
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
6962
dnl Sometimes libintl requires libiconv, so first search for libiconv.
6963
ifelse(gt_included_intl, yes, , [
6966
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
6967
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
6968
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
6969
dnl even if libiconv doesn't exist.
6970
AC_LIB_LINKFLAGS_BODY([intl])
6971
AC_CACHE_CHECK([for GNU gettext in libintl],
6972
gt_cv_func_gnugettext_libintl,
6973
[gt_save_CPPFLAGS="$CPPFLAGS"
6974
CPPFLAGS="$CPPFLAGS $INCINTL"
6975
gt_save_LIBS="$LIBS"
6976
LIBS="$LIBS $LIBINTL"
6977
dnl Now see whether libintl exists and does not depend on libiconv.
6978
AC_TRY_LINK([#include <libintl.h>
6979
]ifelse([$2], [need-formatstring-macros],
6980
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
6981
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
6984
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
6986
], [])[extern int _nl_msg_cat_cntr;
6991
const char *_nl_expand_alias ();],
6992
[bindtextdomain ("", "");
6993
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
6994
gt_cv_func_gnugettext_libintl=yes,
6995
gt_cv_func_gnugettext_libintl=no)
6996
dnl Now see whether libintl exists and depends on libiconv.
6997
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
6998
LIBS="$LIBS $LIBICONV"
6999
AC_TRY_LINK([#include <libintl.h>
7000
]ifelse([$2], [need-formatstring-macros],
7001
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7002
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7005
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7007
], [])[extern int _nl_msg_cat_cntr;
7012
const char *_nl_expand_alias ();],
7013
[bindtextdomain ("", "");
7014
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
7015
[LIBINTL="$LIBINTL $LIBICONV"
7016
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
7017
gt_cv_func_gnugettext_libintl=yes
7020
CPPFLAGS="$gt_save_CPPFLAGS"
7021
LIBS="$gt_save_LIBS"])
7024
dnl If an already present or preinstalled GNU gettext() is found,
7025
dnl use it. But if this macro is used in GNU gettext, and GNU
7026
dnl gettext is already preinstalled in libintl, we update this
7027
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
7028
if test "$gt_cv_func_gnugettext_libc" = "yes" \
7029
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
7030
&& test "$PACKAGE" != gettext-runtime \
7031
&& test "$PACKAGE" != gettext-tools; }; then
7032
gt_use_preinstalled_gnugettext=yes
7034
dnl Reset the values set by searching for libintl.
7040
ifelse(gt_included_intl, yes, [
7041
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
7042
dnl GNU gettext is not found in the C library.
7043
dnl Fall back on included GNU gettext library.
7044
nls_cv_use_gnu_gettext=yes
7048
if test "$nls_cv_use_gnu_gettext" = "yes"; then
7049
dnl Mark actions used to generate GNU NLS library.
7050
BUILD_INCLUDED_LIBINTL=yes
7051
USE_INCLUDED_LIBINTL=yes
7052
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
7053
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
7054
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7057
if test "$gt_use_preinstalled_gnugettext" = "yes" \
7058
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
7059
dnl Mark actions to use GNU gettext tools.
7064
if test "$gt_use_preinstalled_gnugettext" = "yes" \
7065
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
7066
AC_DEFINE(ENABLE_NLS, 1,
7067
[Define to 1 if translation of program messages to the user's native language
7074
AC_MSG_CHECKING([whether to use NLS])
7075
AC_MSG_RESULT([$USE_NLS])
7076
if test "$USE_NLS" = "yes"; then
7077
AC_MSG_CHECKING([where the gettext function comes from])
7078
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7079
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7080
gt_source="external libintl"
7085
gt_source="included intl directory"
7087
AC_MSG_RESULT([$gt_source])
7090
if test "$USE_NLS" = "yes"; then
7092
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7093
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7094
AC_MSG_CHECKING([how to link with libintl])
7095
AC_MSG_RESULT([$LIBINTL])
7096
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
7099
dnl For backward compatibility. Some packages may be using this.
7100
AC_DEFINE(HAVE_GETTEXT, 1,
7101
[Define if the GNU gettext() function is already present or preinstalled.])
7102
AC_DEFINE(HAVE_DCGETTEXT, 1,
7103
[Define if the GNU dcgettext() function is already present or preinstalled.])
7106
dnl We need to process the po/ directory.
7110
ifelse(gt_included_intl, yes, [
7111
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
7112
dnl to 'yes' because some of the testsuite requires it.
7113
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
7114
BUILD_INCLUDED_LIBINTL=yes
7117
dnl Make all variables we use known to autoconf.
7118
AC_SUBST(BUILD_INCLUDED_LIBINTL)
7119
AC_SUBST(USE_INCLUDED_LIBINTL)
7122
dnl For backward compatibility. Some configure.ins may be using this.
7124
nls_cv_header_libgt=
7126
dnl For backward compatibility. Some Makefiles may be using this.
7128
AC_SUBST(DATADIRNAME)
7130
dnl For backward compatibility. Some Makefiles may be using this.
7132
AC_SUBST(INSTOBJEXT)
7134
dnl For backward compatibility. Some Makefiles may be using this.
7138
dnl For backward compatibility. Some Makefiles may be using this.
7139
if test "$USE_INCLUDED_LIBINTL" = yes; then
7140
INTLOBJS="\$(GETTOBJS)"
7144
dnl Enable libtool support if the surrounding package wishes it.
7145
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
7146
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
7149
dnl For backward compatibility. Some Makefiles may be using this.
7153
dnl Make all documented variables known to autoconf.
7160
dnl Checks for all prerequisites of the intl subdirectory,
7161
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
7162
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
7163
AC_DEFUN([AM_INTL_SUBDIR],
7165
AC_REQUIRE([AC_PROG_INSTALL])dnl
7166
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7167
AC_REQUIRE([AC_PROG_CC])dnl
7168
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7169
AC_REQUIRE([AC_PROG_RANLIB])dnl
7170
AC_REQUIRE([AC_ISC_POSIX])dnl
7171
AC_REQUIRE([AC_HEADER_STDC])dnl
7172
AC_REQUIRE([AC_C_CONST])dnl
7173
AC_REQUIRE([bh_C_SIGNED])dnl
7174
AC_REQUIRE([AC_C_INLINE])dnl
7175
AC_REQUIRE([AC_TYPE_OFF_T])dnl
7176
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
7177
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
7178
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
7179
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
7180
AC_REQUIRE([gt_TYPE_WINT_T])dnl
7181
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
7182
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
7183
AC_REQUIRE([gt_TYPE_INTMAX_T])
7184
AC_REQUIRE([gt_PRINTF_POSIX])
7185
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
7186
AC_REQUIRE([AC_FUNC_MMAP])dnl
7187
AC_REQUIRE([jm_GLIBC21])dnl
7188
AC_REQUIRE([gt_INTDIV0])dnl
7189
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
7190
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
7191
AC_REQUIRE([gt_INTTYPES_PRI])dnl
7192
AC_REQUIRE([gl_XSIZE])dnl
7194
AC_CHECK_TYPE([ptrdiff_t], ,
7195
[AC_DEFINE([ptrdiff_t], [long],
7196
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
7198
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7199
stdlib.h string.h unistd.h sys/param.h])
7200
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
7201
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
7202
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
7205
dnl Use the _snprintf function only if it is declared (because on NetBSD it
7206
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
7207
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
7208
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
7210
dnl Use the *_unlocked functions only if they are declared.
7211
dnl (because some of them were defined without being declared in Solaris
7212
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
7213
dnl on Solaris 2.5.1 to run on Solaris 2.6).
7214
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
7215
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
7216
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
7217
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
7219
case $gt_cv_func_printf_posix in
7220
*yes) HAVE_POSIX_PRINTF=1 ;;
7221
*) HAVE_POSIX_PRINTF=0 ;;
7223
AC_SUBST([HAVE_POSIX_PRINTF])
7224
if test "$ac_cv_func_asprintf" = yes; then
7229
AC_SUBST([HAVE_ASPRINTF])
7230
if test "$ac_cv_func_snprintf" = yes; then
7235
AC_SUBST([HAVE_SNPRINTF])
7236
if test "$ac_cv_func_wprintf" = yes; then
7241
AC_SUBST([HAVE_WPRINTF])
7245
if test $ac_cv_header_locale_h = yes; then
7249
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
7250
dnl because plural.y uses bison specific features. It requires at least
7251
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
7253
dnl bison is only needed for the maintainer (who touches plural.y). But in
7254
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
7255
dnl the rule in general Makefile. Now, some people carelessly touch the
7256
dnl files or have a broken "make" program, hence the plural.c rule will
7257
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
7258
dnl present or too old.
7259
AC_CHECK_PROGS([INTLBISON], [bison])
7260
if test -z "$INTLBISON"; then
7263
dnl Found it, now check the version.
7264
AC_MSG_CHECKING([version of bison])
7265
changequote(<<,>>)dnl
7266
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7267
case $ac_prog_version in
7268
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7269
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7271
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7272
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7274
AC_MSG_RESULT([$ac_prog_version])
7276
if test $ac_verc_fail = yes; then
7282
dnl gt_CHECK_DECL(FUNC, INCLUDES)
7283
dnl Check whether a function is declared.
7284
AC_DEFUN([gt_CHECK_DECL],
7286
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
7287
[AC_TRY_COMPILE([$2], [
7289
char *p = (char *) $1;
7291
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
7292
if test $ac_cv_have_decl_$1 = yes; then
7297
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
7298
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
7302
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
7303
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
7305
# po.m4 serial 3 (gettext-0.14)
7306
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
7307
dnl This file is free software, distributed under the terms of the GNU
7308
dnl General Public License. As a special exception to the GNU General
7309
dnl Public License, this file may be distributed as part of a program
7310
dnl that contains a configuration script generated by Autoconf, under
7311
dnl the same distribution terms as the rest of that program.
7313
dnl This file can can be used in projects which are not available under
7314
dnl the GNU General Public License or the GNU Library General Public
7315
dnl License but which still want to provide support for the GNU gettext
7317
dnl Please note that the actual code of the GNU gettext library is covered
7318
dnl by the GNU Library General Public License, and the rest of the GNU
7319
dnl gettext package package is covered by the GNU General Public License.
7320
dnl They are *not* in the public domain.
7323
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7324
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7326
dnl Checks for all prerequisites of the po subdirectory.
7327
AC_DEFUN([AM_PO_SUBDIRS],
7329
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7330
AC_REQUIRE([AC_PROG_INSTALL])dnl
7331
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7332
AC_REQUIRE([AM_NLS])dnl
7334
dnl Perform the following tests also if --disable-nls has been given,
7335
dnl because they are needed for "make dist" to work.
7337
dnl Search for GNU msgfmt in the PATH.
7338
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
7339
dnl The second test excludes FreeBSD msgfmt.
7340
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7341
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
7342
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
7344
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7346
dnl Search for GNU xgettext 0.12 or newer in the PATH.
7347
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
7348
dnl The second test excludes FreeBSD xgettext.
7349
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7350
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
7351
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
7353
dnl Remove leftover from FreeBSD xgettext call.
7356
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
7357
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
7358
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
7360
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7361
dnl Test whether we really found GNU msgfmt.
7362
if test "$GMSGFMT" != ":"; then
7363
dnl If it is no GNU msgfmt we define it as : so that the
7364
dnl Makefiles still can work.
7365
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
7366
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7369
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
7371
[found $GMSGFMT program is not GNU msgfmt; ignore it])
7376
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7377
dnl Test whether we really found GNU xgettext.
7378
if test "$XGETTEXT" != ":"; then
7379
dnl If it is no GNU xgettext we define it as : so that the
7380
dnl Makefiles still can work.
7381
if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
7382
(if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7386
[found xgettext program is not GNU xgettext; ignore it])
7389
dnl Remove leftover from FreeBSD xgettext call.
7393
AC_OUTPUT_COMMANDS([
7394
for ac_file in $CONFIG_FILES; do
7395
# Support "outfile[:infile[:infile...]]"
7397
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7399
# PO directories have a Makefile.in generated from Makefile.in.in.
7400
case "$ac_file" in */Makefile.in)
7401
# Adjust a relative srcdir.
7402
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7403
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7404
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7405
# In autoconf-2.13 it is called $ac_given_srcdir.
7406
# In autoconf-2.50 it is called $srcdir.
7407
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7408
case "$ac_given_srcdir" in
7409
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7410
/*) top_srcdir="$ac_given_srcdir" ;;
7411
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
7413
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
7414
rm -f "$ac_dir/POTFILES"
7415
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
7416
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
7417
POMAKEFILEDEPS="POTFILES.in"
7418
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
7419
# on $ac_dir but don't depend on user-specified configuration
7421
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
7422
# The LINGUAS file contains the set of available languages.
7423
if test -n "$OBSOLETE_ALL_LINGUAS"; then
7424
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
7426
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
7427
# Hide the ALL_LINGUAS assigment from automake.
7428
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
7429
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
7431
# The set of available languages was given in configure.in.
7432
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
7435
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
7436
# Compute UPDATEPOFILES
7437
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
7438
# Compute DUMMYPOFILES
7439
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
7441
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
7442
case "$ac_given_srcdir" in
7444
*) srcdirpre='$(srcdir)/' ;;
7450
for lang in $ALL_LINGUAS; do
7451
POFILES="$POFILES $srcdirpre$lang.po"
7452
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
7453
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
7454
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
7456
# CATALOGS depends on both $ac_dir and the user's LINGUAS
7457
# environment variable.
7459
if test -n "$ALL_LINGUAS"; then
7460
for presentlang in $ALL_LINGUAS; do
7462
if test "%UNSET%" != "$LINGUAS"; then
7463
desiredlanguages="$LINGUAS"
7465
desiredlanguages="$ALL_LINGUAS"
7467
for desiredlang in $desiredlanguages; do
7468
# Use the presentlang catalog if desiredlang is
7469
# a. equal to presentlang, or
7470
# b. a variant of presentlang (because in this case,
7471
# presentlang can be used as a fallback for messages
7472
# which are not translated in the desiredlang catalog).
7473
case "$desiredlang" in
7474
"$presentlang"*) useit=yes;;
7477
if test $useit = yes; then
7478
INST_LINGUAS="$INST_LINGUAS $presentlang"
7483
if test -n "$INST_LINGUAS"; then
7484
for lang in $INST_LINGUAS; do
7485
CATALOGS="$CATALOGS $lang.gmo"
7488
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
7489
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
7490
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
7491
if test -f "$f"; then
7493
*.orig | *.bak | *~) ;;
7494
*) cat "$f" >> "$ac_dir/Makefile" ;;
7502
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
7503
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
7505
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
7506
# Capture the value of LINGUAS because we need it to compute CATALOGS.
7507
LINGUAS="${LINGUAS-%UNSET%}"
7511
dnl Postprocesses a Makefile in a directory containing PO files.
7512
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
7514
# When this code is run, in config.status, two variables have already been
7516
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
7517
# - LINGUAS is the value of the environment variable LINGUAS at configure
7521
# Adjust a relative srcdir.
7522
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7523
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7524
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7525
# In autoconf-2.13 it is called $ac_given_srcdir.
7526
# In autoconf-2.50 it is called $srcdir.
7527
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7528
case "$ac_given_srcdir" in
7529
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7530
/*) top_srcdir="$ac_given_srcdir" ;;
7531
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
7534
# Find a way to echo strings without interpreting backslash.
7535
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
7538
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
7539
gt_echo='printf %s\n'
7550
# A sed script that extracts the value of VARIABLE from a Makefile.
7552
# Test if the hold space is empty.
7557
# Yes it was empty. Look if we have the expected variable definition.
7558
/^[ ]*VARIABLE[ ]*=/{
7559
# Seen the first line of the variable definition.
7560
s/^[ ]*VARIABLE[ ]*=//
7565
# Here we are processing a line from the variable definition.
7566
# Remove comment, more precisely replace it with a space.
7568
# See if the line ends in a backslash.
7572
# Print the line, without the trailing backslash.
7575
# There was no trailing backslash. The end of the variable definition is
7576
# reached. Clear the hold space.
7581
# A trailing backslash means that the variable definition continues in the
7582
# next line. Put a nonempty string into the hold space to indicate this.
7589
# Set POTFILES to the value of the Makefile variable POTFILES.
7590
sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
7591
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
7592
# Compute POTFILES_DEPS as
7593
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
7595
for file in $POTFILES; do
7596
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
7600
if test -n "$OBSOLETE_ALL_LINGUAS"; then
7601
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
7603
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
7604
# The LINGUAS file contains the set of available languages.
7605
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
7606
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
7608
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
7609
sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
7610
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
7612
# Hide the ALL_LINGUAS assigment from automake.
7613
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
7615
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
7616
# Compute UPDATEPOFILES
7617
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
7618
# Compute DUMMYPOFILES
7619
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
7621
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
7622
# Compute PROPERTIESFILES
7623
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
7624
# Compute CLASSFILES
7625
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
7627
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
7629
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
7630
# Compute RESOURCESDLLFILES
7631
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
7632
case "$ac_given_srcdir" in
7634
*) srcdirpre='$(srcdir)/' ;;
7645
for lang in $ALL_LINGUAS; do
7646
POFILES="$POFILES $srcdirpre$lang.po"
7647
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
7648
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
7649
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
7650
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
7651
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
7652
QMFILES="$QMFILES $srcdirpre$lang.qm"
7653
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7654
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
7655
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
7656
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
7658
# CATALOGS depends on both $ac_dir and the user's LINGUAS
7659
# environment variable.
7661
if test -n "$ALL_LINGUAS"; then
7662
for presentlang in $ALL_LINGUAS; do
7664
if test "%UNSET%" != "$LINGUAS"; then
7665
desiredlanguages="$LINGUAS"
7667
desiredlanguages="$ALL_LINGUAS"
7669
for desiredlang in $desiredlanguages; do
7670
# Use the presentlang catalog if desiredlang is
7671
# a. equal to presentlang, or
7672
# b. a variant of presentlang (because in this case,
7673
# presentlang can be used as a fallback for messages
7674
# which are not translated in the desiredlang catalog).
7675
case "$desiredlang" in
7676
"$presentlang"*) useit=yes;;
7679
if test $useit = yes; then
7680
INST_LINGUAS="$INST_LINGUAS $presentlang"
7689
if test -n "$INST_LINGUAS"; then
7690
for lang in $INST_LINGUAS; do
7691
CATALOGS="$CATALOGS $lang.gmo"
7692
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
7693
QTCATALOGS="$QTCATALOGS $lang.qm"
7694
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7695
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
7696
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
7697
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
7701
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
7702
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
7703
# Add dependencies that cannot be formulated as a simple suffix rule.
7704
for lang in $ALL_LINGUAS; do
7705
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7706
cat >> "$ac_file.tmp" <<EOF
7707
$frobbedlang.msg: $lang.po
7708
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
7709
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
7713
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
7714
# Add dependencies that cannot be formulated as a simple suffix rule.
7715
for lang in $ALL_LINGUAS; do
7716
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
7717
cat >> "$ac_file.tmp" <<EOF
7718
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
7719
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
7720
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
7724
if test -n "$POMAKEFILEDEPS"; then
7725
cat >> "$ac_file.tmp" <<EOF
7726
Makefile: $POMAKEFILEDEPS
7729
mv "$ac_file.tmp" "$ac_file"
7732
# nls.m4 serial 1 (gettext-0.12)
7733
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
7734
dnl This file is free software, distributed under the terms of the GNU
7735
dnl General Public License. As a special exception to the GNU General
7736
dnl Public License, this file may be distributed as part of a program
7737
dnl that contains a configuration script generated by Autoconf, under
7738
dnl the same distribution terms as the rest of that program.
7740
dnl This file can can be used in projects which are not available under
7741
dnl the GNU General Public License or the GNU Library General Public
7742
dnl License but which still want to provide support for the GNU gettext
7744
dnl Please note that the actual code of the GNU gettext library is covered
7745
dnl by the GNU Library General Public License, and the rest of the GNU
7746
dnl gettext package package is covered by the GNU General Public License.
7747
dnl They are *not* in the public domain.
7750
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7751
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7755
AC_MSG_CHECKING([whether NLS is requested])
7756
dnl Default is enabled NLS
7758
[ --disable-nls do not use Native Language Support],
7759
USE_NLS=$enableval, USE_NLS=yes)
7760
AC_MSG_RESULT($USE_NLS)
7764
AC_DEFUN([AM_MKINSTALLDIRS],
7766
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7767
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
7768
dnl Try to locate it.
7770
if test -n "$ac_aux_dir"; then
7771
case "$ac_aux_dir" in
7772
/*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
7773
*) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
7776
if test -z "$MKINSTALLDIRS"; then
7777
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7779
AC_SUBST(MKINSTALLDIRS)
7782
# progtest.m4 serial 3 (gettext-0.12)
7783
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
7784
dnl This file is free software, distributed under the terms of the GNU
7785
dnl General Public License. As a special exception to the GNU General
7786
dnl Public License, this file may be distributed as part of a program
7787
dnl that contains a configuration script generated by Autoconf, under
7788
dnl the same distribution terms as the rest of that program.
7790
dnl This file can can be used in projects which are not available under
7791
dnl the GNU General Public License or the GNU Library General Public
7792
dnl License but which still want to provide support for the GNU gettext
7794
dnl Please note that the actual code of the GNU gettext library is covered
7795
dnl by the GNU Library General Public License, and the rest of the GNU
7796
dnl gettext package package is covered by the GNU General Public License.
7797
dnl They are *not* in the public domain.
7800
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
7802
# Search path for a program which passes the given test.
7804
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7805
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7806
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
7808
# Prepare PATH_SEPARATOR.
7809
# The user is always right.
7810
if test "${PATH_SEPARATOR+set}" != set; then
7811
echo "#! /bin/sh" >conf$$.sh
7812
echo "exit 0" >>conf$$.sh
7814
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7822
# Find out how to test for executable files. Don't use a zero-byte file,
7823
# as systems may use methods other than mode bits to determine executability.
7824
cat >conf$$.file <<_ASEOF
7828
chmod +x conf$$.file
7829
if test -x conf$$.file >/dev/null 2>&1; then
7830
ac_executable_p="test -x"
7832
ac_executable_p="test -f"
7836
# Extract the first word of "$2", so it can be a program name with args.
7837
set dummy $2; ac_word=[$]2
7838
AC_MSG_CHECKING([for $ac_word])
7839
AC_CACHE_VAL(ac_cv_path_$1,
7841
[[\\/]]* | ?:[[\\/]]*)
7842
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7845
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7846
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7848
test -z "$ac_dir" && ac_dir=.
7849
for ac_exec_ext in '' $ac_executable_extensions; do
7850
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7852
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
7859
dnl If no 4th arg is given, leave the cache variable unset,
7860
dnl so AC_PATH_PROGS will keep looking.
7861
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7866
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7867
AC_MSG_RESULT([$]$1)
7874
# lib-prefix.m4 serial 3 (gettext-0.13)
7875
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
7876
dnl This file is free software, distributed under the terms of the GNU
7877
dnl General Public License. As a special exception to the GNU General
7878
dnl Public License, this file may be distributed as part of a program
7879
dnl that contains a configuration script generated by Autoconf, under
7880
dnl the same distribution terms as the rest of that program.
7882
dnl From Bruno Haible.
7884
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
7885
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
7886
dnl require excessive bracketing.
7887
ifdef([AC_HELP_STRING],
7888
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
7889
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
7891
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
7892
dnl to access previously installed libraries. The basic assumption is that
7893
dnl a user will want packages to use other packages he previously installed
7894
dnl with the same --prefix option.
7895
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
7896
dnl libraries, but is otherwise very convenient.
7897
AC_DEFUN([AC_LIB_PREFIX],
7899
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
7900
AC_REQUIRE([AC_PROG_CC])
7901
AC_REQUIRE([AC_CANONICAL_HOST])
7902
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7903
dnl By default, look in $includedir and $libdir.
7905
AC_LIB_WITH_FINAL_PREFIX([
7906
eval additional_includedir=\"$includedir\"
7907
eval additional_libdir=\"$libdir\"
7909
AC_LIB_ARG_WITH([lib-prefix],
7910
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
7911
--without-lib-prefix don't search for libraries in includedir and libdir],
7913
if test "X$withval" = "Xno"; then
7916
if test "X$withval" = "X"; then
7917
AC_LIB_WITH_FINAL_PREFIX([
7918
eval additional_includedir=\"$includedir\"
7919
eval additional_libdir=\"$libdir\"
7922
additional_includedir="$withval/include"
7923
additional_libdir="$withval/lib"
7927
if test $use_additional = yes; then
7928
dnl Potentially add $additional_includedir to $CPPFLAGS.
7929
dnl But don't add it
7930
dnl 1. if it's the standard /usr/include,
7931
dnl 2. if it's already present in $CPPFLAGS,
7932
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
7933
dnl 4. if it doesn't exist as a directory.
7934
if test "X$additional_includedir" != "X/usr/include"; then
7936
for x in $CPPFLAGS; do
7937
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7938
if test "X$x" = "X-I$additional_includedir"; then
7943
if test -z "$haveit"; then
7944
if test "X$additional_includedir" = "X/usr/local/include"; then
7945
if test -n "$GCC"; then
7947
linux*) haveit=yes;;
7951
if test -z "$haveit"; then
7952
if test -d "$additional_includedir"; then
7953
dnl Really add $additional_includedir to $CPPFLAGS.
7954
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
7959
dnl Potentially add $additional_libdir to $LDFLAGS.
7960
dnl But don't add it
7961
dnl 1. if it's the standard /usr/lib,
7962
dnl 2. if it's already present in $LDFLAGS,
7963
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
7964
dnl 4. if it doesn't exist as a directory.
7965
if test "X$additional_libdir" != "X/usr/lib"; then
7967
for x in $LDFLAGS; do
7968
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7969
if test "X$x" = "X-L$additional_libdir"; then
7974
if test -z "$haveit"; then
7975
if test "X$additional_libdir" = "X/usr/local/lib"; then
7976
if test -n "$GCC"; then
7978
linux*) haveit=yes;;
7982
if test -z "$haveit"; then
7983
if test -d "$additional_libdir"; then
7984
dnl Really add $additional_libdir to $LDFLAGS.
7985
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
7993
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
7994
dnl acl_final_exec_prefix, containing the values to which $prefix and
7995
dnl $exec_prefix will expand at the end of the configure script.
7996
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
7998
dnl Unfortunately, prefix and exec_prefix get only finally determined
7999
dnl at the end of configure.
8000
if test "X$prefix" = "XNONE"; then
8001
acl_final_prefix="$ac_default_prefix"
8003
acl_final_prefix="$prefix"
8005
if test "X$exec_prefix" = "XNONE"; then
8006
acl_final_exec_prefix='${prefix}'
8008
acl_final_exec_prefix="$exec_prefix"
8010
acl_save_prefix="$prefix"
8011
prefix="$acl_final_prefix"
8012
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8013
prefix="$acl_save_prefix"
8016
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
8017
dnl variables prefix and exec_prefix bound to the values they will have
8018
dnl at the end of the configure script.
8019
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
8021
acl_save_prefix="$prefix"
8022
prefix="$acl_final_prefix"
8023
acl_save_exec_prefix="$exec_prefix"
8024
exec_prefix="$acl_final_exec_prefix"
8026
exec_prefix="$acl_save_exec_prefix"
8027
prefix="$acl_save_prefix"
8030
# lib-link.m4 serial 4 (gettext-0.12)
8031
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
8032
dnl This file is free software, distributed under the terms of the GNU
8033
dnl General Public License. As a special exception to the GNU General
8034
dnl Public License, this file may be distributed as part of a program
8035
dnl that contains a configuration script generated by Autoconf, under
8036
dnl the same distribution terms as the rest of that program.
8038
dnl From Bruno Haible.
8040
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
8041
dnl the libraries corresponding to explicit and implicit dependencies.
8042
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
8043
dnl augments the CPPFLAGS variable.
8044
AC_DEFUN([AC_LIB_LINKFLAGS],
8046
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8047
AC_REQUIRE([AC_LIB_RPATH])
8048
define([Name],[translit([$1],[./-], [___])])
8049
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8050
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8051
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
8052
AC_LIB_LINKFLAGS_BODY([$1], [$2])
8053
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
8054
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
8055
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
8057
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
8058
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
8059
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
8060
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
8062
AC_SUBST([LTLIB]NAME)
8063
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
8064
dnl results of this search when this library appears as a dependency.
8070
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
8071
dnl searches for libname and the libraries corresponding to explicit and
8072
dnl implicit dependencies, together with the specified include files and
8073
dnl the ability to compile and link the specified testcode. If found, it
8074
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
8075
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
8076
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
8077
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
8078
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
8080
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8081
AC_REQUIRE([AC_LIB_RPATH])
8082
define([Name],[translit([$1],[./-], [___])])
8083
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8084
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8086
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
8088
AC_LIB_LINKFLAGS_BODY([$1], [$2])
8090
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
8091
dnl because if the user has installed lib[]Name and not disabled its use
8092
dnl via --without-lib[]Name-prefix, he wants to use it.
8093
ac_save_CPPFLAGS="$CPPFLAGS"
8094
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
8096
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
8097
ac_save_LIBS="$LIBS"
8098
LIBS="$LIBS $LIB[]NAME"
8099
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
8100
LIBS="$ac_save_LIBS"
8102
if test "$ac_cv_lib[]Name" = yes; then
8104
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
8105
AC_MSG_CHECKING([how to link with lib[]$1])
8106
AC_MSG_RESULT([$LIB[]NAME])
8109
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
8110
dnl $INC[]NAME either.
8111
CPPFLAGS="$ac_save_CPPFLAGS"
8115
AC_SUBST([HAVE_LIB]NAME)
8117
AC_SUBST([LTLIB]NAME)
8122
dnl Determine the platform dependent parameters needed to use rpath:
8123
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
8124
dnl hardcode_direct, hardcode_minus_L.
8125
AC_DEFUN([AC_LIB_RPATH],
8127
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
8128
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
8129
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
8130
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
8131
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
8132
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8133
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8139
libext="$acl_cv_libext"
8140
shlibext="$acl_cv_shlibext"
8141
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8142
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8143
hardcode_direct="$acl_cv_hardcode_direct"
8144
hardcode_minus_L="$acl_cv_hardcode_minus_L"
8145
dnl Determine whether the user wants rpath handling at all.
8146
AC_ARG_ENABLE(rpath,
8147
[ --disable-rpath do not hardcode runtime library paths],
8148
:, enable_rpath=yes)
8151
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
8152
dnl the libraries corresponding to explicit and implicit dependencies.
8153
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
8154
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
8156
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8157
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8158
dnl By default, look in $includedir and $libdir.
8160
AC_LIB_WITH_FINAL_PREFIX([
8161
eval additional_includedir=\"$includedir\"
8162
eval additional_libdir=\"$libdir\"
8164
AC_LIB_ARG_WITH([lib$1-prefix],
8165
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
8166
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
8168
if test "X$withval" = "Xno"; then
8171
if test "X$withval" = "X"; then
8172
AC_LIB_WITH_FINAL_PREFIX([
8173
eval additional_includedir=\"$includedir\"
8174
eval additional_libdir=\"$libdir\"
8177
additional_includedir="$withval/include"
8178
additional_libdir="$withval/lib"
8182
dnl Search the library and its dependencies in $additional_libdir and
8183
dnl $LDFLAGS. Using breadth-first-seach.
8189
names_already_handled=
8190
names_next_round='$1 $2'
8191
while test -n "$names_next_round"; do
8192
names_this_round="$names_next_round"
8194
for name in $names_this_round; do
8196
for n in $names_already_handled; do
8197
if test "$n" = "$name"; then
8202
if test -z "$already_handled"; then
8203
names_already_handled="$names_already_handled $name"
8204
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
8205
dnl or AC_LIB_HAVE_LINKFLAGS call.
8206
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8207
eval value=\"\$HAVE_LIB$uppername\"
8208
if test -n "$value"; then
8209
if test "$value" = yes; then
8210
eval value=\"\$LIB$uppername\"
8211
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
8212
eval value=\"\$LTLIB$uppername\"
8213
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
8215
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
8216
dnl that this library doesn't exist. So just drop it.
8220
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
8221
dnl and the already constructed $LIBNAME/$LTLIBNAME.
8226
if test $use_additional = yes; then
8227
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8228
found_dir="$additional_libdir"
8229
found_so="$additional_libdir/lib$name.$shlibext"
8230
if test -f "$additional_libdir/lib$name.la"; then
8231
found_la="$additional_libdir/lib$name.la"
8234
if test -f "$additional_libdir/lib$name.$libext"; then
8235
found_dir="$additional_libdir"
8236
found_a="$additional_libdir/lib$name.$libext"
8237
if test -f "$additional_libdir/lib$name.la"; then
8238
found_la="$additional_libdir/lib$name.la"
8243
if test "X$found_dir" = "X"; then
8244
for x in $LDFLAGS $LTLIB[]NAME; do
8245
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8248
dir=`echo "X$x" | sed -e 's/^X-L//'`
8249
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8251
found_so="$dir/lib$name.$shlibext"
8252
if test -f "$dir/lib$name.la"; then
8253
found_la="$dir/lib$name.la"
8256
if test -f "$dir/lib$name.$libext"; then
8258
found_a="$dir/lib$name.$libext"
8259
if test -f "$dir/lib$name.la"; then
8260
found_la="$dir/lib$name.la"
8266
if test "X$found_dir" != "X"; then
8271
if test "X$found_dir" != "X"; then
8272
dnl Found the library.
8273
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
8274
if test "X$found_so" != "X"; then
8275
dnl Linking with a shared library. We attempt to hardcode its
8276
dnl directory into the executable's runpath, unless it's the
8277
dnl standard /usr/lib.
8278
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8279
dnl No hardcoding is needed.
8280
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8282
dnl Use an explicit option to hardcode DIR into the resulting
8284
dnl Potentially add DIR to ltrpathdirs.
8285
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
8287
for x in $ltrpathdirs; do
8288
if test "X$x" = "X$found_dir"; then
8293
if test -z "$haveit"; then
8294
ltrpathdirs="$ltrpathdirs $found_dir"
8296
dnl The hardcoding into $LIBNAME is system dependent.
8297
if test "$hardcode_direct" = yes; then
8298
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
8299
dnl resulting binary.
8300
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8302
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8303
dnl Use an explicit option to hardcode DIR into the resulting
8305
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8306
dnl Potentially add DIR to rpathdirs.
8307
dnl The rpathdirs will be appended to $LIBNAME at the end.
8309
for x in $rpathdirs; do
8310
if test "X$x" = "X$found_dir"; then
8315
if test -z "$haveit"; then
8316
rpathdirs="$rpathdirs $found_dir"
8319
dnl Rely on "-L$found_dir".
8320
dnl But don't add it if it's already contained in the LDFLAGS
8321
dnl or the already constructed $LIBNAME
8323
for x in $LDFLAGS $LIB[]NAME; do
8324
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8325
if test "X$x" = "X-L$found_dir"; then
8330
if test -z "$haveit"; then
8331
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
8333
if test "$hardcode_minus_L" != no; then
8334
dnl FIXME: Not sure whether we should use
8335
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
8337
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8339
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
8340
dnl here, because this doesn't fit in flags passed to the
8341
dnl compiler. So give up. No hardcoding. This affects only
8342
dnl very old systems.
8343
dnl FIXME: Not sure whether we should use
8344
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
8346
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
8352
if test "X$found_a" != "X"; then
8353
dnl Linking with a static library.
8354
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
8356
dnl We shouldn't come here, but anyway it's good to have a
8358
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
8361
dnl Assume the include files are nearby.
8362
additional_includedir=
8363
case "$found_dir" in
8365
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8366
additional_includedir="$basedir/include"
8369
if test "X$additional_includedir" != "X"; then
8370
dnl Potentially add $additional_includedir to $INCNAME.
8371
dnl But don't add it
8372
dnl 1. if it's the standard /usr/include,
8373
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
8374
dnl 3. if it's already present in $CPPFLAGS or the already
8375
dnl constructed $INCNAME,
8376
dnl 4. if it doesn't exist as a directory.
8377
if test "X$additional_includedir" != "X/usr/include"; then
8379
if test "X$additional_includedir" = "X/usr/local/include"; then
8380
if test -n "$GCC"; then
8382
linux*) haveit=yes;;
8386
if test -z "$haveit"; then
8387
for x in $CPPFLAGS $INC[]NAME; do
8388
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8389
if test "X$x" = "X-I$additional_includedir"; then
8394
if test -z "$haveit"; then
8395
if test -d "$additional_includedir"; then
8396
dnl Really add $additional_includedir to $INCNAME.
8397
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
8403
dnl Look for dependencies.
8404
if test -n "$found_la"; then
8405
dnl Read the .la file. It defines the variables
8406
dnl dlname, library_names, old_library, dependency_libs, current,
8407
dnl age, revision, installed, dlopen, dlpreopen, libdir.
8408
save_libdir="$libdir"
8410
*/* | *\\*) . "$found_la" ;;
8411
*) . "./$found_la" ;;
8413
libdir="$save_libdir"
8414
dnl We use only dependency_libs.
8415
for dep in $dependency_libs; do
8418
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8419
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
8420
dnl But don't add it
8421
dnl 1. if it's the standard /usr/lib,
8422
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
8423
dnl 3. if it's already present in $LDFLAGS or the already
8424
dnl constructed $LIBNAME,
8425
dnl 4. if it doesn't exist as a directory.
8426
if test "X$additional_libdir" != "X/usr/lib"; then
8428
if test "X$additional_libdir" = "X/usr/local/lib"; then
8429
if test -n "$GCC"; then
8431
linux*) haveit=yes;;
8435
if test -z "$haveit"; then
8437
for x in $LDFLAGS $LIB[]NAME; do
8438
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8439
if test "X$x" = "X-L$additional_libdir"; then
8444
if test -z "$haveit"; then
8445
if test -d "$additional_libdir"; then
8446
dnl Really add $additional_libdir to $LIBNAME.
8447
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
8451
for x in $LDFLAGS $LTLIB[]NAME; do
8452
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8453
if test "X$x" = "X-L$additional_libdir"; then
8458
if test -z "$haveit"; then
8459
if test -d "$additional_libdir"; then
8460
dnl Really add $additional_libdir to $LTLIBNAME.
8461
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
8468
dir=`echo "X$dep" | sed -e 's/^X-R//'`
8469
if test "$enable_rpath" != no; then
8470
dnl Potentially add DIR to rpathdirs.
8471
dnl The rpathdirs will be appended to $LIBNAME at the end.
8473
for x in $rpathdirs; do
8474
if test "X$x" = "X$dir"; then
8479
if test -z "$haveit"; then
8480
rpathdirs="$rpathdirs $dir"
8482
dnl Potentially add DIR to ltrpathdirs.
8483
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
8485
for x in $ltrpathdirs; do
8486
if test "X$x" = "X$dir"; then
8491
if test -z "$haveit"; then
8492
ltrpathdirs="$ltrpathdirs $dir"
8497
dnl Handle this in the next round.
8498
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8501
dnl Handle this in the next round. Throw away the .la's
8502
dnl directory; it is already contained in a preceding -L
8504
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8507
dnl Most likely an immediate library name.
8508
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
8509
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
8515
dnl Didn't find the library; assume it is in the system directories
8516
dnl known to the linker and runtime loader. (All the system
8517
dnl directories known to the linker should also be known to the
8518
dnl runtime loader, otherwise the system is severely misconfigured.)
8519
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
8520
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
8526
if test "X$rpathdirs" != "X"; then
8527
if test -n "$hardcode_libdir_separator"; then
8528
dnl Weird platform: only the last -rpath option counts, the user must
8529
dnl pass all path elements in one option. We can arrange that for a
8530
dnl single library, but not when more than one $LIBNAMEs are used.
8532
for found_dir in $rpathdirs; do
8533
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8535
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
8536
acl_save_libdir="$libdir"
8538
eval flag=\"$hardcode_libdir_flag_spec\"
8539
libdir="$acl_save_libdir"
8540
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
8542
dnl The -rpath options are cumulative.
8543
for found_dir in $rpathdirs; do
8544
acl_save_libdir="$libdir"
8546
eval flag=\"$hardcode_libdir_flag_spec\"
8547
libdir="$acl_save_libdir"
8548
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
8552
if test "X$ltrpathdirs" != "X"; then
8553
dnl When using libtool, the option that works for both libraries and
8554
dnl executables is -R. The -R options are cumulative.
8555
for found_dir in $ltrpathdirs; do
8556
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
8561
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
8562
dnl unless already present in VAR.
8563
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
8564
dnl contains two or three consecutive elements that belong together.
8565
AC_DEFUN([AC_LIB_APPENDTOVAR],
8567
for element in [$2]; do
8570
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8571
if test "X$x" = "X$element"; then
8576
if test -z "$haveit"; then
8577
[$1]="${[$1]}${[$1]:+ }$element"
8582
# lib-ld.m4 serial 3 (gettext-0.13)
8583
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
8584
dnl This file is free software, distributed under the terms of the GNU
8585
dnl General Public License. As a special exception to the GNU General
8586
dnl Public License, this file may be distributed as part of a program
8587
dnl that contains a configuration script generated by Autoconf, under
8588
dnl the same distribution terms as the rest of that program.
8590
dnl Subroutines of libtool.m4,
8591
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
8592
dnl with libtool.m4.
8594
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
8595
AC_DEFUN([AC_LIB_PROG_LD_GNU],
8596
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
8597
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
8598
case `$LD -v 2>&1 </dev/null` in
8599
*GNU* | *'with BFD'*)
8600
acl_cv_prog_gnu_ld=yes ;;
8602
acl_cv_prog_gnu_ld=no ;;
8604
with_gnu_ld=$acl_cv_prog_gnu_ld
8607
dnl From libtool-1.4. Sets the variable LD.
8608
AC_DEFUN([AC_LIB_PROG_LD],
8609
[AC_ARG_WITH(gnu-ld,
8610
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
8611
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
8612
AC_REQUIRE([AC_PROG_CC])dnl
8613
AC_REQUIRE([AC_CANONICAL_HOST])dnl
8614
# Prepare PATH_SEPARATOR.
8615
# The user is always right.
8616
if test "${PATH_SEPARATOR+set}" != set; then
8617
echo "#! /bin/sh" >conf$$.sh
8618
echo "exit 0" >>conf$$.sh
8620
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8628
if test "$GCC" = yes; then
8629
# Check if gcc -print-prog-name=ld gives a path.
8630
AC_MSG_CHECKING([for ld used by GCC])
8633
# gcc leaves a trailing carriage return which upsets mingw
8634
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8636
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8639
# Accept absolute paths.
8640
[[\\/]* | [A-Za-z]:[\\/]*)]
8641
[re_direlt='/[^/][^/]*/\.\./']
8642
# Canonicalize the path of ld
8643
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8644
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8645
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8647
test -z "$LD" && LD="$ac_prog"
8650
# If it fails, then pretend we aren't using GCC.
8654
# If it is relative, then search for the first ld in PATH.
8658
elif test "$with_gnu_ld" = yes; then
8659
AC_MSG_CHECKING([for GNU ld])
8661
AC_MSG_CHECKING([for non-GNU ld])
8663
AC_CACHE_VAL(acl_cv_path_LD,
8664
[if test -z "$LD"; then
8665
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8666
for ac_dir in $PATH; do
8667
test -z "$ac_dir" && ac_dir=.
8668
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8669
acl_cv_path_LD="$ac_dir/$ac_prog"
8670
# Check to see if the program is GNU ld. I'd rather use --version,
8671
# but apparently some GNU ld's only accept -v.
8672
# Break only if it was the GNU/non-GNU ld that we prefer.
8673
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
8674
*GNU* | *'with BFD'*)
8675
test "$with_gnu_ld" != no && break ;;
8677
test "$with_gnu_ld" != yes && break ;;
8683
acl_cv_path_LD="$LD" # Let the user override the test with a path.
8685
LD="$acl_cv_path_LD"
8686
if test -n "$LD"; then
8691
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8695
# iconv.m4 serial AM4 (gettext-0.11.3)
8696
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
8697
dnl This file is free software, distributed under the terms of the GNU
8698
dnl General Public License. As a special exception to the GNU General
8699
dnl Public License, this file may be distributed as part of a program
8700
dnl that contains a configuration script generated by Autoconf, under
8701
dnl the same distribution terms as the rest of that program.
8703
dnl From Bruno Haible.
8705
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
8707
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
8708
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8709
AC_REQUIRE([AC_LIB_RPATH])
8711
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8713
AC_LIB_LINKFLAGS_BODY([iconv])
8716
AC_DEFUN([AM_ICONV_LINK],
8718
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
8719
dnl those with the standalone portable GNU libiconv installed).
8721
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8723
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
8725
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
8726
dnl because if the user has installed libiconv and not disabled its use
8727
dnl via --without-libiconv-prefix, he wants to use it. The first
8728
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
8729
am_save_CPPFLAGS="$CPPFLAGS"
8730
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
8732
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
8733
am_cv_func_iconv="no, consider installing GNU libiconv"
8735
AC_TRY_LINK([#include <stdlib.h>
8736
#include <iconv.h>],
8737
[iconv_t cd = iconv_open("","");
8738
iconv(cd,NULL,NULL,NULL,NULL);
8740
am_cv_func_iconv=yes)
8741
if test "$am_cv_func_iconv" != yes; then
8742
am_save_LIBS="$LIBS"
8743
LIBS="$LIBS $LIBICONV"
8744
AC_TRY_LINK([#include <stdlib.h>
8745
#include <iconv.h>],
8746
[iconv_t cd = iconv_open("","");
8747
iconv(cd,NULL,NULL,NULL,NULL);
8750
am_cv_func_iconv=yes)
8751
LIBS="$am_save_LIBS"
8754
if test "$am_cv_func_iconv" = yes; then
8755
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
8757
if test "$am_cv_lib_iconv" = yes; then
8758
AC_MSG_CHECKING([how to link with libiconv])
8759
AC_MSG_RESULT([$LIBICONV])
8761
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
8763
CPPFLAGS="$am_save_CPPFLAGS"
8768
AC_SUBST(LTLIBICONV)
8771
AC_DEFUN([AM_ICONV],
8774
if test "$am_cv_func_iconv" = yes; then
8775
AC_MSG_CHECKING([for iconv declaration])
8776
AC_CACHE_VAL(am_cv_proto_iconv, [
8784
#if defined(__STDC__) || defined(__cplusplus)
8785
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8789
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
8790
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
8791
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8792
AC_MSG_RESULT([$]{ac_t:-
8793
}[$]am_cv_proto_iconv)
8794
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
8795
[Define as const if the declaration of iconv() needs const.])
8799
# signed.m4 serial 1 (gettext-0.10.40)
8800
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
8801
dnl This file is free software, distributed under the terms of the GNU
8802
dnl General Public License. As a special exception to the GNU General
8803
dnl Public License, this file may be distributed as part of a program
8804
dnl that contains a configuration script generated by Autoconf, under
8805
dnl the same distribution terms as the rest of that program.
8807
dnl From Bruno Haible.
8809
AC_DEFUN([bh_C_SIGNED],
8811
AC_CACHE_CHECK([for signed], bh_cv_c_signed,
8812
[AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
8813
if test $bh_cv_c_signed = no; then
8815
[Define to empty if the C compiler doesn't support this keyword.])
8819
# longlong.m4 serial 4
8820
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
8821
dnl This file is free software, distributed under the terms of the GNU
8822
dnl General Public License. As a special exception to the GNU General
8823
dnl Public License, this file may be distributed as part of a program
8824
dnl that contains a configuration script generated by Autoconf, under
8825
dnl the same distribution terms as the rest of that program.
8827
dnl From Paul Eggert.
8829
# Define HAVE_LONG_LONG if 'long long' works.
8831
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
8833
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
8834
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
8835
[long long llmax = (long long) -1;
8836
return ll << i | ll >> i | llmax / ll | llmax % ll;],
8837
ac_cv_type_long_long=yes,
8838
ac_cv_type_long_long=no)])
8839
if test $ac_cv_type_long_long = yes; then
8840
AC_DEFINE(HAVE_LONG_LONG, 1,
8841
[Define if you have the 'long long' type.])
8845
# longdouble.m4 serial 1 (gettext-0.12)
8846
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8847
dnl This file is free software, distributed under the terms of the GNU
8848
dnl General Public License. As a special exception to the GNU General
8849
dnl Public License, this file may be distributed as part of a program
8850
dnl that contains a configuration script generated by Autoconf, under
8851
dnl the same distribution terms as the rest of that program.
8853
dnl From Bruno Haible.
8854
dnl Test whether the compiler supports the 'long double' type.
8855
dnl Prerequisite: AC_PROG_CC
8857
AC_DEFUN([gt_TYPE_LONGDOUBLE],
8859
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
8860
[if test "$GCC" = yes; then
8861
gt_cv_c_long_double=yes
8864
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
8865
long double foo = 0.0;
8866
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8867
int array [2*(sizeof(long double) >= sizeof(double)) - 1];
8869
gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
8871
if test $gt_cv_c_long_double = yes; then
8872
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
8876
# wchar_t.m4 serial 1 (gettext-0.12)
8877
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8878
dnl This file is free software, distributed under the terms of the GNU
8879
dnl General Public License. As a special exception to the GNU General
8880
dnl Public License, this file may be distributed as part of a program
8881
dnl that contains a configuration script generated by Autoconf, under
8882
dnl the same distribution terms as the rest of that program.
8884
dnl From Bruno Haible.
8885
dnl Test whether <stddef.h> has the 'wchar_t' type.
8886
dnl Prerequisite: AC_PROG_CC
8888
AC_DEFUN([gt_TYPE_WCHAR_T],
8890
AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
8891
[AC_TRY_COMPILE([#include <stddef.h>
8892
wchar_t foo = (wchar_t)'\0';], ,
8893
gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
8894
if test $gt_cv_c_wchar_t = yes; then
8895
AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
8899
# wint_t.m4 serial 1 (gettext-0.12)
8900
dnl Copyright (C) 2003 Free Software Foundation, Inc.
8901
dnl This file is free software, distributed under the terms of the GNU
8902
dnl General Public License. As a special exception to the GNU General
8903
dnl Public License, this file may be distributed as part of a program
8904
dnl that contains a configuration script generated by Autoconf, under
8905
dnl the same distribution terms as the rest of that program.
8907
dnl From Bruno Haible.
8908
dnl Test whether <wchar.h> has the 'wint_t' type.
8909
dnl Prerequisite: AC_PROG_CC
8911
AC_DEFUN([gt_TYPE_WINT_T],
8913
AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
8914
[AC_TRY_COMPILE([#include <wchar.h>
8915
wint_t foo = (wchar_t)'\0';], ,
8916
gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
8917
if test $gt_cv_c_wint_t = yes; then
8918
AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
8922
# inttypes_h.m4 serial 5 (gettext-0.12)
8923
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
8924
dnl This file is free software, distributed under the terms of the GNU
8925
dnl General Public License. As a special exception to the GNU General
8926
dnl Public License, this file may be distributed as part of a program
8927
dnl that contains a configuration script generated by Autoconf, under
8928
dnl the same distribution terms as the rest of that program.
8930
dnl From Paul Eggert.
8932
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
8933
# doesn't clash with <sys/types.h>, and declares uintmax_t.
8935
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
8937
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
8939
[#include <sys/types.h>
8940
#include <inttypes.h>],
8941
[uintmax_t i = (uintmax_t) -1;],
8942
jm_ac_cv_header_inttypes_h=yes,
8943
jm_ac_cv_header_inttypes_h=no)])
8944
if test $jm_ac_cv_header_inttypes_h = yes; then
8945
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
8946
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
8947
and declares uintmax_t. ])
8951
# stdint_h.m4 serial 3 (gettext-0.12)
8952
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
8953
dnl This file is free software, distributed under the terms of the GNU
8954
dnl General Public License. As a special exception to the GNU General
8955
dnl Public License, this file may be distributed as part of a program
8956
dnl that contains a configuration script generated by Autoconf, under
8957
dnl the same distribution terms as the rest of that program.
8959
dnl From Paul Eggert.
8961
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
8962
# doesn't clash with <sys/types.h>, and declares uintmax_t.
8964
AC_DEFUN([jm_AC_HEADER_STDINT_H],
8966
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
8968
[#include <sys/types.h>
8969
#include <stdint.h>],
8970
[uintmax_t i = (uintmax_t) -1;],
8971
jm_ac_cv_header_stdint_h=yes,
8972
jm_ac_cv_header_stdint_h=no)])
8973
if test $jm_ac_cv_header_stdint_h = yes; then
8974
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
8975
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
8976
and declares uintmax_t. ])
8980
# intmax.m4 serial 1 (gettext-0.12)
8981
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8982
dnl This file is free software, distributed under the terms of the GNU
8983
dnl General Public License. As a special exception to the GNU General
8984
dnl Public License, this file may be distributed as part of a program
8985
dnl that contains a configuration script generated by Autoconf, under
8986
dnl the same distribution terms as the rest of that program.
8988
dnl From Bruno Haible.
8989
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
8990
dnl find a replacement if it is lacking.
8992
AC_DEFUN([gt_TYPE_INTMAX_T],
8994
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
8995
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
8996
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
9000
#if HAVE_STDINT_H_WITH_UINTMAX
9003
#if HAVE_INTTYPES_H_WITH_UINTMAX
9004
#include <inttypes.h>
9006
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
9007
if test $gt_cv_c_intmax_t = yes; then
9008
AC_DEFINE(HAVE_INTMAX_T, 1,
9009
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
9013
# printf-posix.m4 serial 2 (gettext-0.13.1)
9014
dnl Copyright (C) 2003 Free Software Foundation, Inc.
9015
dnl This file is free software, distributed under the terms of the GNU
9016
dnl General Public License. As a special exception to the GNU General
9017
dnl Public License, this file may be distributed as part of a program
9018
dnl that contains a configuration script generated by Autoconf, under
9019
dnl the same distribution terms as the rest of that program.
9021
dnl From Bruno Haible.
9022
dnl Test whether the printf() function supports POSIX/XSI format strings with
9025
AC_DEFUN([gt_PRINTF_POSIX],
9027
AC_REQUIRE([AC_PROG_CC])
9028
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
9029
gt_cv_func_printf_posix,
9034
/* The string "%2$d %1$d", with dollar characters protected from the shell's
9035
dollar expansion (possibly an autoconf bug). */
9036
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9037
static char buf[100];
9040
sprintf (buf, format, 33, 55);
9041
return (strcmp (buf, "55 33") != 0);
9042
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
9044
AC_EGREP_CPP(notposix, [
9045
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
9048
], gt_cv_func_printf_posix="guessing no",
9049
gt_cv_func_printf_posix="guessing yes")
9052
case $gt_cv_func_printf_posix in
9054
AC_DEFINE(HAVE_POSIX_PRINTF, 1,
9055
[Define if your printf() function supports format strings with positions.])
9060
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
9061
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
9062
dnl This file is free software, distributed under the terms of the GNU
9063
dnl General Public License. As a special exception to the GNU General
9064
dnl Public License, this file may be distributed as part of a program
9065
dnl that contains a configuration script generated by Autoconf, under
9066
dnl the same distribution terms as the rest of that program.
9068
# Test for the GNU C Library, version 2.1 or newer.
9069
# From Bruno Haible.
9071
AC_DEFUN([jm_GLIBC21],
9073
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
9074
ac_cv_gnu_library_2_1,
9075
[AC_EGREP_CPP([Lucky GNU user],
9077
#include <features.h>
9078
#ifdef __GNU_LIBRARY__
9079
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
9084
ac_cv_gnu_library_2_1=yes,
9085
ac_cv_gnu_library_2_1=no)
9089
GLIBC21="$ac_cv_gnu_library_2_1"
9093
# intdiv0.m4 serial 1 (gettext-0.11.3)
9094
dnl Copyright (C) 2002 Free Software Foundation, Inc.
9095
dnl This file is free software, distributed under the terms of the GNU
9096
dnl General Public License. As a special exception to the GNU General
9097
dnl Public License, this file may be distributed as part of a program
9098
dnl that contains a configuration script generated by Autoconf, under
9099
dnl the same distribution terms as the rest of that program.
9101
dnl From Bruno Haible.
9103
AC_DEFUN([gt_INTDIV0],
9105
AC_REQUIRE([AC_PROG_CC])dnl
9106
AC_REQUIRE([AC_CANONICAL_HOST])dnl
9108
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
9109
gt_cv_int_divbyzero_sigfpe,
9117
sigfpe_handler (int sig)
9119
sigfpe_handler (sig) int sig;
9122
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
9123
exit (sig != SIGFPE);
9133
signal (SIGFPE, sigfpe_handler);
9134
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
9135
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
9136
signal (SIGTRAP, sigfpe_handler);
9138
/* Linux/SPARC yields signal SIGILL. */
9139
#if defined (__sparc__) && defined (__linux__)
9140
signal (SIGILL, sigfpe_handler);
9147
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
9149
# Guess based on the CPU.
9151
alpha* | i[34567]86 | m68k | s390*)
9152
gt_cv_int_divbyzero_sigfpe="guessing yes";;
9154
gt_cv_int_divbyzero_sigfpe="guessing no";;
9158
case "$gt_cv_int_divbyzero_sigfpe" in
9162
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
9163
[Define if integer division by zero raises signal SIGFPE.])
9166
# uintmax_t.m4 serial 7 (gettext-0.12)
9167
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
9168
dnl This file is free software, distributed under the terms of the GNU
9169
dnl General Public License. As a special exception to the GNU General
9170
dnl Public License, this file may be distributed as part of a program
9171
dnl that contains a configuration script generated by Autoconf, under
9172
dnl the same distribution terms as the rest of that program.
9174
dnl From Paul Eggert.
9178
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
9179
# if it is not already defined in <stdint.h> or <inttypes.h>.
9181
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
9183
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
9184
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
9185
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
9186
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
9187
test $ac_cv_type_unsigned_long_long = yes \
9188
&& ac_type='unsigned long long' \
9189
|| ac_type='unsigned long'
9190
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
9191
[Define to unsigned long or unsigned long long
9192
if <stdint.h> and <inttypes.h> don't define.])
9194
AC_DEFINE(HAVE_UINTMAX_T, 1,
9195
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
9199
# ulonglong.m4 serial 3
9200
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
9201
dnl This file is free software, distributed under the terms of the GNU
9202
dnl General Public License. As a special exception to the GNU General
9203
dnl Public License, this file may be distributed as part of a program
9204
dnl that contains a configuration script generated by Autoconf, under
9205
dnl the same distribution terms as the rest of that program.
9207
dnl From Paul Eggert.
9209
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
9211
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
9213
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
9214
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
9215
[unsigned long long ullmax = (unsigned long long) -1;
9216
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
9217
ac_cv_type_unsigned_long_long=yes,
9218
ac_cv_type_unsigned_long_long=no)])
9219
if test $ac_cv_type_unsigned_long_long = yes; then
9220
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
9221
[Define if you have the 'unsigned long long' type.])
9225
# inttypes.m4 serial 1 (gettext-0.11.4)
9226
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9227
dnl This file is free software, distributed under the terms of the GNU
9228
dnl General Public License. As a special exception to the GNU General
9229
dnl Public License, this file may be distributed as part of a program
9230
dnl that contains a configuration script generated by Autoconf, under
9231
dnl the same distribution terms as the rest of that program.
9233
dnl From Paul Eggert.
9235
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
9238
AC_DEFUN([gt_HEADER_INTTYPES_H],
9240
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
9243
[#include <sys/types.h>
9244
#include <inttypes.h>],
9245
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
9247
if test $gt_cv_header_inttypes_h = yes; then
9248
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
9249
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
9253
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
9254
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9255
dnl This file is free software, distributed under the terms of the GNU
9256
dnl General Public License. As a special exception to the GNU General
9257
dnl Public License, this file may be distributed as part of a program
9258
dnl that contains a configuration script generated by Autoconf, under
9259
dnl the same distribution terms as the rest of that program.
9261
dnl From Bruno Haible.
9263
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
9264
# macros to non-string values. This is the case on AIX 4.3.3.
9266
AC_DEFUN([gt_INTTYPES_PRI],
9268
AC_REQUIRE([gt_HEADER_INTTYPES_H])
9269
if test $gt_cv_header_inttypes_h = yes; then
9270
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
9271
gt_cv_inttypes_pri_broken,
9273
AC_TRY_COMPILE([#include <inttypes.h>
9277
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
9280
if test "$gt_cv_inttypes_pri_broken" = yes; then
9281
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
9282
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
9287
dnl Copyright (C) 2003 Free Software Foundation, Inc.
9288
dnl This file is free software, distributed under the terms of the GNU
9289
dnl General Public License. As a special exception to the GNU General
9290
dnl Public License, this file may be distributed as part of a program
9291
dnl that contains a configuration script generated by Autoconf, under
9292
dnl the same distribution terms as the rest of that program.
9294
AC_DEFUN([gl_XSIZE],
9296
dnl Prerequisites of lib/xsize.h.
9297
AC_REQUIRE([gl_SIZE_MAX])
9298
AC_CHECK_HEADERS(stdint.h)
9301
# size_max.m4 serial 2
9302
dnl Copyright (C) 2003 Free Software Foundation, Inc.
9303
dnl This file is free software, distributed under the terms of the GNU
9304
dnl General Public License. As a special exception to the GNU General
9305
dnl Public License, this file may be distributed as part of a program
9306
dnl that contains a configuration script generated by Autoconf, under
9307
dnl the same distribution terms as the rest of that program.
9309
dnl From Bruno Haible.
9311
AC_DEFUN([gl_SIZE_MAX],
9313
AC_CHECK_HEADERS(stdint.h)
9314
dnl First test whether the system already has SIZE_MAX.
9315
AC_MSG_CHECKING([for SIZE_MAX])
9317
AC_EGREP_CPP([Found it], [
9326
if test -z "$result"; then
9327
dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
9328
dnl than the type 'unsigned long'.
9329
dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
9330
dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
9331
_AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
9332
[#include <stddef.h>], result=?)
9333
_AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
9334
[#include <stddef.h>], result=?)
9335
_AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
9336
[#include <stddef.h>], result=?)
9337
if test "$fits_in_uint" = 1; then
9338
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
9339
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
9340
AC_TRY_COMPILE([#include <stddef.h>
9342
extern unsigned long foo;
9343
], [], fits_in_uint=0)
9345
if test -z "$result"; then
9346
if test "$fits_in_uint" = 1; then
9347
result="$res_hi$res_lo"U
9349
result="$res_hi$res_lo"UL
9352
dnl Shouldn't happen, but who knows...
9356
AC_MSG_RESULT([$result])
9357
if test "$result" != yes; then
9358
AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
9359
[Define as the maximum value of type 'size_t', if the system doesn't define it.])
9363
# codeset.m4 serial AM1 (gettext-0.10.40)
9364
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
9365
dnl This file is free software, distributed under the terms of the GNU
9366
dnl General Public License. As a special exception to the GNU General
9367
dnl Public License, this file may be distributed as part of a program
9368
dnl that contains a configuration script generated by Autoconf, under
9369
dnl the same distribution terms as the rest of that program.
9371
dnl From Bruno Haible.
9373
AC_DEFUN([AM_LANGINFO_CODESET],
9375
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
9376
[AC_TRY_LINK([#include <langinfo.h>],
9377
[char* cs = nl_langinfo(CODESET);],
9378
am_cv_langinfo_codeset=yes,
9379
am_cv_langinfo_codeset=no)
9381
if test $am_cv_langinfo_codeset = yes; then
9382
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
9383
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
9387
# lcmessage.m4 serial 3 (gettext-0.11.3)
9388
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
9389
dnl This file is free software, distributed under the terms of the GNU
9390
dnl General Public License. As a special exception to the GNU General
9391
dnl Public License, this file may be distributed as part of a program
9392
dnl that contains a configuration script generated by Autoconf, under
9393
dnl the same distribution terms as the rest of that program.
9395
dnl This file can can be used in projects which are not available under
9396
dnl the GNU General Public License or the GNU Library General Public
9397
dnl License but which still want to provide support for the GNU gettext
9399
dnl Please note that the actual code of the GNU gettext library is covered
9400
dnl by the GNU Library General Public License, and the rest of the GNU
9401
dnl gettext package package is covered by the GNU General Public License.
9402
dnl They are *not* in the public domain.
9405
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
9407
# Check whether LC_MESSAGES is available in <locale.h>.
9409
AC_DEFUN([AM_LC_MESSAGES],
9411
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
9412
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9413
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
9414
if test $am_cv_val_LC_MESSAGES = yes; then
9415
AC_DEFINE(HAVE_LC_MESSAGES, 1,
9416
[Define if your <locale.h> file defines LC_MESSAGES.])
4536
9421
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4537
9422
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page