239
255
# to the aix ld manual.
240
256
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
241
257
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
242
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
258
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
244
260
# Check for a 64-bit object if we didn't find anything.
245
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
261
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
247
263
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
248
264
])# _LT_AC_SYS_LIBPATH_AIX
267
# _LT_AC_SHELL_INIT(ARG)
268
# ----------------------
269
AC_DEFUN([_LT_AC_SHELL_INIT],
270
[ifdef([AC_DIVERSION_NOTICE],
271
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
272
[AC_DIVERT_PUSH(NOTICE)])
275
])# _LT_AC_SHELL_INIT
251
278
# _LT_AC_PROG_ECHO_BACKSLASH
252
279
# --------------------------
253
280
# Add some code to the start of the generated configure script which
254
281
# will find an echo command which doesn't interpret backslashes.
255
282
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
256
[ifdef([AC_DIVERSION_NOTICE],
257
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
258
[AC_DIVERT_PUSH(NOTICE)])
260
284
# Check that we are running under the correct shell.
261
285
SHELL=${CONFIG_SHELL-/bin/sh}
482
547
CFLAGS="$SAVE_CFLAGS"
485
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
550
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
486
551
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
487
552
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
488
553
AC_CHECK_TOOL(AS, as, false)
489
554
AC_CHECK_TOOL(OBJDUMP, objdump, false)
491
# recent cygwin and mingw systems supply a stub DllMain which the user
492
# can override, but on older systems we have to supply one
493
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
495
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
497
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
500
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
501
# old mingw systems require "-dll" to link a DLL, while more recent ones
503
SAVE_CFLAGS="$CFLAGS"
504
CFLAGS="$CFLAGS -mdll"
505
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
506
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
507
CFLAGS="$SAVE_CFLAGS" ;;
508
*-*-cygwin* | *-*-pw32*)
509
# cygwin systems need to pass --dll to the linker, and not link
510
# crt.o which will require a WinMain@16 definition.
511
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
524
566
# ----------------------------------------------------------------
525
567
# Check whether the given compiler option works
526
568
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
527
[AC_CACHE_CHECK([$1], [$2],
569
[AC_REQUIRE([LT_AC_PROG_SED])
570
AC_CACHE_CHECK([$1], [$2],
529
572
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
530
save_CFLAGS="$CFLAGS"
532
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
533
if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
573
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
574
lt_compiler_flag="$3"
575
# Insert the option either (1) after the last *FLAGS variable, or
576
# (2) before a word containing "conftest.", or (3) at the end.
577
# Note that $ac_compile itself does not contain backslashes and begins
578
# with a dollar sign (not a hyphen), so the echo should work correctly.
579
# The option is referenced via a variable to avoid confusing sed.
580
lt_compile=`echo "$ac_compile" | $SED \
581
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
582
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
583
-e 's:$: $lt_compiler_flag:'`
584
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
585
(eval "$lt_compile" 2>conftest.err)
587
cat conftest.err >&AS_MESSAGE_LOG_FD
588
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
589
if (exit $ac_status) && test -s "$ac_outfile"; then
534
590
# The compiler can only warn and ignore the option if not recognized
535
591
# So say no if there are warnings
536
if test -s conftest.err; then
537
# Append any errors to the config.log.
538
cat conftest.err 1>&AS_MESSAGE_LOG_FD
592
if test ! -s conftest.err; then
544
CFLAGS="$save_CFLAGS"
547
599
if test x"[$]$2" = xyes; then
862
if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
934
lt_compiler_flag="-o out/conftest2.$ac_objext"
935
# Insert the option either (1) after the last *FLAGS variable, or
936
# (2) before a word containing "conftest.", or (3) at the end.
937
# Note that $ac_compile itself does not contain backslashes and begins
938
# with a dollar sign (not a hyphen), so the echo should work correctly.
939
lt_compile=`echo "$ac_compile" | $SED \
940
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
941
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
942
-e 's:$: $lt_compiler_flag:'`
943
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
944
(eval "$lt_compile" 2>out/conftest.err)
946
cat out/conftest.err >&AS_MESSAGE_LOG_FD
947
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
948
if (exit $ac_status) && test -s out/conftest2.$ac_objext
864
950
# The compiler can only warn and ignore the option if not recognized
865
951
# So say no if there are warnings
866
if test -s out/conftest.err; then
867
# Append any errors to the config.log.
868
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
952
if test ! -s out/conftest.err; then
870
953
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
873
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
874
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
875
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
877
957
$rm conftest* out/*
1088
1186
cygwin* | mingw* | pw32*)
1089
1187
version_type=windows
1090
1189
need_version=no
1091
1190
need_lib_prefix=no
1092
1192
case $GCC,$host_os in
1193
yes,cygwin* | yes,mingw* | yes,pw32*)
1094
1194
library_names_spec='$libname.dll.a'
1095
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1096
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1097
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1195
# DLL is installed to $(libdir)/../bin by postinstall_cmds
1196
postinstall_cmds='base_file=`basename \${file}`~
1197
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1098
1198
dldir=$destdir/`dirname \$dlpath`~
1099
1199
test -d \$dldir || mkdir -p \$dldir~
1100
$install_prog .libs/$dlname \$dldir/$dlname'
1101
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1200
$install_prog $dir/$dlname \$dldir/$dlname'
1201
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1102
1202
dlpath=$dir/\$dldll~
1106
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1107
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
1108
if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
1109
# It is most probably a Windows format PATH printed by
1110
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1111
# path with ; separators, and with drive letters. We can handle the
1112
# drive letters (cygwin fileutils understands them), so leave them,
1113
# especially as we might pass files found there to a mingw objdump,
1114
# which wouldn't understand a cygwinified path. Ahh.
1115
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1117
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1121
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1204
shlibpath_overrides_runpath=yes
1208
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
1209
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1210
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1213
# MinGW DLLs use traditional 'lib' prefix
1214
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1215
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1216
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1217
# It is most probably a Windows format PATH printed by
1218
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1219
# path with ; separators, and with drive letters. We can handle the
1220
# drive letters (cygwin fileutils understands them), so leave them,
1221
# especially as we might pass files found there to a mingw objdump,
1222
# which wouldn't understand a cygwinified path. Ahh.
1223
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1225
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1229
# pw32 DLLs use 'pw' prefix rather than 'lib'
1230
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1124
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
1236
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1127
1239
dynamic_linker='Win32 ld.exe'
1134
1246
version_type=darwin
1135
1247
need_lib_prefix=no
1136
1248
need_version=no
1137
# FIXME: Relying on posixy $() will cause problems for
1138
# cross-compilation, but unfortunately the echo tests do not
1139
# yet detect zsh echo's removal of \ escapes.
1140
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1141
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1249
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1250
soname_spec='${libname}${release}${major}$shared_ext'
1142
1251
shlibpath_overrides_runpath=yes
1143
1252
shlibpath_var=DYLD_LIBRARY_PATH
1253
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1254
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1255
if test "$GCC" = yes; then
1256
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1258
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1260
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1147
1264
version_type=linux
1148
1265
need_lib_prefix=no
1149
1266
need_version=no
1150
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1151
soname_spec='${libname}${release}.so$major'
1267
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1268
soname_spec='${libname}${release}${shared_ext}$major'
1152
1269
shlibpath_var=LD_LIBRARY_PATH
1202
1331
version_type=sunos
1203
1332
need_lib_prefix=no
1204
1333
need_version=no
1205
if test "$host_cpu" = ia64; then
1206
1337
hardcode_into_libs=yes
1207
1338
dynamic_linker="$host_os dld.so"
1208
1339
shlibpath_var=LD_LIBRARY_PATH
1209
1340
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1210
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1211
soname_spec='${libname}${release}.so$major'
1341
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1342
soname_spec='${libname}${release}${shared_ext}$major'
1212
1343
if test "X$HPUX_IA64_MODE" = X32; then
1213
1344
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1215
1346
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1217
1348
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1352
hardcode_into_libs=yes
1353
dynamic_linker="$host_os dld.sl"
1354
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1355
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1356
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1357
soname_spec='${libname}${release}${shared_ext}$major'
1358
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1359
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1219
1363
dynamic_linker="$host_os dld.sl"
1220
1364
shlibpath_var=SHLIB_PATH
1221
1365
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1222
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1223
soname_spec='${libname}${release}.sl$major'
1366
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1367
soname_spec='${libname}${release}${shared_ext}$major'
1225
1370
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1226
1371
postinstall_cmds='chmod 555 $lib'
1229
1374
irix5* | irix6* | nonstopux*)
1230
1375
case $host_os in
1231
1376
nonstopux*) version_type=nonstopux ;;
1232
*) version_type=irix ;;
1378
if test "$lt_cv_prog_gnu_ld" = yes; then
1234
1384
need_lib_prefix=no
1235
1385
need_version=no
1236
soname_spec='${libname}${release}.so$major'
1237
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1386
soname_spec='${libname}${release}${shared_ext}$major'
1387
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1238
1388
case $host_os in
1239
1389
irix5* | nonstopux*)
1240
1390
libsuff= shlibsuff=
1243
1393
case $LD in # libtool.m4 will add one of these switches to LD
1244
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1245
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1246
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1394
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1395
libsuff= shlibsuff= libmagic=32-bit;;
1396
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1397
libsuff=32 shlibsuff=N32 libmagic=N32;;
1398
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1399
libsuff=64 shlibsuff=64 libmagic=64-bit;;
1247
1400
*) libsuff= shlibsuff= libmagic=never-match;;
2318
2555
test "$enable_shared" = yes && enable_static=no
2558
darwin* | rhapsody*)
2559
if test "$GCC" = yes; then
2560
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2562
rhapsody* | darwin1.[[012]])
2563
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
2566
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2567
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2569
case ${MACOSX_DEPLOYMENT_TARGET} in
2571
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2574
allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
2580
output_verbose_link_cmd='echo'
2581
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
2582
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
2583
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2584
_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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2585
_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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2586
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2587
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2588
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2589
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2590
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2592
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2322
2596
AC_MSG_RESULT([$enable_shared])
2351
2625
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2352
2626
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2353
2627
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2354
2629
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2355
2630
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2631
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2632
_LT_AC_TAGVAR(module_cmds, $1)=
2633
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2356
2634
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2357
2635
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2358
2636
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2359
2637
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2638
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2361
2640
# Dependencies to place before and after the object being linked:
2362
2641
_LT_AC_TAGVAR(predep_objects, $1)=
2365
2644
_LT_AC_TAGVAR(postdeps, $1)=
2366
2645
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2368
# Source file extension for C test sources.
2647
# Source file extension for C++ test sources.
2371
# Object file extension for compiled C test sources.
2650
# Object file extension for compiled C++ test sources.
2373
2652
_LT_AC_TAGVAR(objext, $1)=$objext
2375
2654
# Code to be used in simple compile tests
2376
lt_simple_compile_test_code="int some_variable = 0;"
2655
lt_simple_compile_test_code="int some_variable = 0;\n"
2378
2657
# Code to be used in simple link tests
2379
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
2658
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2381
2660
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2382
2661
_LT_AC_SYS_COMPILER
2384
2663
# Allow CC to be a program name with arguments.
2668
lt_save_with_gnu_ld=$with_gnu_ld
2669
lt_save_path_LD=$lt_cv_path_LD
2670
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2671
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2673
unset lt_cv_prog_gnu_ld
2675
if test -n "${lt_cv_path_LDCXX+set}"; then
2676
lt_cv_path_LD=$lt_cv_path_LDCXX
2680
test -z "${LDCXX+set}" || LD=$LDCXX
2386
2681
CC=${CXX-"c++"}
2389
2683
_LT_AC_TAGVAR(compiler, $1)=$CC
2390
2684
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2400
2694
if test "$GXX" = yes; then
2401
2695
# Set up default GNU C++ configuration
2403
2699
# Check if GNU C++ uses GNU ld as the underlying linker, since the
2404
2700
# archiving commands below assume that GNU ld is being used.
2405
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2406
egrep 'GNU ld' > /dev/null; then
2409
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2410
_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'
2701
if test "$with_gnu_ld" = yes; then
2702
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
2703
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2412
2705
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2413
2706
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2527
2820
_LT_AC_SYS_LIBPATH_AIX
2528
2821
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2530
_LT_AC_TAGVAR(archive_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` '" $shared_flag"
2531
_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}$exp_sym_flag:\$export_symbols $shared_flag"
2823
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
2824
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2533
2826
if test "$host_cpu" = ia64; then
2534
2827
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2535
2828
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2536
_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"
2829
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2538
2831
# Determine the default libpath from the value encoded in an empty executable.
2539
2832
_LT_AC_SYS_LIBPATH_AIX
2857
cygwin* | mingw* | pw32*)
2858
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2859
# as there is no search path for DLLs.
2860
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2861
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
2862
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2863
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2865
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2866
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2867
# If the export-symbols file already is a .def file (1st line
2868
# is EXPORTS), use it as is; otherwise, prepend...
2869
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2870
cp $export_symbols $output_objdir/$soname.def;
2872
echo EXPORTS > $output_objdir/$soname.def;
2873
cat $export_symbols >> $output_objdir/$soname.def;
2875
$CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2877
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2881
darwin* | rhapsody*)
2882
if test "$GXX" = yes; then
2883
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2885
rhapsody* | darwin1.[[012]])
2886
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
2889
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2890
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2892
case ${MACOSX_DEPLOYMENT_TARGET} in
2894
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2897
allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
2903
lt_int_apple_cc_single_mod=no
2904
output_verbose_link_cmd='echo'
2905
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
2906
lt_int_apple_cc_single_mod=yes
2908
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2909
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
2911
_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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
2913
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
2915
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2916
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2917
_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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2919
_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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2921
_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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2922
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2923
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2924
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2925
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2926
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2928
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2564
2933
case $cc_basename in
2964
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2965
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2966
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2967
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2968
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2969
# but as the default
2970
# location of the library.
2972
case $cc_basename in
2974
# FIXME: insert proper C++ library support
2975
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2978
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
2979
# Commands to make compiler produce verbose output that lists
2980
# what "hidden" libraries, object files and flags are used when
2981
# linking a shared library.
2983
# There doesn't appear to be a way to prevent this compiler from
2984
# explicitly linking system object files so we need to strip them
2985
# from the output so that they don't get included in the library
2987
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2990
if test "$GXX" = yes; then
2991
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
2993
# FIXME: insert proper C++ library support
2994
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2595
3000
if test $with_gnu_ld = no; then
2596
if test "$host_cpu" = ia64; then
3003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3004
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3005
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2597
3008
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2599
3011
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2600
3012
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2601
3013
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2604
if test "$host_cpu" = ia64; then
2605
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2606
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3019
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3020
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3023
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3024
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3025
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3026
# but as the default
3027
# location of the library.
2608
3030
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2610
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2611
# but as the default
2612
# location of the library.
3031
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3032
# but as the default
3033
# location of the library.
2614
3037
case $cc_basename in
2637
3056
# explicitly linking system object files so we need to strip them
2638
3057
# from the output so that they don't get included in the library
2639
3058
# dependencies.
2640
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3059
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'
2643
3062
if test "$GXX" = yes; then
2644
3063
if test $with_gnu_ld = no; then
2647
_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'
3066
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2650
if test "$host_cpu" = ia64; then
2651
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2653
_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'
3069
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2716
3130
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2717
3131
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3136
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3137
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
3138
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3139
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3140
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3141
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
2721
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2722
_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'
3145
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
3146
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
2724
3148
runpath_var=LD_RUN_PATH
2725
3149
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2968
3400
# GNU C++ compiler with Solaris linker
2969
3401
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2970
3402
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
2971
if $CC --version | egrep -v '^2\.7' > /dev/null; then
2972
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2973
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2974
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3403
if $CC --version | grep -v '^2\.7' > /dev/null; then
3404
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
3405
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3406
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2976
3408
# Commands to make compiler produce verbose output that lists
2977
3409
# what "hidden" libraries, object files and flags are used when
2978
3410
# linking a shared library.
2979
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3411
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
2981
3413
# g++ 2.7 appears to require `-G' NOT `-shared' on this
2983
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2984
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2985
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3415
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
3416
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3417
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2987
3419
# Commands to make compiler produce verbose output that lists
2988
3420
# what "hidden" libraries, object files and flags are used when
2989
3421
# linking a shared library.
2990
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3422
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
2993
3425
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3023
3455
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3024
3456
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3026
# Figure out "hidden" C++ library dependencies from verbose
3027
# compiler output whening linking a shared library.
3028
cat > conftest.$ac_ext <<EOF
3458
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3459
_LT_AC_TAGVAR(LD, $1)="$LD"
3462
## There is no encapsulation within the following macros, do not change
3463
## the running order or otherwise move them around unless you know exactly
3464
## what you are doing...
3465
AC_LIBTOOL_POSTDEP_PREDEP($1)
3466
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3467
AC_LIBTOOL_PROG_CC_C_O($1)
3468
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3469
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3470
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3471
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3472
AC_LIBTOOL_SYS_LIB_STRIP
3473
AC_LIBTOOL_DLOPEN_SELF($1)
3475
AC_LIBTOOL_CONFIG($1)
3482
with_gnu_ldcxx=$with_gnu_ld
3483
with_gnu_ld=$lt_save_with_gnu_ld
3484
lt_cv_path_LDCXX=$lt_cv_path_LD
3485
lt_cv_path_LD=$lt_save_path_LD
3486
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3487
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3488
])# AC_LIBTOOL_LANG_CXX_CONFIG
3490
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3491
# ------------------------
3492
# Figure out "hidden" library dependencies from verbose
3493
# compiler output when linking a shared library.
3494
# Parse the compiler output and extract the necessary
3495
# objects, libraries and library flags.
3496
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3497
dnl we can't use the lt_simple_compile_test_code here,
3498
dnl because it contains code intended for an executable,
3499
dnl not a library. It's possible we should let each
3500
dnl tag define a new lt_????_link_test_code variable,
3501
dnl but it's only used here...
3502
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3504
void foo (void) { a = 0; }
3506
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3121
echo "libtool.m4: error: problem compiling C++ test program"
3616
echo "libtool.m4: error: problem compiling $1 test program"
3124
3619
$rm -f confest.$objext
3126
3621
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3127
3622
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3128
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3131
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3624
])# AC_LIBTOOL_POSTDEP_PREDEP
3626
# AC_LIBTOOL_LANG_F77_CONFIG
3627
# ------------------------
3628
# Ensure that the configuration vars for the C compiler are
3629
# suitably defined. Those variables are subsequently used by
3630
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3631
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3632
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3633
[AC_REQUIRE([AC_PROG_F77])
3634
AC_LANG_PUSH(Fortran 77)
3636
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3637
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3638
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3639
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3640
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3641
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3642
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3643
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3644
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3645
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3646
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3647
_LT_AC_TAGVAR(module_cmds, $1)=
3648
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3649
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3650
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3651
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3652
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3653
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3655
# Source file extension for f77 test sources.
3658
# Object file extension for compiled f77 test sources.
3660
_LT_AC_TAGVAR(objext, $1)=$objext
3662
# Code to be used in simple compile tests
3663
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3665
# Code to be used in simple link tests
3666
lt_simple_link_test_code=" program t\n end\n"
3668
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3671
# Allow CC to be a program name with arguments.
3675
_LT_AC_TAGVAR(compiler, $1)=$CC
3676
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3678
AC_MSG_CHECKING([if libtool supports shared libraries])
3679
AC_MSG_RESULT([$can_build_shared])
3681
AC_MSG_CHECKING([whether to build shared libraries])
3682
test "$can_build_shared" = "no" && enable_shared=no
3684
# On AIX, shared libraries and static libraries use the same namespace, and
3685
# are all built from PIC.
3688
test "$enable_shared" = yes && enable_static=no
3689
if test -n "$RANLIB"; then
3690
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3691
postinstall_cmds='$RANLIB $lib'
3695
test "$enable_shared" = yes && enable_static=no
3698
AC_MSG_RESULT([$enable_shared])
3700
AC_MSG_CHECKING([whether to build static libraries])
3701
# Make sure either enable_shared or enable_static is yes.
3702
test "$enable_shared" = yes || enable_static=yes
3703
AC_MSG_RESULT([$enable_static])
3705
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3707
_LT_AC_TAGVAR(GCC, $1)="$G77"
3132
3708
_LT_AC_TAGVAR(LD, $1)="$LD"
3135
## There is no encapsulation within the following macros, do not change
3136
## the running order or otherwise move them around unless you know exactly
3137
## what you are doing...
3138
3710
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3139
3711
AC_LIBTOOL_PROG_CC_C_O($1)
3140
3712
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3141
3713
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3714
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3142
3715
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3143
3716
AC_LIBTOOL_SYS_LIB_STRIP
3144
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3145
AC_LIBTOOL_DLOPEN_SELF($1)
3147
3719
AC_LIBTOOL_CONFIG($1)
3150
3722
CC="$lt_save_CC"
3151
])# AC_LIBTOOL_LANG_CXX_CONFIG
3723
])# AC_LIBTOOL_LANG_F77_CONFIG
3154
3726
# AC_LIBTOOL_LANG_GCJ_CONFIG
4333
4969
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4334
4970
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4335
4971
ifelse([$1],[CXX],[
4336
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4972
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4337
4973
case $host_os in
4339
4975
# If we're using GNU nm, then we don't want the "-C" option.
4340
4976
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4341
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4977
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4342
4978
_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'
4344
4980
_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'
4347
cygwin* | mingw* | pw32*)
4348
4984
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4987
_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'
4351
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4990
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4356
4995
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4996
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4358
4997
_LT_AC_TAGVAR(archive_cmds, $1)=
4359
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4360
4998
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4361
4999
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4362
5000
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4364
5002
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4365
5003
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4366
5004
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5005
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4367
5006
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4368
5007
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4369
5008
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4370
5009
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4371
5010
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5011
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5012
_LT_AC_TAGVAR(module_cmds, $1)=
5013
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4372
5014
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4373
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5015
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4374
5016
# include_expsyms should be a list of space-separated symbols to be *always*
4375
5017
# included in the symbol list
4376
5018
_LT_AC_TAGVAR(include_expsyms, $1)=
4377
# exclude_expsyms can be an egrep regular expression of symbols to exclude
5019
# exclude_expsyms can be an extended regexp of symbols to exclude
4378
5020
# it will be wrapped by ` (' and `)$', so one must not match beginning or
4379
5021
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4380
5022
# as well as any symbol that contains `d'.
4441
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5083
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4442
5084
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4443
5085
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4444
5086
# support --undefined. This deserves some investigation. FIXME
4445
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5087
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
4447
5089
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4451
5093
cygwin* | mingw* | pw32*)
4452
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4453
# no search path for DLLs.
5094
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5095
# as there is no search path for DLLs.
4454
5096
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4455
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4456
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4458
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4459
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4460
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4461
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4462
else $CC -o impgen impgen.c ; fi)~
4463
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4465
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4467
# cygwin and mingw dlls have different entry points and sets of symbols
4469
# FIXME: what about values for MSVC?
4470
dll_entry=__cygwin_dll_entry@12
4471
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4475
dll_entry=_DllMainCRTStartup@12
4476
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4480
# mingw and cygwin differ, and it's simplest to just exclude the union
4481
# of the two symbol sets.
4482
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4484
# recent cygwin and mingw systems supply a stub DllMain which the user
4485
# can override, but on older systems we have to supply one (in ltdll.c)
4486
if test "x$lt_cv_need_dllmain" = "xyes"; then
4487
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4488
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~
4489
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4495
# Extract the symbol export list from an `--export-all' def file,
4496
# then regenerate the def file from the symbol export list, so that
4497
# the compiled dll only exports the symbol export list.
4498
# Be careful not to strip the DATA tag left by newer dlltools.
4499
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4500
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4501
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4503
# If the export-symbols file already is a .def file (1st line
4504
# is EXPORTS), use it as is.
4505
# If DATA tags from a recent dlltool are present, honour them!
4506
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4507
cp $export_symbols $output_objdir/$soname-def;
5097
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
5098
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5099
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5100
_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'
5102
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5103
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5104
# If the export-symbols file already is a .def file (1st line
5105
# is EXPORTS), use it as is; otherwise, prepend...
5106
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5107
cp $export_symbols $output_objdir/$soname.def;
4509
echo EXPORTS > $output_objdir/$soname-def;
4511
cat $export_symbols | while read symbol; do
4514
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4515
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4517
_lt_hint=`expr 1 + \$_lt_hint`;
5109
echo EXPORTS > $output_objdir/$soname.def;
5110
cat $export_symbols >> $output_objdir/$soname.def;
4521
$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~
4522
$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~
4523
$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~
4524
$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~
4525
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5112
$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4688
5270
# Determine the default libpath from the value encoded in an empty executable.
4689
5271
_LT_AC_SYS_LIBPATH_AIX
4690
5272
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4691
_LT_AC_TAGVAR(archive_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` '" $shared_flag"
4692
_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}$exp_sym_flag:\$export_symbols $shared_flag"
5273
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
5274
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4694
5276
if test "$host_cpu" = ia64; then
4695
5277
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4696
5278
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4697
_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"
5279
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4699
5281
# Determine the default libpath from the value encoded in an empty executable.
4700
5282
_LT_AC_SYS_LIBPATH_AIX
4732
5314
# hardcode_libdir_flag_spec is actually meaningless, as there is
4733
5315
# no search path for DLLs.
4734
5316
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4735
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5317
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
4736
5318
# Tell ltmain to make .lib files, not .a files.
5320
# Tell ltmain to make .dll files, not .so files.
4738
5322
# FIXME: Setting linknames here is a bad hack.
4739
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5323
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
4740
5324
# The linker will automatically build a .lib file if we build a DLL.
4741
5325
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4742
5326
# FIXME: Should let the user specify the lib program.
4743
5327
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4744
5328
fix_srcfile_path='`cygpath -w "$srcfile"`'
5329
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4747
5332
darwin* | rhapsody*)
5333
if test "$GXX" = yes ; then
5334
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4748
5335
case "$host_os" in
4749
5336
rhapsody* | darwin1.[[012]])
4750
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5337
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
4752
5339
*) # Darwin 1.3 on
4753
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5340
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5341
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
5343
case ${MACOSX_DEPLOYMENT_TARGET} in
5345
allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
5348
allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
4757
# FIXME: Relying on posixy $() will cause problems for
4758
# cross-compilation, but unfortunately the echo tests do not
4759
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
4760
# `"' quotes if we put them in here... so don't!
4761
_LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
4762
# We need to add '_' to the symbols in $export_symbols first
4763
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4764
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4765
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5354
lt_int_apple_cc_single_mod=no
5355
output_verbose_link_cmd='echo'
5356
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5357
lt_int_apple_cc_single_mod=yes
5359
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5360
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
5362
_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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
5364
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
5365
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5366
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5367
_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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5369
_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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5371
_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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5372
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5373
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5374
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4766
5375
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5376
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5378
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4798
5411
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4800
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5413
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
4801
5414
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4802
5415
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4803
5416
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4806
hpux9* | hpux10* | hpux11*)
4807
5420
if test "$GCC" = yes; then
4810
_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'
4813
if test "$host_cpu" = ia64; then
4814
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4816
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4823
_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'
4826
if test "$host_cpu" = ia64; then
4827
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4829
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4834
if test "$host_cpu" = ia64; then
4835
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4836
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4837
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4839
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4840
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4841
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5421
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5423
_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'
5425
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5426
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5427
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4843
5429
# hardcode_minus_L: Not really in the search PATH,
4844
5430
# but as the default location of the library.
4845
5431
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4846
5432
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5436
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5439
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
5442
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
5448
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5451
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5455
if test "$with_gnu_ld" = no; then
5458
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5459
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5460
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5461
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5462
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5465
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5466
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5467
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5469
# hardcode_minus_L: Not really in the search PATH,
5470
# but as the default location of the library.
5471
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5474
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5475
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5476
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5477
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5479
# hardcode_minus_L: Not really in the search PATH,
5480
# but as the default location of the library.
5481
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4849
5487
irix5* | irix6* | nonstopux*)
4850
5488
if test "$GCC" = yes; then
4851
_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'
5489
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4853
5491
_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'
5492
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4855
5494
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4856
5495
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4902
5540
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4903
5541
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4904
5542
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4905
_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'
5543
_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 $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
4906
5544
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4910
5548
if test "$GCC" = yes; then
4911
5549
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4912
_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'
5550
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4914
5552
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4915
5553
_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'
4921
5559
osf4* | osf5*) # as osf3* with the addition of -msym flag
4922
5560
if test "$GCC" = yes; then
4923
5561
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4924
_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'
5562
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${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'
4925
5563
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4927
5565
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4928
5566
_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'
4929
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5567
_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~
4930
5568
$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'
4932
5570
# Both c and cxx compiler support -rpath directly
4947
5585
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4948
5586
if test "$GCC" = yes; then
4949
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4950
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4951
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5587
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
5588
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5589
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
4953
5591
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4954
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5592
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4955
5593
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4957
5595
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4982
if test "x$host_vendor" = xsni; then
4983
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
4984
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4986
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4987
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5620
case $host_vendor in
5622
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5623
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5626
## LD is ld it makes a PLAMLIB
5627
## CC just makes a GrossModule.
5628
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5629
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5630
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5633
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5634
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4989
5637
runpath_var='LD_RUN_PATH'
4990
5638
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5062
5710
# Do we need to explicitly link libc?
5064
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5065
if test "$enable_shared" = yes && test "$GCC" = yes; then
5066
case $_LT_AC_TAGVAR(archive_cmds, $1) in
5068
# FIXME: we may have to deal with multi-command sequences.
5071
# Test whether the compiler implicitly links with -lc since on some
5072
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5073
# to ld, don't add -lc before -lgcc.
5074
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5076
echo 'static int dummy;' > conftest.$ac_ext
5712
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
5714
# Assume -lc should be added
5715
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5078
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5081
libobjs=conftest.$ac_objext
5083
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5089
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5090
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5091
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5093
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5717
if test "$enable_shared" = yes && test "$GCC" = yes; then
5718
case $_LT_AC_TAGVAR(archive_cmds, $1) in
5720
# FIXME: we may have to deal with multi-command sequences.
5723
# Test whether the compiler implicitly links with -lc since on some
5724
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5725
# to ld, don't add -lc before -lgcc.
5726
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5728
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5730
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5733
libobjs=conftest.$ac_objext
5735
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5741
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5742
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5743
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5745
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5747
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5749
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5095
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5751
cat conftest.err 1>&5
5097
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5099
cat conftest.err 1>&5
5102
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5754
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5106
5760
])# AC_LIBTOOL_PROG_LD_SHLIBS
5146
5800
])# _LT_AC_FILE_LTDLL_C
5149
# _LT_AC_FILE_IMPGEN_C
5150
# --------------------
5151
# Be careful that the start marker always follows a newline.
5152
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
5153
# /* impgen.c starts here */
5154
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5156
# This file is part of GNU libtool.
5158
# This program is free software; you can redistribute it and/or modify
5159
# it under the terms of the GNU General Public License as published by
5160
# the Free Software Foundation; either version 2 of the License, or
5161
# (at your option) any later version.
5163
# This program is distributed in the hope that it will be useful,
5164
# but WITHOUT ANY WARRANTY; without even the implied warranty of
5165
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5166
# GNU General Public License for more details.
5168
# You should have received a copy of the GNU General Public License
5169
# along with this program; if not, write to the Free Software
5170
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5173
# #include <stdio.h> /* for printf() */
5174
# #include <unistd.h> /* for open(), lseek(), read() */
5175
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5176
# #include <string.h> /* for strdup() */
5178
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
5180
# #define O_BINARY 0
5183
# static unsigned int
5184
# pe_get16 (fd, offset)
5188
# unsigned char b[2];
5189
# lseek (fd, offset, SEEK_SET);
5191
# return b[0] + (b[1]<<8);
5194
# static unsigned int
5195
# pe_get32 (fd, offset)
5199
# unsigned char b[4];
5200
# lseek (fd, offset, SEEK_SET);
5202
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5205
# static unsigned int
5209
# unsigned char *b = ptr;
5210
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5219
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5220
# unsigned long export_rva, export_size, nsections, secptr, expptr;
5221
# unsigned long name_rvas, nexp;
5222
# unsigned char *expdata, *erva;
5223
# char *filename, *dll_name;
5225
# filename = argv[1];
5227
# dll = open(filename, O_RDONLY|O_BINARY);
5231
# dll_name = filename;
5233
# for (i=0; filename[i]; i++)
5234
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5235
# dll_name = filename + i +1;
5237
# pe_header_offset = pe_get32 (dll, 0x3c);
5238
# opthdr_ofs = pe_header_offset + 4 + 20;
5239
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
5241
# if (num_entries < 1) /* no exports */
5244
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
5245
# export_size = pe_get32 (dll, opthdr_ofs + 100);
5246
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5247
# secptr = (pe_header_offset + 4 + 20 +
5248
# pe_get16 (dll, pe_header_offset + 4 + 16));
5251
# for (i = 0; i < nsections; i++)
5254
# unsigned long secptr1 = secptr + 40 * i;
5255
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5256
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5257
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5258
# lseek(dll, secptr1, SEEK_SET);
5259
# read(dll, sname, 8);
5260
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
5262
# expptr = fptr + (export_rva - vaddr);
5263
# if (export_rva + export_size > vaddr + vsize)
5264
# export_size = vsize - (export_rva - vaddr);
5269
# expdata = (unsigned char*)malloc(export_size);
5270
# lseek (dll, expptr, SEEK_SET);
5271
# read (dll, expdata, export_size);
5272
# erva = expdata - export_rva;
5274
# nexp = pe_as32 (expdata+24);
5275
# name_rvas = pe_as32 (expdata+32);
5277
# printf ("EXPORTS\n");
5278
# for (i = 0; i<nexp; i++)
5280
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5281
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5286
# /* impgen.c ends here */
5287
])# _LT_AC_FILE_IMPGEN_C
5289
5803
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5290
5804
# ---------------------------------
5291
5805
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5334
5848
IFS=$as_save_IFS
5335
5849
test -z "$as_dir" && as_dir=.
5336
for ac_prog in sed gsed; do
5850
for lt_ac_prog in sed gsed; do
5337
5851
for ac_exec_ext in '' $ac_executable_extensions; do
5338
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
5339
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
5852
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5853
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5345
# Create a temporary directory, and hook for its removal unless debugging.
5348
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5349
trap '{ (exit 1); exit 1; }' 1 2 13 15
5352
# Create a (secure) tmp directory for tmp files.
5355
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
5356
test -n "$tmp" && test -d "$tmp"
5359
tmp=$TMPDIR/sed$$-$RANDOM
5360
(umask 077 && mkdir $tmp)
5363
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5364
{ (exit 1); exit 1; }
5368
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5369
# along with /bin/sed that truncates output.
5370
for _sed in $_sed_list /usr/xpg4/bin/sed; do
5371
test ! -f ${_sed} && break
5372
cat /dev/null > "$tmp/sed.in"
5374
echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
5375
# Check for GNU sed and select it if it is found.
5376
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
5377
lt_cv_path_SED=${_sed}
5860
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5861
# along with /bin/sed that truncates output.
5862
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5863
test ! -f $lt_ac_sed && break
5864
cat /dev/null > conftest.in
5866
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5867
# Check for GNU sed and select it if it is found.
5868
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5869
lt_cv_path_SED=$lt_ac_sed
5873
cat conftest.in conftest.in >conftest.tmp
5874
mv conftest.tmp conftest.in
5875
cp conftest.in conftest.nl
5877
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5878
cmp -s conftest.out conftest.nl || break
5879
# 10000 chars as input seems more than enough
5880
test $lt_ac_count -gt 10 && break
5881
lt_ac_count=`expr $lt_ac_count + 1`
5882
if test $lt_ac_count -gt $lt_ac_max; then
5883
lt_ac_max=$lt_ac_count
5884
lt_cv_path_SED=$lt_ac_sed
5381
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
5382
mv "$tmp/sed.tmp" "$tmp/sed.in"
5383
cp "$tmp/sed.in" "$tmp/sed.nl"
5384
echo >>"$tmp/sed.nl"
5385
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
5386
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
5387
# 10000 chars as input seems more than enough
5388
test $_count -gt 10 && break
5389
_count=`expr $_count + 1`
5390
if test $_count -gt $_max; then
5392
lt_cv_path_SED=$_sed
5398
5890
AC_MSG_RESULT([$SED])