1066
201
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
1069
# lib-ld.m4 serial 4 (gettext-0.18)
1070
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
1071
dnl This file is free software; the Free Software Foundation
1072
dnl gives unlimited permission to copy and/or distribute it,
1073
dnl with or without modifications, as long as this notice is preserved.
1075
dnl Subroutines of libtool.m4,
1076
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1077
dnl with libtool.m4.
1079
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1080
AC_DEFUN([AC_LIB_PROG_LD_GNU],
1081
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1082
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1083
case `$LD -v 2>&1 </dev/null` in
1084
*GNU* | *'with BFD'*)
1085
acl_cv_prog_gnu_ld=yes ;;
1087
acl_cv_prog_gnu_ld=no ;;
1089
with_gnu_ld=$acl_cv_prog_gnu_ld
1092
dnl From libtool-1.4. Sets the variable LD.
1093
AC_DEFUN([AC_LIB_PROG_LD],
1094
[AC_ARG_WITH([gnu-ld],
1095
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1096
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1097
AC_REQUIRE([AC_PROG_CC])dnl
1098
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1099
# Prepare PATH_SEPARATOR.
1100
# The user is always right.
1101
if test "${PATH_SEPARATOR+set}" != set; then
1102
echo "#! /bin/sh" >conf$$.sh
1103
echo "exit 0" >>conf$$.sh
1105
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1113
if test "$GCC" = yes; then
1114
# Check if gcc -print-prog-name=ld gives a path.
1115
AC_MSG_CHECKING([for ld used by GCC])
1118
# gcc leaves a trailing carriage return which upsets mingw
1119
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1121
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1124
# Accept absolute paths.
1125
[[\\/]* | [A-Za-z]:[\\/]*)]
1126
[re_direlt='/[^/][^/]*/\.\./']
1127
# Canonicalize the path of ld
1128
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1129
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1130
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1132
test -z "$LD" && LD="$ac_prog"
1135
# If it fails, then pretend we aren't using GCC.
1139
# If it is relative, then search for the first ld in PATH.
1143
elif test "$with_gnu_ld" = yes; then
1144
AC_MSG_CHECKING([for GNU ld])
1146
AC_MSG_CHECKING([for non-GNU ld])
1148
AC_CACHE_VAL([acl_cv_path_LD],
1149
[if test -z "$LD"; then
1150
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1151
for ac_dir in $PATH; do
1152
test -z "$ac_dir" && ac_dir=.
1153
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1154
acl_cv_path_LD="$ac_dir/$ac_prog"
1155
# Check to see if the program is GNU ld. I'd rather use --version,
1156
# but apparently some GNU ld's only accept -v.
1157
# Break only if it was the GNU/non-GNU ld that we prefer.
1158
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1159
*GNU* | *'with BFD'*)
1160
test "$with_gnu_ld" != no && break ;;
1162
test "$with_gnu_ld" != yes && break ;;
1168
acl_cv_path_LD="$LD" # Let the user override the test with a path.
1170
LD="$acl_cv_path_LD"
1171
if test -n "$LD"; then
1172
AC_MSG_RESULT([$LD])
1176
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1180
# lib-link.m4 serial 21 (gettext-0.18)
1181
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
1182
dnl This file is free software; the Free Software Foundation
1183
dnl gives unlimited permission to copy and/or distribute it,
1184
dnl with or without modifications, as long as this notice is preserved.
1186
dnl From Bruno Haible.
1190
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1191
dnl the libraries corresponding to explicit and implicit dependencies.
1192
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1193
dnl augments the CPPFLAGS variable.
1194
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1195
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1196
AC_DEFUN([AC_LIB_LINKFLAGS],
1198
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1199
AC_REQUIRE([AC_LIB_RPATH])
1200
pushdef([Name],[translit([$1],[./-], [___])])
1201
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1202
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1203
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1204
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1205
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1206
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1207
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1208
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1210
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1211
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1212
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1213
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1214
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1216
AC_SUBST([LTLIB]NAME)
1217
AC_SUBST([LIB]NAME[_PREFIX])
1218
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1219
dnl results of this search when this library appears as a dependency.
1225
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1226
dnl searches for libname and the libraries corresponding to explicit and
1227
dnl implicit dependencies, together with the specified include files and
1228
dnl the ability to compile and link the specified testcode. The missing-message
1229
dnl defaults to 'no' and may contain additional hints for the user.
1230
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1231
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1232
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1233
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1234
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1235
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1236
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1238
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1239
AC_REQUIRE([AC_LIB_RPATH])
1240
pushdef([Name],[translit([$1],[./-], [___])])
1241
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1242
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1244
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1246
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1248
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1249
dnl because if the user has installed lib[]Name and not disabled its use
1250
dnl via --without-lib[]Name-prefix, he wants to use it.
1251
ac_save_CPPFLAGS="$CPPFLAGS"
1252
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1254
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1255
ac_save_LIBS="$LIBS"
1256
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1257
dnl because these -l options might require -L options that are present in
1258
dnl LIBS. -l options benefit only from the -L options listed before it.
1259
dnl Otherwise, add it to the front of LIBS, because it may be a static
1260
dnl library that depends on another static library that is present in LIBS.
1261
dnl Static libraries benefit only from the static libraries listed after
1263
case " $LIB[]NAME" in
1264
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1265
*) LIBS="$LIB[]NAME $LIBS" ;;
1267
AC_TRY_LINK([$3], [$4],
1268
[ac_cv_lib[]Name=yes],
1269
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1270
LIBS="$ac_save_LIBS"
1272
if test "$ac_cv_lib[]Name" = yes; then
1274
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1275
AC_MSG_CHECKING([how to link with lib[]$1])
1276
AC_MSG_RESULT([$LIB[]NAME])
1279
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1280
dnl $INC[]NAME either.
1281
CPPFLAGS="$ac_save_CPPFLAGS"
1286
AC_SUBST([HAVE_LIB]NAME)
1288
AC_SUBST([LTLIB]NAME)
1289
AC_SUBST([LIB]NAME[_PREFIX])
1294
dnl Determine the platform dependent parameters needed to use rpath:
1297
dnl acl_hardcode_libdir_flag_spec,
1298
dnl acl_hardcode_libdir_separator,
1299
dnl acl_hardcode_direct,
1300
dnl acl_hardcode_minus_L.
1301
AC_DEFUN([AC_LIB_RPATH],
1303
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1304
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1305
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1306
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1307
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1308
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1309
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1310
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1311
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1317
acl_libext="$acl_cv_libext"
1318
acl_shlibext="$acl_cv_shlibext"
1319
acl_libname_spec="$acl_cv_libname_spec"
1320
acl_library_names_spec="$acl_cv_library_names_spec"
1321
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1322
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1323
acl_hardcode_direct="$acl_cv_hardcode_direct"
1324
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1325
dnl Determine whether the user wants rpath handling at all.
1326
AC_ARG_ENABLE([rpath],
1327
[ --disable-rpath do not hardcode runtime library paths],
1328
:, enable_rpath=yes)
1331
dnl AC_LIB_FROMPACKAGE(name, package)
1332
dnl declares that libname comes from the given package. The configure file
1333
dnl will then not have a --with-libname-prefix option but a
1334
dnl --with-package-prefix option. Several libraries can come from the same
1335
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1336
dnl macro call that searches for libname.
1337
AC_DEFUN([AC_LIB_FROMPACKAGE],
1339
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1340
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1341
define([acl_frompackage_]NAME, [$2])
1343
pushdef([PACK],[$2])
1344
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1345
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1346
define([acl_libsinpackage_]PACKUP,
1347
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1352
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1353
dnl the libraries corresponding to explicit and implicit dependencies.
1354
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1355
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1356
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1357
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1359
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1360
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1361
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1362
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1363
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1364
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1365
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1366
dnl Autoconf >= 2.61 supports dots in --with options.
1367
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1368
dnl By default, look in $includedir and $libdir.
1370
AC_LIB_WITH_FINAL_PREFIX([
1371
eval additional_includedir=\"$includedir\"
1372
eval additional_libdir=\"$libdir\"
1374
AC_ARG_WITH(P_A_C_K[-prefix],
1375
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1376
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1378
if test "X$withval" = "Xno"; then
1381
if test "X$withval" = "X"; then
1382
AC_LIB_WITH_FINAL_PREFIX([
1383
eval additional_includedir=\"$includedir\"
1384
eval additional_libdir=\"$libdir\"
1387
additional_includedir="$withval/include"
1388
additional_libdir="$withval/$acl_libdirstem"
1389
if test "$acl_libdirstem2" != "$acl_libdirstem" \
1390
&& ! test -d "$withval/$acl_libdirstem"; then
1391
additional_libdir="$withval/$acl_libdirstem2"
1396
dnl Search the library and its dependencies in $additional_libdir and
1397
dnl $LDFLAGS. Using breadth-first-seach.
1402
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1403
dnl computed. So it has to be reset here.
1407
names_already_handled=
1408
names_next_round='$1 $2'
1409
while test -n "$names_next_round"; do
1410
names_this_round="$names_next_round"
1412
for name in $names_this_round; do
1414
for n in $names_already_handled; do
1415
if test "$n" = "$name"; then
1420
if test -z "$already_handled"; then
1421
names_already_handled="$names_already_handled $name"
1422
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1423
dnl or AC_LIB_HAVE_LINKFLAGS call.
1424
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1425
eval value=\"\$HAVE_LIB$uppername\"
1426
if test -n "$value"; then
1427
if test "$value" = yes; then
1428
eval value=\"\$LIB$uppername\"
1429
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1430
eval value=\"\$LTLIB$uppername\"
1431
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1433
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1434
dnl that this library doesn't exist. So just drop it.
1438
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1439
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1444
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1445
if test -n "$acl_shlibext"; then
1446
shrext=".$acl_shlibext" # typically: shrext=.so
1450
if test $use_additional = yes; then
1451
dir="$additional_libdir"
1452
dnl The same code as in the loop below:
1453
dnl First look for a shared library.
1454
if test -n "$acl_shlibext"; then
1455
if test -f "$dir/$libname$shrext"; then
1457
found_so="$dir/$libname$shrext"
1459
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1460
ver=`(cd "$dir" && \
1461
for f in "$libname$shrext".*; do echo "$f"; done \
1462
| sed -e "s,^$libname$shrext\\\\.,," \
1463
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1464
| sed 1q ) 2>/dev/null`
1465
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1467
found_so="$dir/$libname$shrext.$ver"
1470
eval library_names=\"$acl_library_names_spec\"
1471
for f in $library_names; do
1472
if test -f "$dir/$f"; then
1481
dnl Then look for a static library.
1482
if test "X$found_dir" = "X"; then
1483
if test -f "$dir/$libname.$acl_libext"; then
1485
found_a="$dir/$libname.$acl_libext"
1488
if test "X$found_dir" != "X"; then
1489
if test -f "$dir/$libname.la"; then
1490
found_la="$dir/$libname.la"
1494
if test "X$found_dir" = "X"; then
1495
for x in $LDFLAGS $LTLIB[]NAME; do
1496
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1499
dir=`echo "X$x" | sed -e 's/^X-L//'`
1500
dnl First look for a shared library.
1501
if test -n "$acl_shlibext"; then
1502
if test -f "$dir/$libname$shrext"; then
1504
found_so="$dir/$libname$shrext"
1506
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1507
ver=`(cd "$dir" && \
1508
for f in "$libname$shrext".*; do echo "$f"; done \
1509
| sed -e "s,^$libname$shrext\\\\.,," \
1510
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1511
| sed 1q ) 2>/dev/null`
1512
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1514
found_so="$dir/$libname$shrext.$ver"
1517
eval library_names=\"$acl_library_names_spec\"
1518
for f in $library_names; do
1519
if test -f "$dir/$f"; then
1528
dnl Then look for a static library.
1529
if test "X$found_dir" = "X"; then
1530
if test -f "$dir/$libname.$acl_libext"; then
1532
found_a="$dir/$libname.$acl_libext"
1535
if test "X$found_dir" != "X"; then
1536
if test -f "$dir/$libname.la"; then
1537
found_la="$dir/$libname.la"
1542
if test "X$found_dir" != "X"; then
1547
if test "X$found_dir" != "X"; then
1548
dnl Found the library.
1549
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1550
if test "X$found_so" != "X"; then
1551
dnl Linking with a shared library. We attempt to hardcode its
1552
dnl directory into the executable's runpath, unless it's the
1553
dnl standard /usr/lib.
1554
if test "$enable_rpath" = no \
1555
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
1556
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1557
dnl No hardcoding is needed.
1558
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1560
dnl Use an explicit option to hardcode DIR into the resulting
1562
dnl Potentially add DIR to ltrpathdirs.
1563
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1565
for x in $ltrpathdirs; do
1566
if test "X$x" = "X$found_dir"; then
1571
if test -z "$haveit"; then
1572
ltrpathdirs="$ltrpathdirs $found_dir"
1574
dnl The hardcoding into $LIBNAME is system dependent.
1575
if test "$acl_hardcode_direct" = yes; then
1576
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1577
dnl resulting binary.
1578
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1580
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1581
dnl Use an explicit option to hardcode DIR into the resulting
1583
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1584
dnl Potentially add DIR to rpathdirs.
1585
dnl The rpathdirs will be appended to $LIBNAME at the end.
1587
for x in $rpathdirs; do
1588
if test "X$x" = "X$found_dir"; then
1593
if test -z "$haveit"; then
1594
rpathdirs="$rpathdirs $found_dir"
1597
dnl Rely on "-L$found_dir".
1598
dnl But don't add it if it's already contained in the LDFLAGS
1599
dnl or the already constructed $LIBNAME
1601
for x in $LDFLAGS $LIB[]NAME; do
1602
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1603
if test "X$x" = "X-L$found_dir"; then
1608
if test -z "$haveit"; then
1609
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1611
if test "$acl_hardcode_minus_L" != no; then
1612
dnl FIXME: Not sure whether we should use
1613
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1615
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1617
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1618
dnl here, because this doesn't fit in flags passed to the
1619
dnl compiler. So give up. No hardcoding. This affects only
1620
dnl very old systems.
1621
dnl FIXME: Not sure whether we should use
1622
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1624
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1630
if test "X$found_a" != "X"; then
1631
dnl Linking with a static library.
1632
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1634
dnl We shouldn't come here, but anyway it's good to have a
1636
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1639
dnl Assume the include files are nearby.
1640
additional_includedir=
1641
case "$found_dir" in
1642
*/$acl_libdirstem | */$acl_libdirstem/)
1643
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1644
if test "$name" = '$1'; then
1645
LIB[]NAME[]_PREFIX="$basedir"
1647
additional_includedir="$basedir/include"
1649
*/$acl_libdirstem2 | */$acl_libdirstem2/)
1650
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1651
if test "$name" = '$1'; then
1652
LIB[]NAME[]_PREFIX="$basedir"
1654
additional_includedir="$basedir/include"
1657
if test "X$additional_includedir" != "X"; then
1658
dnl Potentially add $additional_includedir to $INCNAME.
1659
dnl But don't add it
1660
dnl 1. if it's the standard /usr/include,
1661
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1662
dnl 3. if it's already present in $CPPFLAGS or the already
1663
dnl constructed $INCNAME,
1664
dnl 4. if it doesn't exist as a directory.
1665
if test "X$additional_includedir" != "X/usr/include"; then
1667
if test "X$additional_includedir" = "X/usr/local/include"; then
1668
if test -n "$GCC"; then
1670
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1674
if test -z "$haveit"; then
1675
for x in $CPPFLAGS $INC[]NAME; do
1676
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1677
if test "X$x" = "X-I$additional_includedir"; then
1682
if test -z "$haveit"; then
1683
if test -d "$additional_includedir"; then
1684
dnl Really add $additional_includedir to $INCNAME.
1685
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1691
dnl Look for dependencies.
1692
if test -n "$found_la"; then
1693
dnl Read the .la file. It defines the variables
1694
dnl dlname, library_names, old_library, dependency_libs, current,
1695
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1696
save_libdir="$libdir"
1698
*/* | *\\*) . "$found_la" ;;
1699
*) . "./$found_la" ;;
1701
libdir="$save_libdir"
1702
dnl We use only dependency_libs.
1703
for dep in $dependency_libs; do
1706
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1707
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1708
dnl But don't add it
1709
dnl 1. if it's the standard /usr/lib,
1710
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1711
dnl 3. if it's already present in $LDFLAGS or the already
1712
dnl constructed $LIBNAME,
1713
dnl 4. if it doesn't exist as a directory.
1714
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1715
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1717
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1718
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1719
if test -n "$GCC"; then
1721
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1725
if test -z "$haveit"; then
1727
for x in $LDFLAGS $LIB[]NAME; do
1728
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1729
if test "X$x" = "X-L$additional_libdir"; then
1734
if test -z "$haveit"; then
1735
if test -d "$additional_libdir"; then
1736
dnl Really add $additional_libdir to $LIBNAME.
1737
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1741
for x in $LDFLAGS $LTLIB[]NAME; do
1742
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1743
if test "X$x" = "X-L$additional_libdir"; then
1748
if test -z "$haveit"; then
1749
if test -d "$additional_libdir"; then
1750
dnl Really add $additional_libdir to $LTLIBNAME.
1751
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1758
dir=`echo "X$dep" | sed -e 's/^X-R//'`
1759
if test "$enable_rpath" != no; then
1760
dnl Potentially add DIR to rpathdirs.
1761
dnl The rpathdirs will be appended to $LIBNAME at the end.
1763
for x in $rpathdirs; do
1764
if test "X$x" = "X$dir"; then
1769
if test -z "$haveit"; then
1770
rpathdirs="$rpathdirs $dir"
1772
dnl Potentially add DIR to ltrpathdirs.
1773
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1775
for x in $ltrpathdirs; do
1776
if test "X$x" = "X$dir"; then
1781
if test -z "$haveit"; then
1782
ltrpathdirs="$ltrpathdirs $dir"
1787
dnl Handle this in the next round.
1788
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1791
dnl Handle this in the next round. Throw away the .la's
1792
dnl directory; it is already contained in a preceding -L
1794
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1797
dnl Most likely an immediate library name.
1798
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1799
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1805
dnl Didn't find the library; assume it is in the system directories
1806
dnl known to the linker and runtime loader. (All the system
1807
dnl directories known to the linker should also be known to the
1808
dnl runtime loader, otherwise the system is severely misconfigured.)
1809
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1810
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1816
if test "X$rpathdirs" != "X"; then
1817
if test -n "$acl_hardcode_libdir_separator"; then
1818
dnl Weird platform: only the last -rpath option counts, the user must
1819
dnl pass all path elements in one option. We can arrange that for a
1820
dnl single library, but not when more than one $LIBNAMEs are used.
1822
for found_dir in $rpathdirs; do
1823
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1825
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1826
acl_save_libdir="$libdir"
1828
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1829
libdir="$acl_save_libdir"
1830
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1832
dnl The -rpath options are cumulative.
1833
for found_dir in $rpathdirs; do
1834
acl_save_libdir="$libdir"
1836
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1837
libdir="$acl_save_libdir"
1838
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1842
if test "X$ltrpathdirs" != "X"; then
1843
dnl When using libtool, the option that works for both libraries and
1844
dnl executables is -R. The -R options are cumulative.
1845
for found_dir in $ltrpathdirs; do
1846
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1856
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1857
dnl unless already present in VAR.
1858
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1859
dnl contains two or three consecutive elements that belong together.
1860
AC_DEFUN([AC_LIB_APPENDTOVAR],
1862
for element in [$2]; do
1865
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1866
if test "X$x" = "X$element"; then
1871
if test -z "$haveit"; then
1872
[$1]="${[$1]}${[$1]:+ }$element"
1877
dnl For those cases where a variable contains several -L and -l options
1878
dnl referring to unknown libraries and directories, this macro determines the
1879
dnl necessary additional linker options for the runtime path.
1880
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1881
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1882
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1883
dnl otherwise linking without libtool is assumed.
1884
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1886
AC_REQUIRE([AC_LIB_RPATH])
1887
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1889
if test "$enable_rpath" != no; then
1890
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1891
dnl Use an explicit option to hardcode directories into the resulting
1896
if test -n "$next"; then
1898
dnl No need to hardcode the standard /usr/lib.
1899
if test "X$dir" != "X/usr/$acl_libdirstem" \
1900
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1901
rpathdirs="$rpathdirs $dir"
1907
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1908
dnl No need to hardcode the standard /usr/lib.
1909
if test "X$dir" != "X/usr/$acl_libdirstem" \
1910
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1911
rpathdirs="$rpathdirs $dir"
1918
if test "X$rpathdirs" != "X"; then
1919
if test -n ""$3""; then
1920
dnl libtool is used for linking. Use -R options.
1921
for dir in $rpathdirs; do
1922
$1="${$1}${$1:+ }-R$dir"
1925
dnl The linker is used for linking directly.
1926
if test -n "$acl_hardcode_libdir_separator"; then
1927
dnl Weird platform: only the last -rpath option counts, the user
1928
dnl must pass all path elements in one option.
1930
for dir in $rpathdirs; do
1931
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1933
acl_save_libdir="$libdir"
1935
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1936
libdir="$acl_save_libdir"
1939
dnl The -rpath options are cumulative.
1940
for dir in $rpathdirs; do
1941
acl_save_libdir="$libdir"
1943
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1944
libdir="$acl_save_libdir"
1945
$1="${$1}${$1:+ }$flag"
1955
# lib-prefix.m4 serial 7 (gettext-0.18)
1956
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1957
dnl This file is free software; the Free Software Foundation
1958
dnl gives unlimited permission to copy and/or distribute it,
1959
dnl with or without modifications, as long as this notice is preserved.
1961
dnl From Bruno Haible.
1963
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1964
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1965
dnl require excessive bracketing.
1966
ifdef([AC_HELP_STRING],
1967
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1968
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1970
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1971
dnl to access previously installed libraries. The basic assumption is that
1972
dnl a user will want packages to use other packages he previously installed
1973
dnl with the same --prefix option.
1974
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1975
dnl libraries, but is otherwise very convenient.
1976
AC_DEFUN([AC_LIB_PREFIX],
1978
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1979
AC_REQUIRE([AC_PROG_CC])
1980
AC_REQUIRE([AC_CANONICAL_HOST])
1981
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1982
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1983
dnl By default, look in $includedir and $libdir.
1985
AC_LIB_WITH_FINAL_PREFIX([
1986
eval additional_includedir=\"$includedir\"
1987
eval additional_libdir=\"$libdir\"
1989
AC_LIB_ARG_WITH([lib-prefix],
1990
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1991
--without-lib-prefix don't search for libraries in includedir and libdir],
1993
if test "X$withval" = "Xno"; then
1996
if test "X$withval" = "X"; then
1997
AC_LIB_WITH_FINAL_PREFIX([
1998
eval additional_includedir=\"$includedir\"
1999
eval additional_libdir=\"$libdir\"
2002
additional_includedir="$withval/include"
2003
additional_libdir="$withval/$acl_libdirstem"
2007
if test $use_additional = yes; then
2008
dnl Potentially add $additional_includedir to $CPPFLAGS.
2009
dnl But don't add it
2010
dnl 1. if it's the standard /usr/include,
2011
dnl 2. if it's already present in $CPPFLAGS,
2012
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2013
dnl 4. if it doesn't exist as a directory.
2014
if test "X$additional_includedir" != "X/usr/include"; then
2016
for x in $CPPFLAGS; do
2017
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2018
if test "X$x" = "X-I$additional_includedir"; then
2023
if test -z "$haveit"; then
2024
if test "X$additional_includedir" = "X/usr/local/include"; then
2025
if test -n "$GCC"; then
2027
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2031
if test -z "$haveit"; then
2032
if test -d "$additional_includedir"; then
2033
dnl Really add $additional_includedir to $CPPFLAGS.
2034
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2039
dnl Potentially add $additional_libdir to $LDFLAGS.
2040
dnl But don't add it
2041
dnl 1. if it's the standard /usr/lib,
2042
dnl 2. if it's already present in $LDFLAGS,
2043
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2044
dnl 4. if it doesn't exist as a directory.
2045
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2047
for x in $LDFLAGS; do
2048
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2049
if test "X$x" = "X-L$additional_libdir"; then
2054
if test -z "$haveit"; then
2055
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2056
if test -n "$GCC"; then
2058
linux*) haveit=yes;;
2062
if test -z "$haveit"; then
2063
if test -d "$additional_libdir"; then
2064
dnl Really add $additional_libdir to $LDFLAGS.
2065
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2073
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2074
dnl acl_final_exec_prefix, containing the values to which $prefix and
2075
dnl $exec_prefix will expand at the end of the configure script.
2076
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2078
dnl Unfortunately, prefix and exec_prefix get only finally determined
2079
dnl at the end of configure.
2080
if test "X$prefix" = "XNONE"; then
2081
acl_final_prefix="$ac_default_prefix"
2083
acl_final_prefix="$prefix"
2085
if test "X$exec_prefix" = "XNONE"; then
2086
acl_final_exec_prefix='${prefix}'
2088
acl_final_exec_prefix="$exec_prefix"
2090
acl_save_prefix="$prefix"
2091
prefix="$acl_final_prefix"
2092
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2093
prefix="$acl_save_prefix"
2096
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2097
dnl variables prefix and exec_prefix bound to the values they will have
2098
dnl at the end of the configure script.
2099
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2101
acl_save_prefix="$prefix"
2102
prefix="$acl_final_prefix"
2103
acl_save_exec_prefix="$exec_prefix"
2104
exec_prefix="$acl_final_exec_prefix"
2106
exec_prefix="$acl_save_exec_prefix"
2107
prefix="$acl_save_prefix"
2110
dnl AC_LIB_PREPARE_MULTILIB creates
2111
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2112
dnl "lib" or "lib64" or "lib/64",
2113
dnl - a variable acl_libdirstem2, as a secondary possible value for
2114
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2116
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2118
dnl There is no formal standard regarding lib and lib64.
2119
dnl On glibc systems, the current practice is that on a system supporting
2120
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2121
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2122
dnl the compiler's default mode by looking at the compiler's library search
2123
dnl path. If at least one of its elements ends in /lib64 or points to a
2124
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2125
dnl Otherwise we use the default, namely "lib".
2126
dnl On Solaris systems, the current practice is that on a system supporting
2127
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2128
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2129
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2130
AC_REQUIRE([AC_CANONICAL_HOST])
2135
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2136
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2137
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2138
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2139
dnl symlink is missing, so we set acl_libdirstem2 too.
2140
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2141
[AC_EGREP_CPP([sixtyfour bits], [
2145
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2147
if test $gl_cv_solaris_64bit = yes; then
2148
acl_libdirstem=lib/64
2150
sparc*) acl_libdirstem2=lib/sparcv9 ;;
2151
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2156
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2157
if test -n "$searchpath"; then
2158
acl_save_IFS="${IFS= }"; IFS=":"
2159
for searchdir in $searchpath; do
2160
if test -d "$searchdir"; then
2161
case "$searchdir" in
2162
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2164
# Better ignore directories of this form. They are misleading.
2166
*) searchdir=`cd "$searchdir" && pwd`
2167
case "$searchdir" in
2168
*/lib64 ) acl_libdirstem=lib64 ;;
2177
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2180
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2182
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2183
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
2185
# Written by Gordon Matzigkeit, 1996
2187
# This file is free software; the Free Software Foundation gives
2188
# unlimited permission to copy and/or distribute it, with or without
2189
# modifications, as long as this notice is preserved.
2191
m4_define([_LT_COPYING], [dnl
2192
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2193
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
2195
# Written by Gordon Matzigkeit, 1996
2197
# This file is part of GNU Libtool.
2199
# GNU Libtool is free software; you can redistribute it and/or
2200
# modify it under the terms of the GNU General Public License as
2201
# published by the Free Software Foundation; either version 2 of
2202
# the License, or (at your option) any later version.
2204
# As a special exception to the GNU General Public License,
2205
# if you distribute this file as part of a program or library that
2206
# is built using GNU Libtool, you may include this file under the
2207
# same distribution terms that you use for the rest of that program.
2209
# GNU Libtool is distributed in the hope that it will be useful,
2210
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2211
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2212
# GNU General Public License for more details.
2214
# You should have received a copy of the GNU General Public License
2215
# along with GNU Libtool; see the file COPYING. If not, a copy
2216
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2217
# obtained by writing to the Free Software Foundation, Inc.,
2218
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2224
# LT_PREREQ(VERSION)
2225
# ------------------
2226
# Complain and exit if this libtool version is less that VERSION.
2227
m4_defun([LT_PREREQ],
2228
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2230
[m4_fatal([Libtool version $1 or higher is required],
2235
# _LT_CHECK_BUILDDIR
2236
# ------------------
2237
# Complain if the absolute build directory name contains unusual characters
2238
m4_defun([_LT_CHECK_BUILDDIR],
2241
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2246
# LT_INIT([OPTIONS])
2247
# ------------------
2249
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2250
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2251
AC_BEFORE([$0], [LT_LANG])dnl
2252
AC_BEFORE([$0], [LT_OUTPUT])dnl
2253
AC_BEFORE([$0], [LTDL_INIT])dnl
2254
m4_require([_LT_CHECK_BUILDDIR])dnl
2256
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2257
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2258
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2259
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2260
dnl unless we require an AC_DEFUNed macro:
2261
AC_REQUIRE([LTOPTIONS_VERSION])dnl
2262
AC_REQUIRE([LTSUGAR_VERSION])dnl
2263
AC_REQUIRE([LTVERSION_VERSION])dnl
2264
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2265
m4_require([_LT_PROG_LTMAIN])dnl
2267
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2270
_LT_SET_OPTIONS([$0], [$1])
2272
# This can be used to rebuild libtool when needed
2273
LIBTOOL_DEPS="$ltmain"
2275
# Always use our own libtool.
2276
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2277
AC_SUBST(LIBTOOL)dnl
2282
m4_define([LT_INIT])
2286
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2287
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2288
dnl aclocal-1.4 backwards compatibility:
2289
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2290
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2293
# _LT_CC_BASENAME(CC)
2294
# -------------------
2295
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2296
m4_defun([_LT_CC_BASENAME],
2297
[for cc_temp in $1""; do
2299
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2300
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2305
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2309
# _LT_FILEUTILS_DEFAULTS
2310
# ----------------------
2311
# It is okay to use these file commands and assume they have been set
2312
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2313
m4_defun([_LT_FILEUTILS_DEFAULTS],
2317
])# _LT_FILEUTILS_DEFAULTS
2322
m4_defun([_LT_SETUP],
2323
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2324
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2325
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2326
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2328
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
2330
_LT_DECL([], [host_alias], [0], [The host system])dnl
2331
_LT_DECL([], [host], [0])dnl
2332
_LT_DECL([], [host_os], [0])dnl
2334
_LT_DECL([], [build_alias], [0], [The build system])dnl
2335
_LT_DECL([], [build], [0])dnl
2336
_LT_DECL([], [build_os], [0])dnl
2338
AC_REQUIRE([AC_PROG_CC])dnl
2339
AC_REQUIRE([LT_PATH_LD])dnl
2340
AC_REQUIRE([LT_PATH_NM])dnl
2342
AC_REQUIRE([AC_PROG_LN_S])dnl
2343
test -z "$LN_S" && LN_S="ln -s"
2344
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2346
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2347
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2348
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2350
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2351
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2352
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2353
m4_require([_LT_CMD_RELOAD])dnl
2354
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2355
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2356
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2357
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2358
m4_require([_LT_WITH_SYSROOT])dnl
2360
_LT_CONFIG_LIBTOOL_INIT([
2361
# See if we are running on zsh, and set the options which allow our
2362
# commands through without removal of \ escapes INIT.
2363
if test -n "\${ZSH_VERSION+set}" ; then
2364
setopt NO_GLOB_SUBST
2367
if test -n "${ZSH_VERSION+set}" ; then
2368
setopt NO_GLOB_SUBST
2373
m4_require([_LT_TAG_COMPILER])dnl
2377
# AIX sometimes has problems with the GCC collect2 program. For some
2378
# reason, if we set the COLLECT_NAMES environment variable, the problems
2379
# vanish in a puff of smoke.
2380
if test "X${COLLECT_NAMES+set}" != Xset; then
2382
export COLLECT_NAMES
2389
can_build_shared=yes
2391
# All known linkers require a `.a' archive for static linking (except MSVC,
2392
# which needs '.lib').
2395
with_gnu_ld="$lt_cv_prog_gnu_ld"
2398
old_CFLAGS="$CFLAGS"
2400
# Set sane defaults for various variables
2401
test -z "$CC" && CC=cc
2402
test -z "$LTCC" && LTCC=$CC
2403
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2404
test -z "$LD" && LD=ld
2405
test -z "$ac_objext" && ac_objext=o
2407
_LT_CC_BASENAME([$compiler])
2409
# Only perform the check for file, if the check method requires it
2410
test -z "$MAGIC_CMD" && MAGIC_CMD=file
2411
case $deplibs_check_method in
2413
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2419
# Use C for the default configuration in the libtool script
2420
LT_SUPPORTED_TAG([CC])
2422
_LT_LANG_DEFAULT_CONFIG
2427
# _LT_PREPARE_SED_QUOTE_VARS
2428
# --------------------------
2429
# Define a few sed substitution that help us do robust quoting.
2430
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2431
[# Backslashify metacharacters that are still active within
2432
# double-quoted strings.
2433
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2435
# Same as above, but do not quote variable references.
2436
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2438
# Sed substitution to delay expansion of an escaped shell variable in a
2439
# double_quote_subst'ed string.
2440
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2442
# Sed substitution to delay expansion of an escaped single quote.
2443
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2445
# Sed substitution to avoid accidental globbing in evaled expressions
2446
no_glob_subst='s/\*/\\\*/g'
2451
# Note that this code is called both from `configure', and `config.status'
2452
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2453
# `config.status' has no value for ac_aux_dir unless we are using Automake,
2454
# so we pass a copy along to make sure it has a sensible value anyway.
2455
m4_defun([_LT_PROG_LTMAIN],
2456
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2457
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2458
ltmain="$ac_aux_dir/ltmain.sh"
2463
# So that we can recreate a full libtool script including additional
2464
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2465
# in macros and then make a single call at the end using the `libtool'
2469
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2470
# ----------------------------------------
2471
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2472
m4_define([_LT_CONFIG_LIBTOOL_INIT],
2474
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2479
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2482
# _LT_CONFIG_LIBTOOL([COMMANDS])
2483
# ------------------------------
2484
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2485
m4_define([_LT_CONFIG_LIBTOOL],
2487
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2492
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2495
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2496
# -----------------------------------------------------
2497
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2498
[_LT_CONFIG_LIBTOOL([$1])
2499
_LT_CONFIG_LIBTOOL_INIT([$2])
2503
# _LT_FORMAT_COMMENT([COMMENT])
2504
# -----------------------------
2505
# Add leading comment marks to the start of each line, and a trailing
2506
# full-stop to the whole comment if one is not present already.
2507
m4_define([_LT_FORMAT_COMMENT],
2509
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2510
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2517
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2518
# -------------------------------------------------------------------
2519
# CONFIGNAME is the name given to the value in the libtool script.
2520
# VARNAME is the (base) name used in the configure script.
2521
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2522
# VARNAME. Any other value will be used directly.
2523
m4_define([_LT_DECL],
2524
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2525
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2526
[m4_ifval([$1], [$1], [$2])])
2527
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2529
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2530
lt_dict_add_subkey([lt_decl_dict], [$2],
2531
[tagged?], [m4_ifval([$5], [yes], [no])])])
2535
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2536
# --------------------------------------------------------
2537
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2540
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2541
# ------------------------------------------------
2542
m4_define([lt_decl_tag_varnames],
2543
[_lt_decl_filter([tagged?], [yes], $@)])
2546
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2547
# ---------------------------------------------------------
2548
m4_define([_lt_decl_filter],
2550
[0], [m4_fatal([$0: too few arguments: $#])],
2551
[1], [m4_fatal([$0: too few arguments: $#: $1])],
2552
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2553
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2554
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
2558
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2559
# --------------------------------------------------
2560
m4_define([lt_decl_quote_varnames],
2561
[_lt_decl_filter([value], [1], $@)])
2564
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2565
# ---------------------------------------------------
2566
m4_define([lt_decl_dquote_varnames],
2567
[_lt_decl_filter([value], [2], $@)])
2570
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2571
# ---------------------------------------------------
2572
m4_define([lt_decl_varnames_tagged],
2573
[m4_assert([$# <= 2])dnl
2574
_$0(m4_quote(m4_default([$1], [[, ]])),
2575
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2576
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2577
m4_define([_lt_decl_varnames_tagged],
2578
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2581
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2582
# ------------------------------------------------
2583
m4_define([lt_decl_all_varnames],
2584
[_$0(m4_quote(m4_default([$1], [[, ]])),
2586
m4_quote(lt_decl_varnames),
2587
m4_quote(m4_shift($@))))[]dnl
2589
m4_define([_lt_decl_all_varnames],
2590
[lt_join($@, lt_decl_varnames_tagged([$1],
2591
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2595
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2596
# ------------------------------------
2597
# Quote a variable value, and forward it to `config.status' so that its
2598
# declaration there will have the same value as in `configure'. VARNAME
2599
# must have a single quote delimited value for this to work.
2600
m4_define([_LT_CONFIG_STATUS_DECLARE],
2601
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2604
# _LT_CONFIG_STATUS_DECLARATIONS
2605
# ------------------------------
2606
# We delimit libtool config variables with single quotes, so when
2607
# we write them to config.status, we have to be sure to quote all
2608
# embedded single quotes properly. In configure, this macro expands
2609
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2611
# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2612
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2613
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2614
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2619
# Output comment and list of tags supported by the script
2620
m4_defun([_LT_LIBTOOL_TAGS],
2621
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2622
available_tags="_LT_TAGS"dnl
2626
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2627
# -----------------------------------
2628
# Extract the dictionary values for VARNAME (optionally with TAG) and
2629
# expand to a commented shell variable setting:
2631
# # Some comment about what VAR is for.
2632
# visible_name=$lt_internal_name
2633
m4_define([_LT_LIBTOOL_DECLARE],
2634
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2635
[description])))[]dnl
2636
m4_pushdef([_libtool_name],
2637
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2638
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2639
[0], [_libtool_name=[$]$1],
2640
[1], [_libtool_name=$lt_[]$1],
2641
[2], [_libtool_name=$lt_[]$1],
2642
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2643
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2647
# _LT_LIBTOOL_CONFIG_VARS
2648
# -----------------------
2649
# Produce commented declarations of non-tagged libtool config variables
2650
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2651
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2652
# section) are produced by _LT_LIBTOOL_TAG_VARS.
2653
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2654
[m4_foreach([_lt_var],
2655
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2656
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2659
# _LT_LIBTOOL_TAG_VARS(TAG)
2660
# -------------------------
2661
m4_define([_LT_LIBTOOL_TAG_VARS],
2662
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2663
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2666
# _LT_TAGVAR(VARNAME, [TAGNAME])
2667
# ------------------------------
2668
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2671
# _LT_CONFIG_COMMANDS
2672
# -------------------
2673
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2674
# variables for single and double quote escaping we saved from calls
2675
# to _LT_DECL, we can put quote escaped variables declarations
2676
# into `config.status', and then the shell code to quote escape them in
2677
# for loops in `config.status'. Finally, any additional code accumulated
2678
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2679
m4_defun([_LT_CONFIG_COMMANDS],
2680
[AC_PROVIDE_IFELSE([LT_OUTPUT],
2681
dnl If the libtool generation code has been placed in $CONFIG_LT,
2682
dnl instead of duplicating it all over again into config.status,
2683
dnl then we will have config.status run $CONFIG_LT later, so it
2684
dnl needs to know what name is stored there:
2685
[AC_CONFIG_COMMANDS([libtool],
2686
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2687
dnl If the libtool generation code is destined for config.status,
2688
dnl expand the accumulated commands and init code now:
2689
[AC_CONFIG_COMMANDS([libtool],
2690
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2691
])#_LT_CONFIG_COMMANDS
2695
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2698
# The HP-UX ksh and POSIX shell print the target directory to stdout
2700
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2702
sed_quote_subst='$sed_quote_subst'
2703
double_quote_subst='$double_quote_subst'
2704
delay_variable_subst='$delay_variable_subst'
2705
_LT_CONFIG_STATUS_DECLARATIONS
2707
LTCFLAGS='$LTCFLAGS'
2708
compiler='$compiler_DEFAULT'
2710
# A function that is used when there is no print builtin or printf.
2711
func_fallback_echo ()
2713
eval 'cat <<_LTECHO_EOF
2718
# Quote evaled strings.
2719
for var in lt_decl_all_varnames([[ \
2720
]], lt_decl_quote_varnames); do
2721
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2722
*[[\\\\\\\`\\"\\\$]]*)
2723
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2726
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2731
# Double-quote double-evaled strings.
2732
for var in lt_decl_all_varnames([[ \
2733
]], lt_decl_dquote_varnames); do
2734
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2735
*[[\\\\\\\`\\"\\\$]]*)
2736
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2739
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2744
_LT_OUTPUT_LIBTOOL_INIT
2747
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2748
# ------------------------------------
2749
# Generate a child script FILE with all initialization necessary to
2750
# reuse the environment learned by the parent script, and make the
2751
# file executable. If COMMENT is supplied, it is inserted after the
2752
# `#!' sequence but before initialization text begins. After this
2753
# macro, additional text can be appended to FILE to form the body of
2754
# the child script. The macro ends with non-zero status if the
2755
# file could not be fully written (such as if the disk is full).
2756
m4_ifdef([AS_INIT_GENERATED],
2757
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2758
[m4_defun([_LT_GENERATED_FILE_INIT],
2759
[m4_require([AS_PREPARE])]dnl
2760
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2762
cat >$1 <<_ASEOF || lt_write_fail=1
2764
# Generated by $as_me.
2766
SHELL=\${CONFIG_SHELL-$SHELL}
2769
cat >>$1 <<\_ASEOF || lt_write_fail=1
2772
exec AS_MESSAGE_FD>&1
2774
test $lt_write_fail = 0 && chmod +x $1[]dnl
2775
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2779
# This macro allows early generation of the libtool script (before
2780
# AC_OUTPUT is called), incase it is used in configure for compilation
2782
AC_DEFUN([LT_OUTPUT],
2783
[: ${CONFIG_LT=./config.lt}
2784
AC_MSG_NOTICE([creating $CONFIG_LT])
2785
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2786
[# Run this file to recreate a libtool stub with the current configuration.])
2788
cat >>"$CONFIG_LT" <<\_LTEOF
2790
exec AS_MESSAGE_LOG_FD>>config.log
2793
AS_BOX([Running $as_me.])
2794
} >&AS_MESSAGE_LOG_FD
2797
\`$as_me' creates a local libtool stub from the current configuration,
2798
for use in further configure time tests before the real libtool is
2801
Usage: $[0] [[OPTIONS]]
2803
-h, --help print this help, then exit
2804
-V, --version print version number, then exit
2805
-q, --quiet do not print progress messages
2806
-d, --debug don't remove temporary files
2808
Report bugs to <bug-libtool@gnu.org>."
2811
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2812
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2813
configured by $[0], generated by m4_PACKAGE_STRING.
2815
Copyright (C) 2011 Free Software Foundation, Inc.
2816
This config.lt script is free software; the Free Software Foundation
2817
gives unlimited permision to copy, distribute and modify it."
2819
while test $[#] != 0
2822
--version | --v* | -V )
2823
echo "$lt_cl_version"; exit 0 ;;
2824
--help | --h* | -h )
2825
echo "$lt_cl_help"; exit 0 ;;
2826
--debug | --d* | -d )
2828
--quiet | --q* | --silent | --s* | -q )
2831
-*) AC_MSG_ERROR([unrecognized option: $[1]
2832
Try \`$[0] --help' for more information.]) ;;
2834
*) AC_MSG_ERROR([unrecognized argument: $[1]
2835
Try \`$[0] --help' for more information.]) ;;
2840
if $lt_cl_silent; then
2841
exec AS_MESSAGE_FD>/dev/null
2845
cat >>"$CONFIG_LT" <<_LTEOF
2846
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2849
cat >>"$CONFIG_LT" <<\_LTEOF
2850
AC_MSG_NOTICE([creating $ofile])
2851
_LT_OUTPUT_LIBTOOL_COMMANDS
2854
chmod +x "$CONFIG_LT"
2856
# configure is writing to config.log, but config.lt does its own redirection,
2857
# appending to config.log, which fails on DOS, as config.log is still kept
2858
# open by configure. Here we exec the FD to /dev/null, effectively closing
2859
# config.log, so it can be properly (re)opened and appended to by config.lt.
2861
test "$silent" = yes &&
2862
lt_config_lt_args="$lt_config_lt_args --quiet"
2863
exec AS_MESSAGE_LOG_FD>/dev/null
2864
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2865
exec AS_MESSAGE_LOG_FD>>config.log
2866
$lt_cl_success || AS_EXIT(1)
2872
# If TAG is the built-in tag, create an initial libtool script with a
2873
# default configuration from the untagged config vars. Otherwise add code
2874
# to config.status for appending the configuration named by TAG from the
2875
# matching tagged config vars.
2876
m4_defun([_LT_CONFIG],
2877
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2878
_LT_CONFIG_SAVE_COMMANDS([
2879
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2880
m4_if(_LT_TAG, [C], [
2881
# See if we are running on zsh, and set the options which allow our
2882
# commands through without removal of \ escapes.
2883
if test -n "${ZSH_VERSION+set}" ; then
2884
setopt NO_GLOB_SUBST
2888
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2891
cat <<_LT_EOF >> "$cfgfile"
2894
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2895
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2896
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2897
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2902
# ### BEGIN LIBTOOL CONFIG
2903
_LT_LIBTOOL_CONFIG_VARS
2904
_LT_LIBTOOL_TAG_VARS
2905
# ### END LIBTOOL CONFIG
2911
cat <<\_LT_EOF >> "$cfgfile"
2912
# AIX sometimes has problems with the GCC collect2 program. For some
2913
# reason, if we set the COLLECT_NAMES environment variable, the problems
2914
# vanish in a puff of smoke.
2915
if test "X${COLLECT_NAMES+set}" != Xset; then
2917
export COLLECT_NAMES
2925
# We use sed instead of cat because bash on DJGPP gets confused if
2926
# if finds mixed CR/LF and LF-only lines. Since sed operates in
2927
# text mode, it properly converts lines to CR/LF. This bash problem
2928
# is reportedly fixed, but why not run on old versions too?
2929
sed '$q' "$ltmain" >> "$cfgfile" \
2930
|| (rm -f "$cfgfile"; exit 1)
2932
_LT_PROG_REPLACE_SHELLFNS
2934
mv -f "$cfgfile" "$ofile" ||
2935
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2938
[cat <<_LT_EOF >> "$ofile"
2940
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2941
dnl in a comment (ie after a #).
2942
# ### BEGIN LIBTOOL TAG CONFIG: $1
2943
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2944
# ### END LIBTOOL TAG CONFIG: $1
2951
TIMESTAMP='$TIMESTAMP'
2953
ofile='$ofile'], [])
2954
])dnl /_LT_CONFIG_SAVE_COMMANDS
2958
# LT_SUPPORTED_TAG(TAG)
2959
# ---------------------
2960
# Trace this macro to discover what tags are supported by the libtool
2961
# --tag option, using:
2962
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
2963
AC_DEFUN([LT_SUPPORTED_TAG], [])
2966
# C support is built-in for now
2967
m4_define([_LT_LANG_C_enabled], [])
2968
m4_define([_LT_TAGS], [])
2973
# Enable libtool support for the given language if not already enabled.
2975
[AC_BEFORE([$0], [LT_OUTPUT])dnl
2978
[C++], [_LT_LANG(CXX)],
2979
[Go], [_LT_LANG(GO)],
2980
[Java], [_LT_LANG(GCJ)],
2981
[Fortran 77], [_LT_LANG(F77)],
2982
[Fortran], [_LT_LANG(FC)],
2983
[Windows Resource], [_LT_LANG(RC)],
2984
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
2986
[m4_fatal([$0: unsupported language: "$1"])])])dnl
2990
# _LT_LANG(LANGNAME)
2991
# ------------------
2992
m4_defun([_LT_LANG],
2993
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2994
[LT_SUPPORTED_TAG([$1])dnl
2995
m4_append([_LT_TAGS], [$1 ])dnl
2996
m4_define([_LT_LANG_]$1[_enabled], [])dnl
2997
_LT_LANG_$1_CONFIG($1)])dnl
3001
m4_ifndef([AC_PROG_GO], [
3002
# NOTE: This macro has been submitted for inclusion into #
3003
# GNU Autoconf as AC_PROG_GO. When it is available in #
3004
# a released version of Autoconf we should remove this #
3005
# macro and use it instead. #
3006
m4_defun([AC_PROG_GO],
3007
[AC_LANG_PUSH(Go)dnl
3008
AC_ARG_VAR([GOC], [Go compiler command])dnl
3009
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
3010
_AC_ARG_VAR_LDFLAGS()dnl
3011
AC_CHECK_TOOL(GOC, gccgo)
3012
if test -z "$GOC"; then
3013
if test -n "$ac_tool_prefix"; then
3014
AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
3017
if test -z "$GOC"; then
3018
AC_CHECK_PROG(GOC, gccgo, gccgo, false)
3024
# _LT_LANG_DEFAULT_CONFIG
3025
# -----------------------
3026
m4_defun([_LT_LANG_DEFAULT_CONFIG],
3027
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3029
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3031
AC_PROVIDE_IFELSE([AC_PROG_F77],
3033
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3035
AC_PROVIDE_IFELSE([AC_PROG_FC],
3037
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3039
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3040
dnl pulling things in needlessly.
3041
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3043
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3045
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3047
[m4_ifdef([AC_PROG_GCJ],
3048
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3049
m4_ifdef([A][M_PROG_GCJ],
3050
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3051
m4_ifdef([LT_PROG_GCJ],
3052
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3054
AC_PROVIDE_IFELSE([AC_PROG_GO],
3056
[m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
3058
AC_PROVIDE_IFELSE([LT_PROG_RC],
3060
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3061
])# _LT_LANG_DEFAULT_CONFIG
3064
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3065
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3066
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3067
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3068
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3069
dnl aclocal-1.4 backwards compatibility:
3070
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3071
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3072
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3073
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3074
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3079
m4_defun([_LT_TAG_COMPILER],
3080
[AC_REQUIRE([AC_PROG_CC])dnl
3082
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3083
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3084
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3085
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3087
# If no C compiler was specified, use CC.
3090
# If no C compiler flags were specified, use CFLAGS.
3091
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3093
# Allow CC to be a program name with arguments.
3095
])# _LT_TAG_COMPILER
3098
# _LT_COMPILER_BOILERPLATE
3099
# ------------------------
3100
# Check for compiler boilerplate output or warnings with
3101
# the simple compiler test code.
3102
m4_defun([_LT_COMPILER_BOILERPLATE],
3103
[m4_require([_LT_DECL_SED])dnl
3104
ac_outfile=conftest.$ac_objext
3105
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3106
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3107
_lt_compiler_boilerplate=`cat conftest.err`
3109
])# _LT_COMPILER_BOILERPLATE
3112
# _LT_LINKER_BOILERPLATE
3113
# ----------------------
3114
# Check for linker boilerplate output or warnings with
3115
# the simple link test code.
3116
m4_defun([_LT_LINKER_BOILERPLATE],
3117
[m4_require([_LT_DECL_SED])dnl
3118
ac_outfile=conftest.$ac_objext
3119
echo "$lt_simple_link_test_code" >conftest.$ac_ext
3120
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3121
_lt_linker_boilerplate=`cat conftest.err`
3123
])# _LT_LINKER_BOILERPLATE
3125
# _LT_REQUIRED_DARWIN_CHECKS
3126
# -------------------------
3127
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3129
rhapsody* | darwin*)
3130
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3131
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3132
AC_CHECK_TOOL([LIPO], [lipo], [:])
3133
AC_CHECK_TOOL([OTOOL], [otool], [:])
3134
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3135
_LT_DECL([], [DSYMUTIL], [1],
3136
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3137
_LT_DECL([], [NMEDIT], [1],
3138
[Tool to change global to local symbols on Mac OS X])
3139
_LT_DECL([], [LIPO], [1],
3140
[Tool to manipulate fat objects and archives on Mac OS X])
3141
_LT_DECL([], [OTOOL], [1],
3142
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
3143
_LT_DECL([], [OTOOL64], [1],
3144
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3146
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3147
[lt_cv_apple_cc_single_mod=no
3148
if test -z "${LT_MULTI_MODULE}"; then
3149
# By default we will add the -single_module flag. You can override
3150
# by either setting the environment variable LT_MULTI_MODULE
3151
# non-empty at configure time, or by adding -multi_module to the
3153
rm -rf libconftest.dylib*
3154
echo "int foo(void){return 1;}" > conftest.c
3155
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3156
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3157
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3158
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3160
# If there is a non-empty error log, and "single_module"
3161
# appears in it, assume the flag caused a linker warning
3162
if test -s conftest.err && $GREP single_module conftest.err; then
3163
cat conftest.err >&AS_MESSAGE_LOG_FD
3164
# Otherwise, if the output was created with a 0 exit code from
3165
# the compiler, it worked.
3166
elif test -f libconftest.dylib && test $_lt_result -eq 0; then
3167
lt_cv_apple_cc_single_mod=yes
3169
cat conftest.err >&AS_MESSAGE_LOG_FD
3171
rm -rf libconftest.dylib*
3175
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3176
[lt_cv_ld_exported_symbols_list],
3177
[lt_cv_ld_exported_symbols_list=no
3178
save_LDFLAGS=$LDFLAGS
3179
echo "_main" > conftest.sym
3180
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3181
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3182
[lt_cv_ld_exported_symbols_list=yes],
3183
[lt_cv_ld_exported_symbols_list=no])
3184
LDFLAGS="$save_LDFLAGS"
3187
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3188
[lt_cv_ld_force_load=no
3189
cat > conftest.c << _LT_EOF
3190
int forced_loaded() { return 2;}
3192
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3193
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3194
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3195
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3196
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3197
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3198
cat > conftest.c << _LT_EOF
3199
int main() { return 0;}
3201
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3202
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3204
if test -s conftest.err && $GREP force_load conftest.err; then
3205
cat conftest.err >&AS_MESSAGE_LOG_FD
3206
elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
3207
lt_cv_ld_force_load=yes
3209
cat conftest.err >&AS_MESSAGE_LOG_FD
3211
rm -f conftest.err libconftest.a conftest conftest.c
3212
rm -rf conftest.dSYM
3215
rhapsody* | darwin1.[[012]])
3216
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3218
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3219
darwin*) # darwin 5.x on
3220
# if running on 10.5 or later, the deployment target defaults
3221
# to the OS version, if on x86, and 10.4, the deployment
3222
# target defaults to 10.4. Don't you love it?
3223
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3224
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3225
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3227
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3229
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3233
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3234
_lt_dar_single_mod='$single_module'
3236
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3237
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3239
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3241
if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3242
_lt_dsymutil='~$DSYMUTIL $lib || :'
3251
# _LT_DARWIN_LINKER_FEATURES([TAG])
3252
# ---------------------------------
3253
# Checks for linker and compiler features on darwin
3254
m4_defun([_LT_DARWIN_LINKER_FEATURES],
3256
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3257
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
3258
_LT_TAGVAR(hardcode_direct, $1)=no
3259
_LT_TAGVAR(hardcode_automatic, $1)=yes
3260
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3261
if test "$lt_cv_ld_force_load" = "yes"; then
3262
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
3263
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
3264
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
3266
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
3268
_LT_TAGVAR(link_all_deplibs, $1)=yes
3269
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3270
case $cc_basename in
3271
ifort*) _lt_dar_can_shared=yes ;;
3272
*) _lt_dar_can_shared=$GCC ;;
3274
if test "$_lt_dar_can_shared" = "yes"; then
3275
output_verbose_link_cmd=func_echo_all
3276
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3277
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3278
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3279
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3281
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3282
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
3283
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
3287
_LT_TAGVAR(ld_shlibs, $1)=no
3291
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3292
# ----------------------------------
3293
# Links a minimal program and checks the executable
3294
# for the system default hardcoded library path. In most cases,
3295
# this is /usr/lib:/lib, but when the MPI compilers are used
3296
# the location of the communication and MPI libs are included too.
3297
# If we don't find anything, use the default library path according
3298
# to the aix ld manual.
3299
# Store the results from the different compilers for each TAGNAME.
3300
# Allow to override them for all tags through lt_cv_aix_libpath.
3301
m4_defun([_LT_SYS_MODULE_PATH_AIX],
3302
[m4_require([_LT_DECL_SED])dnl
3303
if test "${lt_cv_aix_libpath+set}" = set; then
3304
aix_libpath=$lt_cv_aix_libpath
3306
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3307
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3308
lt_aix_libpath_sed='[
3309
/Import File Strings/,/^$/ {
3311
s/^0 *\([^ ]*\) *$/\1/
3315
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3316
# Check for a 64-bit object if we didn't find anything.
3317
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3318
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3320
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3321
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
3324
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3326
])# _LT_SYS_MODULE_PATH_AIX
3329
# _LT_SHELL_INIT(ARG)
3330
# -------------------
3331
m4_define([_LT_SHELL_INIT],
3332
[m4_divert_text([M4SH-INIT], [$1
3333
])])# _LT_SHELL_INIT
3337
# _LT_PROG_ECHO_BACKSLASH
3338
# -----------------------
3339
# Find how we can fake an echo command that does not interpret backslash.
3340
# In particular, with Autoconf 2.60 or later we add some code to the start
3341
# of the generated configure script which will find a shell with a builtin
3342
# printf (which we can use as an echo command).
3343
m4_defun([_LT_PROG_ECHO_BACKSLASH],
3344
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3345
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3346
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3348
AC_MSG_CHECKING([how to print strings])
3349
# Test print first, because it will be a builtin if present.
3350
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3351
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3353
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3356
# Use this function as a fallback that always works.
3357
func_fallback_echo ()
3359
eval 'cat <<_LTECHO_EOF
3363
ECHO='func_fallback_echo'
3366
# func_echo_all arg...
3367
# Invoke $ECHO with all args, space-separated.
3374
printf*) AC_MSG_RESULT([printf]) ;;
3375
print*) AC_MSG_RESULT([print -r]) ;;
3376
*) AC_MSG_RESULT([cat]) ;;
3379
m4_ifdef([_AS_DETECT_SUGGESTED],
3380
[_AS_DETECT_SUGGESTED([
3381
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3382
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3383
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3384
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3385
PATH=/empty FPATH=/empty; export PATH FPATH
3386
test "X`printf %s $ECHO`" = "X$ECHO" \
3387
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3389
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3390
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3391
])# _LT_PROG_ECHO_BACKSLASH
3396
AC_DEFUN([_LT_WITH_SYSROOT],
3397
[AC_MSG_CHECKING([for sysroot])
3398
AC_ARG_WITH([sysroot],
3399
[ --with-sysroot[=DIR] Search for dependent libraries within DIR
3400
(or the compiler's sysroot if not specified).],
3401
[], [with_sysroot=no])
3403
dnl lt_sysroot will always be passed unquoted. We quote it here
3404
dnl in case the user passed a directory name.
3406
case ${with_sysroot} in #(
3408
if test "$GCC" = yes; then
3409
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3413
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3418
AC_MSG_RESULT([${with_sysroot}])
3419
AC_MSG_ERROR([The sysroot must be an absolute path.])
3423
AC_MSG_RESULT([${lt_sysroot:-no}])
3424
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3425
[dependent libraries, and in which our libraries should be installed.])])
3429
m4_defun([_LT_ENABLE_LOCK],
3430
[AC_ARG_ENABLE([libtool-lock],
3431
[AS_HELP_STRING([--disable-libtool-lock],
3432
[avoid locking (might break parallel builds)])])
3433
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3435
# Some flags need to be propagated to the compiler or linker for good
3439
# Find out which ABI we are using.
3440
echo 'int i;' > conftest.$ac_ext
3441
if AC_TRY_EVAL(ac_compile); then
3442
case `/usr/bin/file conftest.$ac_objext` in
3454
# Find out which ABI we are using.
3455
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3456
if AC_TRY_EVAL(ac_compile); then
3457
if test "$lt_cv_prog_gnu_ld" = yes; then
3458
case `/usr/bin/file conftest.$ac_objext` in
3460
LD="${LD-ld} -melf32bsmip"
3463
LD="${LD-ld} -melf32bmipn32"
3466
LD="${LD-ld} -melf64bmip"
3470
case `/usr/bin/file conftest.$ac_objext` in
3486
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3487
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3488
# Find out which ABI we are using.
3489
echo 'int i;' > conftest.$ac_ext
3490
if AC_TRY_EVAL(ac_compile); then
3491
case `/usr/bin/file conftest.o` in
3494
x86_64-*kfreebsd*-gnu)
3495
LD="${LD-ld} -m elf_i386_fbsd"
3498
LD="${LD-ld} -m elf_i386"
3500
ppc64-*linux*|powerpc64-*linux*)
3501
LD="${LD-ld} -m elf32ppclinux"
3504
LD="${LD-ld} -m elf_s390"
3507
LD="${LD-ld} -m elf32_sparc"
3513
x86_64-*kfreebsd*-gnu)
3514
LD="${LD-ld} -m elf_x86_64_fbsd"
3517
LD="${LD-ld} -m elf_x86_64"
3519
ppc*-*linux*|powerpc*-*linux*)
3520
LD="${LD-ld} -m elf64ppc"
3522
s390*-*linux*|s390*-*tpf*)
3523
LD="${LD-ld} -m elf64_s390"
3526
LD="${LD-ld} -m elf64_sparc"
3536
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
3537
SAVE_CFLAGS="$CFLAGS"
3538
CFLAGS="$CFLAGS -belf"
3539
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3541
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3543
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3544
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3545
CFLAGS="$SAVE_CFLAGS"
3549
# Find out which ABI we are using.
3550
echo 'int i;' > conftest.$ac_ext
3551
if AC_TRY_EVAL(ac_compile); then
3552
case `/usr/bin/file conftest.o` in
3554
case $lt_cv_prog_gnu_ld in
3558
LD="${LD-ld} -m elf_x86_64"
3561
LD="${LD-ld} -m elf64_sparc"
3564
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
3565
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3570
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3582
need_locks="$enable_libtool_lock"
3588
m4_defun([_LT_PROG_AR],
3589
[AC_CHECK_TOOLS(AR, [ar], false)
3592
_LT_DECL([], [AR], [1], [The archiver])
3593
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3595
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3596
[lt_cv_ar_at_file=no
3597
AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3598
[echo conftest.$ac_objext > conftest.lst
3599
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3600
AC_TRY_EVAL([lt_ar_try])
3601
if test "$ac_status" -eq 0; then
3602
# Ensure the archiver fails upon bogus file names.
3603
rm -f conftest.$ac_objext libconftest.a
3604
AC_TRY_EVAL([lt_ar_try])
3605
if test "$ac_status" -ne 0; then
3609
rm -f conftest.* libconftest.a
3613
if test "x$lt_cv_ar_at_file" = xno; then
3616
archiver_list_spec=$lt_cv_ar_at_file
3618
_LT_DECL([], [archiver_list_spec], [1],
3619
[How to feed a file listing to the archiver])
3623
# _LT_CMD_OLD_ARCHIVE
3624
# -------------------
3625
m4_defun([_LT_CMD_OLD_ARCHIVE],
3628
AC_CHECK_TOOL(STRIP, strip, :)
3629
test -z "$STRIP" && STRIP=:
3630
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3632
AC_CHECK_TOOL(RANLIB, ranlib, :)
3633
test -z "$RANLIB" && RANLIB=:
3634
_LT_DECL([], [RANLIB], [1],
3635
[Commands used to install an old-style archive])
3637
# Determine commands to create old-style static archives.
3638
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3639
old_postinstall_cmds='chmod 644 $oldlib'
3640
old_postuninstall_cmds=
3642
if test -n "$RANLIB"; then
3645
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
3648
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
3651
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
3656
lock_old_archive_extraction=yes ;;
3658
lock_old_archive_extraction=no ;;
3660
_LT_DECL([], [old_postinstall_cmds], [2])
3661
_LT_DECL([], [old_postuninstall_cmds], [2])
3662
_LT_TAGDECL([], [old_archive_cmds], [2],
3663
[Commands used to build an old-style archive])
3664
_LT_DECL([], [lock_old_archive_extraction], [0],
3665
[Whether to use a lock for old archive extraction])
3666
])# _LT_CMD_OLD_ARCHIVE
3669
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3670
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3671
# ----------------------------------------------------------------
3672
# Check whether the given compiler option works
3673
AC_DEFUN([_LT_COMPILER_OPTION],
3674
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3675
m4_require([_LT_DECL_SED])dnl
3676
AC_CACHE_CHECK([$1], [$2],
3678
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3679
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3680
lt_compiler_flag="$3"
3681
# Insert the option either (1) after the last *FLAGS variable, or
3682
# (2) before a word containing "conftest.", or (3) at the end.
3683
# Note that $ac_compile itself does not contain backslashes and begins
3684
# with a dollar sign (not a hyphen), so the echo should work correctly.
3685
# The option is referenced via a variable to avoid confusing sed.
3686
lt_compile=`echo "$ac_compile" | $SED \
3687
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3688
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3689
-e 's:$: $lt_compiler_flag:'`
3690
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3691
(eval "$lt_compile" 2>conftest.err)
3693
cat conftest.err >&AS_MESSAGE_LOG_FD
3694
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3695
if (exit $ac_status) && test -s "$ac_outfile"; then
3696
# The compiler can only warn and ignore the option if not recognized
3697
# So say no if there are warnings other than the usual output.
3698
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3699
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3700
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3707
if test x"[$]$2" = xyes; then
3708
m4_if([$5], , :, [$5])
3710
m4_if([$6], , :, [$6])
3712
])# _LT_COMPILER_OPTION
3715
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3716
dnl aclocal-1.4 backwards compatibility:
3717
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3720
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3721
# [ACTION-SUCCESS], [ACTION-FAILURE])
3722
# ----------------------------------------------------
3723
# Check whether the given linker option works
3724
AC_DEFUN([_LT_LINKER_OPTION],
3725
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3726
m4_require([_LT_DECL_SED])dnl
3727
AC_CACHE_CHECK([$1], [$2],
3729
save_LDFLAGS="$LDFLAGS"
3730
LDFLAGS="$LDFLAGS $3"
3731
echo "$lt_simple_link_test_code" > conftest.$ac_ext
3732
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3733
# The linker can only warn and ignore the option if not recognized
3734
# So say no if there are warnings
3735
if test -s conftest.err; then
3736
# Append any errors to the config.log.
3737
cat conftest.err 1>&AS_MESSAGE_LOG_FD
3738
$ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3739
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3740
if diff conftest.exp conftest.er2 >/dev/null; then
3748
LDFLAGS="$save_LDFLAGS"
3751
if test x"[$]$2" = xyes; then
3752
m4_if([$4], , :, [$4])
3754
m4_if([$5], , :, [$5])
3756
])# _LT_LINKER_OPTION
3759
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3760
dnl aclocal-1.4 backwards compatibility:
3761
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3766
AC_DEFUN([LT_CMD_MAX_LEN],
3767
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3768
# find the maximum length of command line arguments
3769
AC_MSG_CHECKING([the maximum length of command line arguments])
3770
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3776
# On DJGPP, this test can blow up pretty badly due to problems in libc
3777
# (any single argument exceeding 2000 bytes causes a buffer overrun
3778
# during glob expansion). Even if it were fixed, the result of this
3779
# check would be larger than it should be.
3780
lt_cv_sys_max_cmd_len=12288; # 12K is about right
3784
# Under GNU Hurd, this test is not required because there is
3785
# no limit to the length of command line arguments.
3786
# Libtool will interpret -1 as no limit whatsoever
3787
lt_cv_sys_max_cmd_len=-1;
3790
cygwin* | mingw* | cegcc*)
3791
# On Win9x/ME, this test blows up -- it succeeds, but takes
3792
# about 5 minutes as the teststring grows exponentially.
3793
# Worse, since 9x/ME are not pre-emptively multitasking,
3794
# you end up with a "frozen" computer, even though with patience
3795
# the test eventually succeeds (with a max line length of 256k).
3796
# Instead, let's just punt: use the minimum linelength reported by
3797
# all of the supported platforms: 8192 (on NT/2K/XP).
3798
lt_cv_sys_max_cmd_len=8192;
3802
# On MiNT this can take a long time and run out of memory.
3803
lt_cv_sys_max_cmd_len=8192;
3807
# On AmigaOS with pdksh, this test takes hours, literally.
3808
# So we just punt and use a minimum line length of 8192.
3809
lt_cv_sys_max_cmd_len=8192;
3812
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3813
# This has been around since 386BSD, at least. Likely further.
3814
if test -x /sbin/sysctl; then
3815
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3816
elif test -x /usr/sbin/sysctl; then
3817
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3819
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3821
# And add a safety zone
3822
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3823
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3827
# We know the value 262144 and hardcode it with a safety zone (like BSD)
3828
lt_cv_sys_max_cmd_len=196608
3832
# The test takes a long time on OS/2.
3833
lt_cv_sys_max_cmd_len=8192
3837
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3838
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3839
# nice to cause kernel panics so lets avoid the loop below.
3840
# First set a reasonable default.
3841
lt_cv_sys_max_cmd_len=16384
3843
if test -x /sbin/sysconfig; then
3844
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3845
*1*) lt_cv_sys_max_cmd_len=-1 ;;
3850
lt_cv_sys_max_cmd_len=102400
3852
sysv5* | sco5v6* | sysv4.2uw2*)
3853
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3854
if test -n "$kargmax"; then
3855
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3857
lt_cv_sys_max_cmd_len=32768
3861
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3862
if test -n "$lt_cv_sys_max_cmd_len"; then
3863
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3864
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3866
# Make teststring a little bigger before we do anything with it.
3867
# a 1K string should be a reasonable start.
3868
for i in 1 2 3 4 5 6 7 8 ; do
3869
teststring=$teststring$teststring
3871
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3872
# If test is not a shell built-in, we'll probably end up computing a
3873
# maximum length that is only half of the actual maximum length, but
3875
while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
3876
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
3877
test $i != 17 # 1/2 MB should be enough
3880
teststring=$teststring$teststring
3882
# Only check the string length outside the loop.
3883
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3885
# Add a significant safety factor because C++ compilers can tack on
3886
# massive amounts of additional arguments before passing them to the
3887
# linker. It appears as though 1/2 is a usable value.
3888
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3893
if test -n $lt_cv_sys_max_cmd_len ; then
3894
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3898
max_cmd_len=$lt_cv_sys_max_cmd_len
3899
_LT_DECL([], [max_cmd_len], [0],
3900
[What is the maximum length of a command?])
3904
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3905
dnl aclocal-1.4 backwards compatibility:
3906
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3911
m4_defun([_LT_HEADER_DLFCN],
3912
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3913
])# _LT_HEADER_DLFCN
3916
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3917
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3918
# ----------------------------------------------------------------
3919
m4_defun([_LT_TRY_DLOPEN_SELF],
3920
[m4_require([_LT_HEADER_DLFCN])dnl
3921
if test "$cross_compiling" = yes; then :
3924
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3925
lt_status=$lt_dlunknown
3926
cat > conftest.$ac_ext <<_LT_EOF
3927
[#line $LINENO "configure"
3928
#include "confdefs.h"
3937
# define LT_DLGLOBAL RTLD_GLOBAL
3940
# define LT_DLGLOBAL DL_GLOBAL
3942
# define LT_DLGLOBAL 0
3946
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3947
find out it does not work in some platform. */
3948
#ifndef LT_DLLAZY_OR_NOW
3950
# define LT_DLLAZY_OR_NOW RTLD_LAZY
3953
# define LT_DLLAZY_OR_NOW DL_LAZY
3956
# define LT_DLLAZY_OR_NOW RTLD_NOW
3959
# define LT_DLLAZY_OR_NOW DL_NOW
3961
# define LT_DLLAZY_OR_NOW 0
3968
/* When -fvisbility=hidden is used, assume the code has been annotated
3969
correspondingly for the symbols needed. */
3970
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3971
int fnord () __attribute__((visibility("default")));
3974
int fnord () { return 42; }
3977
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3978
int status = $lt_dlunknown;
3982
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3985
if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3986
else puts (dlerror ());
3988
/* dlclose (self); */
3996
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3997
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4000
x$lt_dlno_uscore) $1 ;;
4001
x$lt_dlneed_uscore) $2 ;;
4002
x$lt_dlunknown|x*) $3 ;;
4005
# compilation failed
4010
])# _LT_TRY_DLOPEN_SELF
4013
# LT_SYS_DLOPEN_SELF
4014
# ------------------
4015
AC_DEFUN([LT_SYS_DLOPEN_SELF],
4016
[m4_require([_LT_HEADER_DLFCN])dnl
4017
if test "x$enable_dlopen" != xyes; then
4018
enable_dlopen=unknown
4019
enable_dlopen_self=unknown
4020
enable_dlopen_self_static=unknown
4027
lt_cv_dlopen="load_add_on"
4029
lt_cv_dlopen_self=yes
4032
mingw* | pw32* | cegcc*)
4033
lt_cv_dlopen="LoadLibrary"
4038
lt_cv_dlopen="dlopen"
4043
# if libdl is installed we need to link against it
4044
AC_CHECK_LIB([dl], [dlopen],
4045
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4048
lt_cv_dlopen_self=yes
4053
AC_CHECK_FUNC([shl_load],
4054
[lt_cv_dlopen="shl_load"],
4055
[AC_CHECK_LIB([dld], [shl_load],
4056
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4057
[AC_CHECK_FUNC([dlopen],
4058
[lt_cv_dlopen="dlopen"],
4059
[AC_CHECK_LIB([dl], [dlopen],
4060
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4061
[AC_CHECK_LIB([svld], [dlopen],
4062
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4063
[AC_CHECK_LIB([dld], [dld_link],
4064
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4073
if test "x$lt_cv_dlopen" != xno; then
4079
case $lt_cv_dlopen in
4081
save_CPPFLAGS="$CPPFLAGS"
4082
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4084
save_LDFLAGS="$LDFLAGS"
4085
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4088
LIBS="$lt_cv_dlopen_libs $LIBS"
4090
AC_CACHE_CHECK([whether a program can dlopen itself],
4091
lt_cv_dlopen_self, [dnl
4092
_LT_TRY_DLOPEN_SELF(
4093
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4094
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4097
if test "x$lt_cv_dlopen_self" = xyes; then
4098
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4099
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4100
lt_cv_dlopen_self_static, [dnl
4101
_LT_TRY_DLOPEN_SELF(
4102
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4103
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
4107
CPPFLAGS="$save_CPPFLAGS"
4108
LDFLAGS="$save_LDFLAGS"
4113
case $lt_cv_dlopen_self in
4114
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4115
*) enable_dlopen_self=unknown ;;
4118
case $lt_cv_dlopen_self_static in
4119
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4120
*) enable_dlopen_self_static=unknown ;;
4123
_LT_DECL([dlopen_support], [enable_dlopen], [0],
4124
[Whether dlopen is supported])
4125
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4126
[Whether dlopen of programs is supported])
4127
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4128
[Whether dlopen of statically linked programs is supported])
4129
])# LT_SYS_DLOPEN_SELF
4132
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4133
dnl aclocal-1.4 backwards compatibility:
4134
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4137
# _LT_COMPILER_C_O([TAGNAME])
4138
# ---------------------------
4139
# Check to see if options -c and -o are simultaneously supported by compiler.
4140
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4141
m4_defun([_LT_COMPILER_C_O],
4142
[m4_require([_LT_DECL_SED])dnl
4143
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4144
m4_require([_LT_TAG_COMPILER])dnl
4145
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4146
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4147
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4148
$RM -r conftest 2>/dev/null
4152
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4154
lt_compiler_flag="-o out/conftest2.$ac_objext"
4155
# Insert the option either (1) after the last *FLAGS variable, or
4156
# (2) before a word containing "conftest.", or (3) at the end.
4157
# Note that $ac_compile itself does not contain backslashes and begins
4158
# with a dollar sign (not a hyphen), so the echo should work correctly.
4159
lt_compile=`echo "$ac_compile" | $SED \
4160
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4161
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4162
-e 's:$: $lt_compiler_flag:'`
4163
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4164
(eval "$lt_compile" 2>out/conftest.err)
4166
cat out/conftest.err >&AS_MESSAGE_LOG_FD
4167
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4168
if (exit $ac_status) && test -s out/conftest2.$ac_objext
4170
# The compiler can only warn and ignore the option if not recognized
4171
# So say no if there are warnings
4172
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4173
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4174
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4175
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4178
chmod u+w . 2>&AS_MESSAGE_LOG_FD
4180
# SGI C++ compiler will create directory out/ii_files/ for
4181
# template instantiation
4182
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4183
$RM out/* && rmdir out
4188
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4189
[Does compiler simultaneously support -c and -o options?])
4190
])# _LT_COMPILER_C_O
4193
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4194
# ----------------------------------
4195
# Check to see if we can do hard links to lock some files if needed
4196
m4_defun([_LT_COMPILER_FILE_LOCKS],
4197
[m4_require([_LT_ENABLE_LOCK])dnl
4198
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4199
_LT_COMPILER_C_O([$1])
4201
hard_links="nottested"
4202
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4203
# do not overwrite the value of need_locks provided by the user
4204
AC_MSG_CHECKING([if we can lock with hard links])
4207
ln conftest.a conftest.b 2>/dev/null && hard_links=no
4209
ln conftest.a conftest.b 2>&5 || hard_links=no
4210
ln conftest.a conftest.b 2>/dev/null && hard_links=no
4211
AC_MSG_RESULT([$hard_links])
4212
if test "$hard_links" = no; then
4213
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4219
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4220
])# _LT_COMPILER_FILE_LOCKS
4225
m4_defun([_LT_CHECK_OBJDIR],
4226
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4227
[rm -f .libs 2>/dev/null
4228
mkdir .libs 2>/dev/null
4229
if test -d .libs; then
4232
# MS-DOS does not allow filenames that begin with a dot.
4235
rmdir .libs 2>/dev/null])
4236
objdir=$lt_cv_objdir
4237
_LT_DECL([], [objdir], [0],
4238
[The name of the directory that contains temporary libtool files])dnl
4239
m4_pattern_allow([LT_OBJDIR])dnl
4240
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4241
[Define to the sub-directory in which libtool stores uninstalled libraries.])
4242
])# _LT_CHECK_OBJDIR
4245
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4246
# --------------------------------------
4247
# Check hardcoding attributes.
4248
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4249
[AC_MSG_CHECKING([how to hardcode library paths into programs])
4250
_LT_TAGVAR(hardcode_action, $1)=
4251
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4252
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4253
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4255
# We can hardcode non-existent directories.
4256
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4257
# If the only mechanism to avoid hardcoding is shlibpath_var, we
4258
# have to relink, otherwise we might link with an installed library
4259
# when we should be linking with a yet-to-be-installed one
4260
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4261
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4262
# Linking always hardcodes the temporary library directory.
4263
_LT_TAGVAR(hardcode_action, $1)=relink
4265
# We can link without hardcoding, and we can hardcode nonexisting dirs.
4266
_LT_TAGVAR(hardcode_action, $1)=immediate
4269
# We cannot hardcode anything, or else we can only hardcode existing
4271
_LT_TAGVAR(hardcode_action, $1)=unsupported
4273
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4275
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4276
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4277
# Fast installation is not supported
4278
enable_fast_install=no
4279
elif test "$shlibpath_overrides_runpath" = yes ||
4280
test "$enable_shared" = no; then
4281
# Fast installation is not necessary
4282
enable_fast_install=needless
4284
_LT_TAGDECL([], [hardcode_action], [0],
4285
[How to hardcode a shared library path into an executable])
4286
])# _LT_LINKER_HARDCODE_LIBPATH
4291
m4_defun([_LT_CMD_STRIPLIB],
4292
[m4_require([_LT_DECL_EGREP])
4295
AC_MSG_CHECKING([whether stripping libraries is possible])
4296
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4297
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4298
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4299
AC_MSG_RESULT([yes])
4301
# FIXME - insert some real tests, host_os isn't really good enough
4304
if test -n "$STRIP" ; then
4305
striplib="$STRIP -x"
4306
old_striplib="$STRIP -S"
4307
AC_MSG_RESULT([yes])
4317
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4318
_LT_DECL([], [striplib], [1])
4319
])# _LT_CMD_STRIPLIB
4322
# _LT_SYS_DYNAMIC_LINKER([TAG])
4323
# -----------------------------
4324
# PORTME Fill in your ld.so characteristics
4325
m4_defun([_LT_SYS_DYNAMIC_LINKER],
4326
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4327
m4_require([_LT_DECL_EGREP])dnl
4328
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4329
m4_require([_LT_DECL_OBJDUMP])dnl
4330
m4_require([_LT_DECL_SED])dnl
4331
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4332
AC_MSG_CHECKING([dynamic linker characteristics])
4335
if test "$GCC" = yes; then
4337
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4338
*) lt_awk_arg="/^libraries:/" ;;
4341
mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4342
*) lt_sed_strip_eq="s,=/,/,g" ;;
4344
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4345
case $lt_search_path_spec in
4347
# if the path contains ";" then we assume it to be the separator
4348
# otherwise default to the standard path separator (i.e. ":") - it is
4349
# assumed that no part of a normal pathname contains ";" but that should
4350
# okay in the real world where ";" in dirpaths is itself problematic.
4351
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4354
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4357
# Ok, now we have the path, separated by spaces, we can step through it
4358
# and add multilib dir if necessary.
4359
lt_tmp_lt_search_path_spec=
4360
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4361
for lt_sys_path in $lt_search_path_spec; do
4362
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4363
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4365
test -d "$lt_sys_path" && \
4366
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4369
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4370
BEGIN {RS=" "; FS="/|\n";} {
4373
for (lt_i = NF; lt_i > 0; lt_i--) {
4374
if ($lt_i != "" && $lt_i != ".") {
4375
if ($lt_i == "..") {
4378
if (lt_count == 0) {
4379
lt_foo="/" $lt_i lt_foo;
4386
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4387
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4389
# AWK program above erroneously prepends '/' to C:/dos/paths
4392
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4393
$SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4395
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4397
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4400
libname_spec='lib$name'
4408
shlibpath_overrides_runpath=unknown
4410
dynamic_linker="$host_os ld.so"
4411
sys_lib_dlsearch_path_spec="/lib /usr/lib"
4412
need_lib_prefix=unknown
4413
hardcode_into_libs=no
4415
# when you set need_version to no, make sure it does not cause -set_version
4416
# flags to be left without arguments
4417
need_version=unknown
4421
version_type=linux # correct to gnu/linux during the next big refactor
4422
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4423
shlibpath_var=LIBPATH
4425
# AIX 3 has no versioning support, so we append a major version to the name.
4426
soname_spec='${libname}${release}${shared_ext}$major'
4430
version_type=linux # correct to gnu/linux during the next big refactor
4433
hardcode_into_libs=yes
4434
if test "$host_cpu" = ia64; then
4435
# AIX 5 supports IA64
4436
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4437
shlibpath_var=LD_LIBRARY_PATH
4439
# With GCC up to 2.95.x, collect2 would create an import file
4440
# for dependence libraries. The import file would start with
4441
# the line `#! .'. This would cause the generated library to
4442
# depend on `.', always an invalid library. This was fixed in
4443
# development snapshots of GCC prior to 3.0.
4445
aix4 | aix4.[[01]] | aix4.[[01]].*)
4446
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4448
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4455
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4456
# soname into executable. Probably we can add versioning support to
4457
# collect2, so additional links can be useful in future.
4458
if test "$aix_use_runtimelinking" = yes; then
4459
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
4460
# instead of lib<name>.a to let people know that these are not
4461
# typical AIX shared libraries.
4462
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4464
# We preserve .a as extension for shared libraries through AIX4.2
4465
# and later when we are not doing run time linking.
4466
library_names_spec='${libname}${release}.a $libname.a'
4467
soname_spec='${libname}${release}${shared_ext}$major'
4469
shlibpath_var=LIBPATH
4476
# Since July 2007 AmigaOS4 officially supports .so libraries.
4477
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4478
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4481
library_names_spec='$libname.ixlibrary $libname.a'
4482
# Create ${libname}_ixlibrary.a entries in /sys/libs.
4483
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4489
library_names_spec='${libname}${shared_ext}'
4490
dynamic_linker="$host_os ld.so"
4491
shlibpath_var=LIBRARY_PATH
4495
version_type=linux # correct to gnu/linux during the next big refactor
4497
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4498
soname_spec='${libname}${release}${shared_ext}$major'
4499
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4500
shlibpath_var=LD_LIBRARY_PATH
4501
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4502
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4503
# the default ld.so.conf also contains /usr/contrib/lib and
4504
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4505
# libtool to hard-code these into programs
4508
cygwin* | mingw* | pw32* | cegcc*)
4509
version_type=windows
4514
case $GCC,$cc_basename in
4517
library_names_spec='$libname.dll.a'
4518
# DLL is installed to $(libdir)/../bin by postinstall_cmds
4519
postinstall_cmds='base_file=`basename \${file}`~
4520
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4521
dldir=$destdir/`dirname \$dlpath`~
4522
test -d \$dldir || mkdir -p \$dldir~
4523
$install_prog $dir/$dlname \$dldir/$dlname~
4524
chmod a+x \$dldir/$dlname~
4525
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4526
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4528
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4529
dlpath=$dir/\$dldll~
4531
shlibpath_overrides_runpath=yes
4535
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
4536
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4538
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4541
# MinGW DLLs use traditional 'lib' prefix
4542
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4545
# pw32 DLLs use 'pw' prefix rather than 'lib'
4546
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4549
dynamic_linker='Win32 ld.exe'
4554
libname_spec='$name'
4555
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4556
library_names_spec='${libname}.dll.lib'
4560
sys_lib_search_path_spec=
4566
# Let DOS variable expansion print the short 8.3 style file name.
4567
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4568
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4571
# Convert to MSYS style.
4572
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4575
# Convert to unix form, then to dos form, then back to unix form
4576
# but this time dos style (no spaces!) so that the unix form looks
4577
# like /cygdrive/c/PROGRA~1:/cygdr...
4578
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4579
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4580
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4583
sys_lib_search_path_spec="$LIB"
4584
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4585
# It is most probably a Windows format PATH.
4586
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4588
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4590
# FIXME: find the short name or the path components, as spaces are
4591
# common. (e.g. "Program Files" -> "PROGRA~1")
4595
# DLL is installed to $(libdir)/../bin by postinstall_cmds
4596
postinstall_cmds='base_file=`basename \${file}`~
4597
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4598
dldir=$destdir/`dirname \$dlpath`~
4599
test -d \$dldir || mkdir -p \$dldir~
4600
$install_prog $dir/$dlname \$dldir/$dlname'
4601
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4602
dlpath=$dir/\$dldll~
4604
shlibpath_overrides_runpath=yes
4605
dynamic_linker='Win32 link.exe'
4609
# Assume MSVC wrapper
4610
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4611
dynamic_linker='Win32 ld.exe'
4614
# FIXME: first we should search . and the directory the executable is in
4618
darwin* | rhapsody*)
4619
dynamic_linker="$host_os dyld"
4623
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4624
soname_spec='${libname}${release}${major}$shared_ext'
4625
shlibpath_overrides_runpath=yes
4626
shlibpath_var=DYLD_LIBRARY_PATH
4627
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4629
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4630
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4634
version_type=linux # correct to gnu/linux during the next big refactor
4637
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4638
soname_spec='${libname}${release}${shared_ext}$major'
4639
shlibpath_var=LD_LIBRARY_PATH
4642
freebsd* | dragonfly*)
4643
# DragonFly does not have aout. When/if they implement a new
4644
# versioning mechanism, adjust this.
4645
if test -x /usr/bin/objformat; then
4646
objformat=`/usr/bin/objformat`
4649
freebsd[[23]].*) objformat=aout ;;
4653
version_type=freebsd-$objformat
4654
case $version_type in
4656
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4661
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4665
shlibpath_var=LD_LIBRARY_PATH
4668
shlibpath_overrides_runpath=yes
4670
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4671
shlibpath_overrides_runpath=yes
4672
hardcode_into_libs=yes
4674
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4675
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4676
shlibpath_overrides_runpath=no
4677
hardcode_into_libs=yes
4679
*) # from 4.6 on, and DragonFly
4680
shlibpath_overrides_runpath=yes
4681
hardcode_into_libs=yes
4687
version_type=linux # correct to gnu/linux during the next big refactor
4690
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4691
soname_spec='${libname}${release}${shared_ext}$major'
4692
shlibpath_var=LD_LIBRARY_PATH
4693
shlibpath_overrides_runpath=no
4694
hardcode_into_libs=yes
4698
version_type=linux # correct to gnu/linux during the next big refactor
4701
dynamic_linker="$host_os runtime_loader"
4702
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4703
soname_spec='${libname}${release}${shared_ext}$major'
4704
shlibpath_var=LIBRARY_PATH
4705
shlibpath_overrides_runpath=yes
4706
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4707
hardcode_into_libs=yes
4710
hpux9* | hpux10* | hpux11*)
4711
# Give a soname corresponding to the major version so that dld.sl refuses to
4712
# link against other versions.
4719
hardcode_into_libs=yes
4720
dynamic_linker="$host_os dld.so"
4721
shlibpath_var=LD_LIBRARY_PATH
4722
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4723
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4724
soname_spec='${libname}${release}${shared_ext}$major'
4725
if test "X$HPUX_IA64_MODE" = X32; then
4726
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4728
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4730
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4734
hardcode_into_libs=yes
4735
dynamic_linker="$host_os dld.sl"
4736
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4737
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4738
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4739
soname_spec='${libname}${release}${shared_ext}$major'
4740
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4741
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4745
dynamic_linker="$host_os dld.sl"
4746
shlibpath_var=SHLIB_PATH
4747
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4748
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4749
soname_spec='${libname}${release}${shared_ext}$major'
4752
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4753
postinstall_cmds='chmod 555 $lib'
4754
# or fails outright, so override atomically:
4755
install_override_mode=555
4759
version_type=linux # correct to gnu/linux during the next big refactor
4762
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4763
soname_spec='${libname}${release}${shared_ext}$major'
4764
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4765
shlibpath_var=LD_LIBRARY_PATH
4766
shlibpath_overrides_runpath=no
4767
hardcode_into_libs=yes
4770
irix5* | irix6* | nonstopux*)
4772
nonstopux*) version_type=nonstopux ;;
4774
if test "$lt_cv_prog_gnu_ld" = yes; then
4775
version_type=linux # correct to gnu/linux during the next big refactor
4782
soname_spec='${libname}${release}${shared_ext}$major'
4783
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4785
irix5* | nonstopux*)
4789
case $LD in # libtool.m4 will add one of these switches to LD
4790
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4791
libsuff= shlibsuff= libmagic=32-bit;;
4792
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4793
libsuff=32 shlibsuff=N32 libmagic=N32;;
4794
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4795
libsuff=64 shlibsuff=64 libmagic=64-bit;;
4796
*) libsuff= shlibsuff= libmagic=never-match;;
4800
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4801
shlibpath_overrides_runpath=no
4802
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4803
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4804
hardcode_into_libs=yes
4807
# No shared lib support for Linux oldld, aout, or coff.
4808
linux*oldld* | linux*aout* | linux*coff*)
4812
# This must be glibc/ELF.
4813
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4814
version_type=linux # correct to gnu/linux during the next big refactor
4817
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4818
soname_spec='${libname}${release}${shared_ext}$major'
4819
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4820
shlibpath_var=LD_LIBRARY_PATH
4821
shlibpath_overrides_runpath=no
4823
# Some binutils ld are patched to set DT_RUNPATH
4824
AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4825
[lt_cv_shlibpath_overrides_runpath=no
4826
save_LDFLAGS=$LDFLAGS
4828
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4829
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4830
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4831
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4832
[lt_cv_shlibpath_overrides_runpath=yes])])
4833
LDFLAGS=$save_LDFLAGS
4836
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4838
# This implies no fast_install, which is unacceptable.
4839
# Some rework will be needed to allow for fast_install
4840
# before this can be enabled.
4841
hardcode_into_libs=yes
4843
# Add ABI-specific directories to the system library path.
4844
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
4846
# Append ld.so.conf contents to the search path
4847
if test -f /etc/ld.so.conf; then
4848
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
4849
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
4853
# We used to test for /lib/ld.so.1 and disable shared libraries on
4854
# powerpc, because MkLinux only supported shared libraries with the
4855
# GNU dynamic linker. Since this was broken with cross compilers,
4856
# most powerpc-linux boxes support dynamic linking these days and
4857
# people can always --disable-shared, the test was removed, and we
4858
# assume the GNU/Linux dynamic linker is in use.
4859
dynamic_linker='GNU/Linux ld.so'
4866
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4867
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4868
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4869
dynamic_linker='NetBSD (a.out) ld.so'
4871
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4872
soname_spec='${libname}${release}${shared_ext}$major'
4873
dynamic_linker='NetBSD ld.elf_so'
4875
shlibpath_var=LD_LIBRARY_PATH
4876
shlibpath_overrides_runpath=yes
4877
hardcode_into_libs=yes
4881
version_type=linux # correct to gnu/linux during the next big refactor
4882
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4883
shlibpath_var=LD_LIBRARY_PATH
4884
shlibpath_overrides_runpath=yes
4891
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4892
soname_spec='${libname}${release}${shared_ext}$major'
4893
shlibpath_var=LD_LIBRARY_PATH
4894
shlibpath_overrides_runpath=no
4895
hardcode_into_libs=yes
4896
dynamic_linker='ldqnx.so'
4901
sys_lib_dlsearch_path_spec="/usr/lib"
4903
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4905
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4906
*) need_version=no ;;
4908
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4909
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4910
shlibpath_var=LD_LIBRARY_PATH
4911
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4913
openbsd2.[[89]] | openbsd2.[[89]].*)
4914
shlibpath_overrides_runpath=no
4917
shlibpath_overrides_runpath=yes
4921
shlibpath_overrides_runpath=yes
4926
libname_spec='$name'
4929
library_names_spec='$libname${shared_ext} $libname.a'
4930
dynamic_linker='OS/2 ld.exe'
4931
shlibpath_var=LIBPATH
4934
osf3* | osf4* | osf5*)
4938
soname_spec='${libname}${release}${shared_ext}$major'
4939
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4940
shlibpath_var=LD_LIBRARY_PATH
4941
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4942
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4950
version_type=linux # correct to gnu/linux during the next big refactor
4953
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4954
soname_spec='${libname}${release}${shared_ext}$major'
4955
shlibpath_var=LD_LIBRARY_PATH
4956
shlibpath_overrides_runpath=yes
4957
hardcode_into_libs=yes
4958
# ldd complains unless libraries are executable
4959
postinstall_cmds='chmod +x $lib'
4964
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4965
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4966
shlibpath_var=LD_LIBRARY_PATH
4967
shlibpath_overrides_runpath=yes
4968
if test "$with_gnu_ld" = yes; then
4975
version_type=linux # correct to gnu/linux during the next big refactor
4976
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4977
soname_spec='${libname}${release}${shared_ext}$major'
4978
shlibpath_var=LD_LIBRARY_PATH
4979
case $host_vendor in
4981
shlibpath_overrides_runpath=no
4983
runpath_var=LD_RUN_PATH
4991
shlibpath_overrides_runpath=no
4992
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4998
if test -d /usr/nec ;then
4999
version_type=linux # correct to gnu/linux during the next big refactor
5000
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
5001
soname_spec='$libname${shared_ext}.$major'
5002
shlibpath_var=LD_LIBRARY_PATH
5006
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5007
version_type=freebsd-elf
5010
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5011
soname_spec='${libname}${release}${shared_ext}$major'
5012
shlibpath_var=LD_LIBRARY_PATH
5013
shlibpath_overrides_runpath=yes
5014
hardcode_into_libs=yes
5015
if test "$with_gnu_ld" = yes; then
5016
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5018
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5021
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5025
sys_lib_dlsearch_path_spec='/usr/lib'
5029
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
5030
version_type=linux # correct to gnu/linux during the next big refactor
5033
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5034
shlibpath_var=LD_LIBRARY_PATH
5035
shlibpath_overrides_runpath=no
5036
hardcode_into_libs=yes
5040
version_type=linux # correct to gnu/linux during the next big refactor
5041
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5042
soname_spec='${libname}${release}${shared_ext}$major'
5043
shlibpath_var=LD_LIBRARY_PATH
5050
AC_MSG_RESULT([$dynamic_linker])
5051
test "$dynamic_linker" = no && can_build_shared=no
5053
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5054
if test "$GCC" = yes; then
5055
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5058
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5059
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5061
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5062
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5065
_LT_DECL([], [variables_saved_for_relink], [1],
5066
[Variables whose values should be saved in libtool wrapper scripts and
5067
restored at link time])
5068
_LT_DECL([], [need_lib_prefix], [0],
5069
[Do we need the "lib" prefix for modules?])
5070
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5071
_LT_DECL([], [version_type], [0], [Library versioning type])
5072
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
5073
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5074
_LT_DECL([], [shlibpath_overrides_runpath], [0],
5075
[Is shlibpath searched before the hard-coded library search path?])
5076
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5077
_LT_DECL([], [library_names_spec], [1],
5078
[[List of archive names. First name is the real one, the rest are links.
5079
The last name is the one that the linker finds with -lNAME]])
5080
_LT_DECL([], [soname_spec], [1],
5081
[[The coded name of the library, if different from the real name]])
5082
_LT_DECL([], [install_override_mode], [1],
5083
[Permission mode override for installation of shared libraries])
5084
_LT_DECL([], [postinstall_cmds], [2],
5085
[Command to use after installation of a shared archive])
5086
_LT_DECL([], [postuninstall_cmds], [2],
5087
[Command to use after uninstallation of a shared archive])
5088
_LT_DECL([], [finish_cmds], [2],
5089
[Commands used to finish a libtool library installation in a directory])
5090
_LT_DECL([], [finish_eval], [1],
5091
[[As "finish_cmds", except a single script fragment to be evaled but
5093
_LT_DECL([], [hardcode_into_libs], [0],
5094
[Whether we should hardcode library paths into libraries])
5095
_LT_DECL([], [sys_lib_search_path_spec], [2],
5096
[Compile-time system search path for libraries])
5097
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5098
[Run-time system search path for libraries])
5099
])# _LT_SYS_DYNAMIC_LINKER
5102
# _LT_PATH_TOOL_PREFIX(TOOL)
5103
# --------------------------
5104
# find a file program which can recognize shared library
5105
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5106
[m4_require([_LT_DECL_EGREP])dnl
5107
AC_MSG_CHECKING([for $1])
5108
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5110
[[\\/*] | ?:[\\/]*])
5111
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5114
lt_save_MAGIC_CMD="$MAGIC_CMD"
5115
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5116
dnl $ac_dummy forces splitting on constant user-supplied paths.
5117
dnl POSIX.2 word splitting is done only on the output of word expansions,
5118
dnl not every word. This closes a longstanding sh security hole.
5119
ac_dummy="m4_if([$2], , $PATH, [$2])"
5120
for ac_dir in $ac_dummy; do
5122
test -z "$ac_dir" && ac_dir=.
5123
if test -f $ac_dir/$1; then
5124
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5125
if test -n "$file_magic_test_file"; then
5126
case $deplibs_check_method in
5128
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5129
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5130
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5131
$EGREP "$file_magic_regex" > /dev/null; then
5136
*** Warning: the command libtool uses to detect shared libraries,
5137
*** $file_magic_cmd, produces output that libtool cannot recognize.
5138
*** The result is that libtool may fail to recognize shared libraries
5139
*** as such. This will affect the creation of libtool libraries that
5140
*** depend on shared libraries, but programs linked with such libtool
5141
*** libraries will work regardless of this problem. Nevertheless, you
5142
*** may want to report the problem to your system manager and/or to
5143
*** bug-libtool@gnu.org
5153
MAGIC_CMD="$lt_save_MAGIC_CMD"
5156
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5157
if test -n "$MAGIC_CMD"; then
5158
AC_MSG_RESULT($MAGIC_CMD)
5162
_LT_DECL([], [MAGIC_CMD], [0],
5163
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
5164
])# _LT_PATH_TOOL_PREFIX
5167
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5168
dnl aclocal-1.4 backwards compatibility:
5169
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5174
# find a file program which can recognize a shared library
5175
m4_defun([_LT_PATH_MAGIC],
5176
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5177
if test -z "$lt_cv_path_MAGIC_CMD"; then
5178
if test -n "$ac_tool_prefix"; then
5179
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5189
# find the pathname to the GNU or non-GNU linker
5190
AC_DEFUN([LT_PATH_LD],
5191
[AC_REQUIRE([AC_PROG_CC])dnl
5192
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5193
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5194
m4_require([_LT_DECL_SED])dnl
5195
m4_require([_LT_DECL_EGREP])dnl
5196
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5198
AC_ARG_WITH([gnu-ld],
5199
[AS_HELP_STRING([--with-gnu-ld],
5200
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5201
[test "$withval" = no || with_gnu_ld=yes],
5202
[with_gnu_ld=no])dnl
5205
if test "$GCC" = yes; then
5206
# Check if gcc -print-prog-name=ld gives a path.
5207
AC_MSG_CHECKING([for ld used by $CC])
5210
# gcc leaves a trailing carriage return which upsets mingw
5211
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5213
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5216
# Accept absolute paths.
5217
[[\\/]]* | ?:[[\\/]]*)
5218
re_direlt='/[[^/]][[^/]]*/\.\./'
5219
# Canonicalize the pathname of ld
5220
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5221
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5222
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5224
test -z "$LD" && LD="$ac_prog"
5227
# If it fails, then pretend we aren't using GCC.
5231
# If it is relative, then search for the first ld in PATH.
5235
elif test "$with_gnu_ld" = yes; then
5236
AC_MSG_CHECKING([for GNU ld])
5238
AC_MSG_CHECKING([for non-GNU ld])
5240
AC_CACHE_VAL(lt_cv_path_LD,
5241
[if test -z "$LD"; then
5242
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5243
for ac_dir in $PATH; do
5245
test -z "$ac_dir" && ac_dir=.
5246
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5247
lt_cv_path_LD="$ac_dir/$ac_prog"
5248
# Check to see if the program is GNU ld. I'd rather use --version,
5249
# but apparently some variants of GNU ld only accept -v.
5250
# Break only if it was the GNU/non-GNU ld that we prefer.
5251
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5252
*GNU* | *'with BFD'*)
5253
test "$with_gnu_ld" != no && break
5256
test "$with_gnu_ld" != yes && break
5263
lt_cv_path_LD="$LD" # Let the user override the test with a path.
5266
if test -n "$LD"; then
5271
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5275
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5279
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5280
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5281
dnl aclocal-1.4 backwards compatibility:
5282
dnl AC_DEFUN([AM_PROG_LD], [])
5283
dnl AC_DEFUN([AC_PROG_LD], [])
5288
m4_defun([_LT_PATH_LD_GNU],
5289
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5290
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5291
case `$LD -v 2>&1 </dev/null` in
5292
*GNU* | *'with BFD'*)
5293
lt_cv_prog_gnu_ld=yes
5296
lt_cv_prog_gnu_ld=no
5299
with_gnu_ld=$lt_cv_prog_gnu_ld
5305
# find reload flag for linker
5306
# -- PORTME Some linkers may need a different reload flag.
5307
m4_defun([_LT_CMD_RELOAD],
5308
[AC_CACHE_CHECK([for $LD option to reload object files],
5309
lt_cv_ld_reload_flag,
5310
[lt_cv_ld_reload_flag='-r'])
5311
reload_flag=$lt_cv_ld_reload_flag
5312
case $reload_flag in
5314
*) reload_flag=" $reload_flag" ;;
5316
reload_cmds='$LD$reload_flag -o $output$reload_objs'
5318
cygwin* | mingw* | pw32* | cegcc*)
5319
if test "$GCC" != yes; then
5324
if test "$GCC" = yes; then
5325
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5327
reload_cmds='$LD$reload_flag -o $output$reload_objs'
5331
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5332
_LT_TAGDECL([], [reload_cmds], [2])dnl
5336
# _LT_CHECK_MAGIC_METHOD
5337
# ----------------------
5338
# how to check for library dependencies
5339
# -- PORTME fill in with the dynamic library characteristics
5340
m4_defun([_LT_CHECK_MAGIC_METHOD],
5341
[m4_require([_LT_DECL_EGREP])
5342
m4_require([_LT_DECL_OBJDUMP])
5343
AC_CACHE_CHECK([how to recognize dependent libraries],
5344
lt_cv_deplibs_check_method,
5345
[lt_cv_file_magic_cmd='$MAGIC_CMD'
5346
lt_cv_file_magic_test_file=
5347
lt_cv_deplibs_check_method='unknown'
5348
# Need to set the preceding variable on all platforms that support
5349
# interlibrary dependencies.
5350
# 'none' -- dependencies not supported.
5351
# `unknown' -- same as none, but documents that we really don't know.
5352
# 'pass_all' -- all dependencies passed with no checks.
5353
# 'test_compile' -- check by making test program.
5354
# 'file_magic [[regex]]' -- check by looking for files in library path
5355
# which responds to the $file_magic_cmd with a given extended regex.
5356
# If you have `file' or equivalent on your system and you're not sure
5357
# whether `pass_all' will *always* work, you probably want this one.
5361
lt_cv_deplibs_check_method=pass_all
5365
lt_cv_deplibs_check_method=pass_all
5369
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5370
lt_cv_file_magic_cmd='/usr/bin/file -L'
5371
lt_cv_file_magic_test_file=/shlib/libc.so
5375
# func_win32_libid is a shell function defined in ltmain.sh
5376
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5377
lt_cv_file_magic_cmd='func_win32_libid'
5381
# Base MSYS/MinGW do not provide the 'file' command needed by
5382
# func_win32_libid shell function, so use a weaker test based on 'objdump',
5383
# unless we find 'file', for example because we are cross-compiling.
5384
# func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5385
if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5386
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5387
lt_cv_file_magic_cmd='func_win32_libid'
5389
# Keep this pattern in sync with the one in func_win32_libid.
5390
lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5391
lt_cv_file_magic_cmd='$OBJDUMP -f'
5396
# use the weaker test based on 'objdump'. See mingw*.
5397
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5398
lt_cv_file_magic_cmd='$OBJDUMP -f'
5401
darwin* | rhapsody*)
5402
lt_cv_deplibs_check_method=pass_all
5405
freebsd* | dragonfly*)
5406
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5409
# Not sure whether the presence of OpenBSD here was a mistake.
5410
# Let's accept both of them until this is cleared up.
5411
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5412
lt_cv_file_magic_cmd=/usr/bin/file
5413
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5417
lt_cv_deplibs_check_method=pass_all
5422
lt_cv_deplibs_check_method=pass_all
5426
lt_cv_deplibs_check_method=pass_all
5429
hpux10.20* | hpux11*)
5430
lt_cv_file_magic_cmd=/usr/bin/file
5433
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5434
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5437
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
5438
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5441
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5442
lt_cv_file_magic_test_file=/usr/lib/libc.sl
5448
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5449
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5452
irix5* | irix6* | nonstopux*)
5454
*-32|*"-32 ") libmagic=32-bit;;
5455
*-n32|*"-n32 ") libmagic=N32;;
5456
*-64|*"-64 ") libmagic=64-bit;;
5457
*) libmagic=never-match;;
5459
lt_cv_deplibs_check_method=pass_all
5462
# This must be glibc/ELF.
5463
linux* | k*bsd*-gnu | kopensolaris*-gnu)
5464
lt_cv_deplibs_check_method=pass_all
5468
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5469
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5471
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5476
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5477
lt_cv_file_magic_cmd=/usr/bin/file
5478
lt_cv_file_magic_test_file=/usr/lib/libnls.so
5482
lt_cv_deplibs_check_method=pass_all
5486
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5487
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5489
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5493
osf3* | osf4* | osf5*)
5494
lt_cv_deplibs_check_method=pass_all
5498
lt_cv_deplibs_check_method=pass_all
5502
lt_cv_deplibs_check_method=pass_all
5505
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5506
lt_cv_deplibs_check_method=pass_all
5510
case $host_vendor in
5512
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]]'
5513
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5516
lt_cv_deplibs_check_method=pass_all
5519
lt_cv_file_magic_cmd='/bin/file'
5520
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5523
lt_cv_file_magic_cmd='/bin/file'
5524
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5525
lt_cv_file_magic_test_file=/lib/libc.so
5528
lt_cv_deplibs_check_method=pass_all
5531
lt_cv_deplibs_check_method=pass_all
5537
lt_cv_deplibs_check_method=pass_all
5544
if test "$build" = "$host"; then
5547
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5550
file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5556
file_magic_cmd=$lt_cv_file_magic_cmd
5557
deplibs_check_method=$lt_cv_deplibs_check_method
5558
test -z "$deplibs_check_method" && deplibs_check_method=unknown
5560
_LT_DECL([], [deplibs_check_method], [1],
5561
[Method to check whether dependent libraries are shared objects])
5562
_LT_DECL([], [file_magic_cmd], [1],
5563
[Command to use when deplibs_check_method = "file_magic"])
5564
_LT_DECL([], [file_magic_glob], [1],
5565
[How to find potential files when deplibs_check_method = "file_magic"])
5566
_LT_DECL([], [want_nocaseglob], [1],
5567
[Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5568
])# _LT_CHECK_MAGIC_METHOD
5573
# find the pathname to a BSD- or MS-compatible name lister
5574
AC_DEFUN([LT_PATH_NM],
5575
[AC_REQUIRE([AC_PROG_CC])dnl
5576
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5577
[if test -n "$NM"; then
5578
# Let the user override the test.
5581
lt_nm_to_check="${ac_tool_prefix}nm"
5582
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5583
lt_nm_to_check="$lt_nm_to_check nm"
5585
for lt_tmp_nm in $lt_nm_to_check; do
5586
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5587
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5589
test -z "$ac_dir" && ac_dir=.
5590
tmp_nm="$ac_dir/$lt_tmp_nm"
5591
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5592
# Check to see if the nm accepts a BSD-compat flag.
5593
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5594
# nm: unknown option "B" ignored
5595
# Tru64's nm complains that /dev/null is an invalid object file
5596
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5597
*/dev/null* | *'Invalid file or object type'*)
5598
lt_cv_path_NM="$tmp_nm -B"
5602
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5604
lt_cv_path_NM="$tmp_nm -p"
5608
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5609
continue # so that we can try to find one that supports BSD flags
5618
: ${lt_cv_path_NM=no}
5620
if test "$lt_cv_path_NM" != "no"; then
5623
# Didn't find any BSD compatible name lister, look for dumpbin.
5624
if test -n "$DUMPBIN"; then :
5625
# Let the user override the test.
5627
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5628
case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5630
DUMPBIN="$DUMPBIN -symbols"
5638
if test "$DUMPBIN" != ":"; then
5642
test -z "$NM" && NM=nm
5644
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5646
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5647
[lt_cv_nm_interface="BSD nm"
5648
echo "int some_variable = 0;" > conftest.$ac_ext
5649
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5650
(eval "$ac_compile" 2>conftest.err)
5651
cat conftest.err >&AS_MESSAGE_LOG_FD
5652
(eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5653
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5654
cat conftest.err >&AS_MESSAGE_LOG_FD
5655
(eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5656
cat conftest.out >&AS_MESSAGE_LOG_FD
5657
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5658
lt_cv_nm_interface="MS dumpbin"
5664
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5665
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5666
dnl aclocal-1.4 backwards compatibility:
5667
dnl AC_DEFUN([AM_PROG_NM], [])
5668
dnl AC_DEFUN([AC_PROG_NM], [])
5670
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5671
# --------------------------------
5672
# how to determine the name of the shared library
5673
# associated with a specific link library.
5674
# -- PORTME fill in with the dynamic library characteristics
5675
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5676
[m4_require([_LT_DECL_EGREP])
5677
m4_require([_LT_DECL_OBJDUMP])
5678
m4_require([_LT_DECL_DLLTOOL])
5679
AC_CACHE_CHECK([how to associate runtime and link libraries],
5680
lt_cv_sharedlib_from_linklib_cmd,
5681
[lt_cv_sharedlib_from_linklib_cmd='unknown'
5684
cygwin* | mingw* | pw32* | cegcc*)
5685
# two different shell functions defined in ltmain.sh
5686
# decide which to use based on capabilities of $DLLTOOL
5687
case `$DLLTOOL --help 2>&1` in
5688
*--identify-strict*)
5689
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5692
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5697
# fallback: assume linklib IS sharedlib
5698
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5702
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5703
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5705
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5706
[Command to associate shared and link libraries])
5707
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5710
# _LT_PATH_MANIFEST_TOOL
5711
# ----------------------
5712
# locate the manifest tool
5713
m4_defun([_LT_PATH_MANIFEST_TOOL],
5714
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5715
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5716
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5717
[lt_cv_path_mainfest_tool=no
5718
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5719
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5720
cat conftest.err >&AS_MESSAGE_LOG_FD
5721
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5722
lt_cv_path_mainfest_tool=yes
5725
if test "x$lt_cv_path_mainfest_tool" != xyes; then
5728
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5729
])# _LT_PATH_MANIFEST_TOOL
5734
# check for math library
5735
AC_DEFUN([LT_LIB_M],
5736
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5739
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5740
# These system don't have libm, or don't need it
5743
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5744
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5747
AC_CHECK_LIB(m, cos, LIBM="-lm")
5754
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5755
dnl aclocal-1.4 backwards compatibility:
5756
dnl AC_DEFUN([AC_CHECK_LIBM], [])
5759
# _LT_COMPILER_NO_RTTI([TAGNAME])
5760
# -------------------------------
5761
m4_defun([_LT_COMPILER_NO_RTTI],
5762
[m4_require([_LT_TAG_COMPILER])dnl
5764
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5766
if test "$GCC" = yes; then
5767
case $cc_basename in
5769
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5771
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5774
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5775
lt_cv_prog_compiler_rtti_exceptions,
5776
[-fno-rtti -fno-exceptions], [],
5777
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5779
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5780
[Compiler flag to turn off builtin functions])
5781
])# _LT_COMPILER_NO_RTTI
5784
# _LT_CMD_GLOBAL_SYMBOLS
5785
# ----------------------
5786
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5787
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5788
AC_REQUIRE([AC_PROG_CC])dnl
5789
AC_REQUIRE([AC_PROG_AWK])dnl
5790
AC_REQUIRE([LT_PATH_NM])dnl
5791
AC_REQUIRE([LT_PATH_LD])dnl
5792
m4_require([_LT_DECL_SED])dnl
5793
m4_require([_LT_DECL_EGREP])dnl
5794
m4_require([_LT_TAG_COMPILER])dnl
5796
# Check for command to grab the raw symbol name followed by C symbol from nm.
5797
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5798
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5800
# These are sane defaults that work on at least a few old systems.
5801
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5803
# Character class describing NM global symbol codes.
5804
symcode='[[BCDEGRST]]'
5806
# Regexp to match symbols that can be accessed directly from C.
5807
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5809
# Define system-specific variables.
5814
cygwin* | mingw* | pw32* | cegcc*)
5815
symcode='[[ABCDGISTW]]'
5818
if test "$host_cpu" = ia64; then
5819
symcode='[[ABCDEGRST]]'
5823
symcode='[[BCDEGRST]]'
5826
symcode='[[BCDEGQRST]]'
5837
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5841
symcode='[[DFNSTU]]'
5845
# If we're using GNU nm, then use its standard symbol codes.
5846
case `$NM -V 2>&1` in
5847
*GNU* | *'with BFD'*)
5848
symcode='[[ABCDGIRSTW]]' ;;
5851
# Transform an extracted symbol line into a proper C declaration.
5852
# Some systems (esp. on ia64) link data and code symbols differently,
5853
# so use this general approach.
5854
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5856
# Transform an extracted symbol line into symbol name and symbol address
5857
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5858
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
5860
# Handle CRLF in mingw tool chain
5864
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5868
# Try without a prefix underscore, then with it.
5869
for ac_symprfx in "" "_"; do
5871
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5872
symxfrm="\\1 $ac_symprfx\\2 \\2"
5874
# Write the raw and C identifiers.
5875
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5876
# Fake it for dumpbin and say T for any non-static function
5877
# and D for any global variable.
5878
# Also find C++ and __fastcall symbols from MSVC++,
5879
# which start with @ or ?.
5880
lt_cv_sys_global_symbol_pipe="$AWK ['"\
5881
" {last_section=section; section=\$ 3};"\
5882
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5883
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5884
" \$ 0!~/External *\|/{next};"\
5885
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5886
" {if(hide[section]) next};"\
5887
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5888
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5889
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5890
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5891
" ' prfx=^$ac_symprfx]"
5893
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5895
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5897
# Check to see that the pipe works correctly.
5901
cat > conftest.$ac_ext <<_LT_EOF
5906
void nm_test_func(void);
5907
void nm_test_func(void){}
5911
int main(){nm_test_var='a';nm_test_func();return(0);}
5914
if AC_TRY_EVAL(ac_compile); then
5915
# Now try to grab the symbols.
5917
if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5918
# Try sorting and uniquifying the output.
5919
if sort "$nlist" | uniq > "$nlist"T; then
5920
mv -f "$nlist"T "$nlist"
5925
# Make sure that we snagged all the symbols we need.
5926
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5927
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5928
cat <<_LT_EOF > conftest.$ac_ext
5929
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5930
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5931
/* DATA imports from DLLs on WIN32 con't be const, because runtime
5932
relocations are performed -- see ld's documentation on pseudo-relocs. */
5933
# define LT@&t@_DLSYM_CONST
5934
#elif defined(__osf__)
5935
/* This system does not cope well with relocations in const data. */
5936
# define LT@&t@_DLSYM_CONST
5938
# define LT@&t@_DLSYM_CONST const
5946
# Now generate the symbol file.
5947
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5949
cat <<_LT_EOF >> conftest.$ac_ext
5951
/* The mapping between symbol names and symbols. */
5952
LT@&t@_DLSYM_CONST struct {
5956
lt__PROGRAM__LTX_preloaded_symbols[[]] =
5958
{ "@PROGRAM@", (void *) 0 },
5960
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5961
cat <<\_LT_EOF >> conftest.$ac_ext
5965
/* This works around a problem in FreeBSD linker */
5966
#ifdef FREEBSD_WORKAROUND
5967
static const void *lt_preloaded_setup() {
5968
return lt__PROGRAM__LTX_preloaded_symbols;
5976
# Now try linking the two files.
5977
mv conftest.$ac_objext conftstm.$ac_objext
5978
lt_globsym_save_LIBS=$LIBS
5979
lt_globsym_save_CFLAGS=$CFLAGS
5980
LIBS="conftstm.$ac_objext"
5981
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5982
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5985
LIBS=$lt_globsym_save_LIBS
5986
CFLAGS=$lt_globsym_save_CFLAGS
5988
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5991
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5994
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5997
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5998
cat conftest.$ac_ext >&5
6000
rm -rf conftest* conftst*
6002
# Do not use the global_symbol_pipe unless it works.
6003
if test "$pipe_works" = yes; then
6006
lt_cv_sys_global_symbol_pipe=
6010
if test -z "$lt_cv_sys_global_symbol_pipe"; then
6011
lt_cv_sys_global_symbol_to_cdecl=
6013
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6014
AC_MSG_RESULT(failed)
6019
# Response file support.
6020
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6021
nm_file_list_spec='@'
6022
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6023
nm_file_list_spec='@'
6026
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6027
[Take the output of nm and produce a listing of raw symbols and C names])
6028
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6029
[Transform the output of nm in a proper C declaration])
6030
_LT_DECL([global_symbol_to_c_name_address],
6031
[lt_cv_sys_global_symbol_to_c_name_address], [1],
6032
[Transform the output of nm in a C name address pair])
6033
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6034
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6035
[Transform the output of nm in a C name address pair when lib prefix is needed])
6036
_LT_DECL([], [nm_file_list_spec], [1],
6037
[Specify filename containing input files for $NM])
6038
]) # _LT_CMD_GLOBAL_SYMBOLS
6041
# _LT_COMPILER_PIC([TAGNAME])
6042
# ---------------------------
6043
m4_defun([_LT_COMPILER_PIC],
6044
[m4_require([_LT_TAG_COMPILER])dnl
6045
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6046
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6047
_LT_TAGVAR(lt_prog_compiler_static, $1)=
6049
m4_if([$1], [CXX], [
6050
# C++ specific cases for pic, static, wl, etc.
6051
if test "$GXX" = yes; then
6052
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6053
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6057
# All AIX code is PIC.
6058
if test "$host_cpu" = ia64; then
6059
# AIX 5 now supports IA64 processor
6060
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6067
# see comment about AmigaOS4 .so support
6068
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6071
# FIXME: we need at least 68020 code to build shared libraries, but
6072
# adding the `-m68020' flag to GCC prevents building anything better,
6074
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6079
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6080
# PIC is the default for these OSes.
6082
mingw* | cygwin* | os2* | pw32* | cegcc*)
6083
# This hack is so that the source file can tell whether it is being
6084
# built for inclusion in a dll (and should export symbols for example).
6085
# Although the cygwin gcc ignores -fPIC, still need this for old-style
6086
# (--disable-auto-import) libraries
6087
m4_if([$1], [GCJ], [],
6088
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6090
darwin* | rhapsody*)
6091
# PIC is the default on this platform
6092
# Common symbols not allowed in MH_DYLIB files
6093
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6096
# DJGPP does not support shared libraries at all
6097
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6100
# PIC is the default for Haiku.
6101
# The "-static" flag exists, but is broken.
6102
_LT_TAGVAR(lt_prog_compiler_static, $1)=
6105
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
6106
# Instead, we relocate shared libraries at runtime.
6109
if test -d /usr/nec; then
6110
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6114
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6115
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6116
# sets the default TLS model and affects inlining.
6121
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6126
# QNX uses GNU C++, but need to define -shared option too, otherwise
6128
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6131
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6137
# All AIX code is PIC.
6138
if test "$host_cpu" = ia64; then
6139
# AIX 5 now supports IA64 processor
6140
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6142
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6146
case $cc_basename in
6148
# Green Hills C++ Compiler
6149
# _LT_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"
6153
mingw* | cygwin* | os2* | pw32* | cegcc*)
6154
# This hack is so that the source file can tell whether it is being
6155
# built for inclusion in a dll (and should export symbols for example).
6156
m4_if([$1], [GCJ], [],
6157
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6160
case $cc_basename in
6162
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6165
# Green Hills C++ Compiler
6166
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6172
freebsd* | dragonfly*)
6173
# FreeBSD uses GNU C++
6175
hpux9* | hpux10* | hpux11*)
6176
case $cc_basename in
6178
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6179
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6180
if test "$host_cpu" != ia64; then
6181
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6185
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6186
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6192
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6201
# This is c89, which is MS Visual C++ (no shared libs)
6202
# Anyone wants to do a port?
6204
irix5* | irix6* | nonstopux*)
6205
case $cc_basename in
6207
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6208
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6209
# CC pic flag -KPIC is the default.
6215
linux* | k*bsd*-gnu | kopensolaris*-gnu)
6216
case $cc_basename in
6219
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6220
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6223
# old Intel C++ for x86_64 which still supported -KPIC.
6224
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6225
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6226
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6229
# Intel C++, used to be incompatible with GCC.
6230
# ICC 10 doesn't accept -KPIC any more.
6231
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6232
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6233
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6236
# Portland Group C++ compiler
6237
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6238
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6239
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6243
# Make sure the PIC flag is empty. It appears that all Alpha
6244
# Linux and Compaq Tru64 Unix objects are PIC.
6245
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6246
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6248
xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6249
# IBM XL 8.0, 9.0 on PPC and BlueGene
6250
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6251
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6252
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6255
case `$CC -V 2>&1 | sed 5q` in
6258
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6259
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6260
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6271
case $cc_basename in
6273
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6282
# QNX uses GNU C++, but need to define -shared option too, otherwise
6284
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6286
osf3* | osf4* | osf5*)
6287
case $cc_basename in
6289
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6292
# Rational C++ 2.4.1
6293
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6296
# Digital/Compaq C++
6297
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6298
# Make sure the PIC flag is empty. It appears that all Alpha
6299
# Linux and Compaq Tru64 Unix objects are PIC.
6300
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6301
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6310
case $cc_basename in
6312
# Sun C++ 4.2, 5.x and Centerline C++
6313
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6314
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6315
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6318
# Green Hills C++ Compiler
6319
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6326
case $cc_basename in
6329
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6330
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6334
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6340
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6341
case $cc_basename in
6343
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6344
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6345
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6350
case $cc_basename in
6352
# NonStop-UX NCC 3.20
6353
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6362
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6368
if test "$GCC" = yes; then
6369
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6370
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6374
# All AIX code is PIC.
6375
if test "$host_cpu" = ia64; then
6376
# AIX 5 now supports IA64 processor
6377
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6384
# see comment about AmigaOS4 .so support
6385
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6388
# FIXME: we need at least 68020 code to build shared libraries, but
6389
# adding the `-m68020' flag to GCC prevents building anything better,
6391
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6396
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6397
# PIC is the default for these OSes.
6400
mingw* | cygwin* | pw32* | os2* | cegcc*)
6401
# This hack is so that the source file can tell whether it is being
6402
# built for inclusion in a dll (and should export symbols for example).
6403
# Although the cygwin gcc ignores -fPIC, still need this for old-style
6404
# (--disable-auto-import) libraries
6405
m4_if([$1], [GCJ], [],
6406
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6409
darwin* | rhapsody*)
6410
# PIC is the default on this platform
6411
# Common symbols not allowed in MH_DYLIB files
6412
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6416
# PIC is the default for Haiku.
6417
# The "-static" flag exists, but is broken.
6418
_LT_TAGVAR(lt_prog_compiler_static, $1)=
6422
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6423
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
6424
# sets the default TLS model and affects inlining.
6430
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6436
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
6437
# Instead, we relocate shared libraries at runtime.
6441
# Just because we use GCC doesn't mean we suddenly get shared libraries
6442
# on systems that don't support them.
6443
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6448
# QNX uses GNU C++, but need to define -shared option too, otherwise
6450
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6454
if test -d /usr/nec; then
6455
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6460
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6464
case $cc_basename in
6465
nvcc*) # Cuda Compiler Driver 2.2
6466
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6467
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6468
_LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6473
# PORTME Check for flag to pass linker flags through the system compiler.
6476
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6477
if test "$host_cpu" = ia64; then
6478
# AIX 5 now supports IA64 processor
6479
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6481
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6485
mingw* | cygwin* | pw32* | os2* | cegcc*)
6486
# This hack is so that the source file can tell whether it is being
6487
# built for inclusion in a dll (and should export symbols for example).
6488
m4_if([$1], [GCJ], [],
6489
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6492
hpux9* | hpux10* | hpux11*)
6493
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6494
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6501
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6504
# Is there a better lt_prog_compiler_static that works with the bundled CC?
6505
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6508
irix5* | irix6* | nonstopux*)
6509
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6510
# PIC (with -KPIC) is the default.
6511
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6514
linux* | k*bsd*-gnu | kopensolaris*-gnu)
6515
case $cc_basename in
6516
# old Intel for x86_64 which still supported -KPIC.
6518
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6519
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6520
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6522
# icc used to be incompatible with GCC.
6523
# ICC 10 doesn't accept -KPIC any more.
6525
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6526
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6527
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6529
# Lahey Fortran 8.1.
6531
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6532
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6533
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6536
# NAG Fortran compiler
6537
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6538
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6539
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6541
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6542
# Portland Group compilers (*not* the Pentium gcc compiler,
6543
# which looks to be a dead project)
6544
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6545
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6546
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6549
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6550
# All Alpha code is PIC.
6551
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6553
xl* | bgxl* | bgf* | mpixl*)
6554
# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6555
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6556
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6557
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6560
case `$CC -V 2>&1 | sed 5q` in
6561
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6562
# Sun Fortran 8.3 passes all unrecognized flags to the linker
6563
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6564
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6565
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6567
*Sun\ F* | *Sun*Fortran*)
6568
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6569
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6570
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6574
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6575
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6576
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6578
*Intel*\ [[CF]]*Compiler*)
6579
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6580
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6581
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6584
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6585
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6586
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6594
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6595
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6599
# QNX uses GNU C++, but need to define -shared option too, otherwise
6601
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6604
osf3* | osf4* | osf5*)
6605
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6606
# All OSF/1 code is PIC.
6607
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6611
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6615
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6616
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6617
case $cc_basename in
6618
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6619
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6621
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6626
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6627
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6628
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6631
sysv4 | sysv4.2uw2* | sysv4.3*)
6632
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6633
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6634
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6638
if test -d /usr/nec ;then
6639
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6640
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6644
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6645
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6646
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6647
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6651
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6652
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6656
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6657
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6661
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6667
# For platforms which do not support PIC, -DPIC is meaningless:
6669
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6672
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6676
AC_CACHE_CHECK([for $compiler option to produce PIC],
6677
[_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6678
[_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6679
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6682
# Check to make sure the PIC flag actually works.
6684
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6685
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6686
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6687
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6688
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6690
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6692
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6693
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6695
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6696
[Additional compiler flags for building library objects])
6698
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6699
[How to pass a linker flag through the compiler])
6701
# Check to make sure the static flag actually works.
6703
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6704
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6705
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6706
$lt_tmp_static_flag,
6708
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6709
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6710
[Compiler flag to prevent dynamic linking])
6711
])# _LT_COMPILER_PIC
6714
# _LT_LINKER_SHLIBS([TAGNAME])
6715
# ----------------------------
6716
# See if the linker supports building shared libraries.
6717
m4_defun([_LT_LINKER_SHLIBS],
6718
[AC_REQUIRE([LT_PATH_LD])dnl
6719
AC_REQUIRE([LT_PATH_NM])dnl
6720
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6721
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6722
m4_require([_LT_DECL_EGREP])dnl
6723
m4_require([_LT_DECL_SED])dnl
6724
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6725
m4_require([_LT_TAG_COMPILER])dnl
6726
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6727
m4_if([$1], [CXX], [
6728
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6729
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6732
# If we're using GNU nm, then we don't want the "-C" option.
6733
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6734
# Also, AIX nm treats weak defined symbols like other global defined
6735
# symbols, whereas GNU nm marks them as "W".
6736
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6737
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6739
_LT_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'
6743
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6745
cygwin* | mingw* | cegcc*)
6746
case $cc_basename in
6748
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6751
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6752
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6757
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6762
_LT_TAGVAR(allow_undefined_flag, $1)=
6763
_LT_TAGVAR(always_export_symbols, $1)=no
6764
_LT_TAGVAR(archive_cmds, $1)=
6765
_LT_TAGVAR(archive_expsym_cmds, $1)=
6766
_LT_TAGVAR(compiler_needs_object, $1)=no
6767
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6768
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6769
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6770
_LT_TAGVAR(hardcode_automatic, $1)=no
6771
_LT_TAGVAR(hardcode_direct, $1)=no
6772
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6773
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6774
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6775
_LT_TAGVAR(hardcode_minus_L, $1)=no
6776
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6777
_LT_TAGVAR(inherit_rpath, $1)=no
6778
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6779
_LT_TAGVAR(module_cmds, $1)=
6780
_LT_TAGVAR(module_expsym_cmds, $1)=
6781
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
6782
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6783
_LT_TAGVAR(thread_safe_flag_spec, $1)=
6784
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6785
# include_expsyms should be a list of space-separated symbols to be *always*
6786
# included in the symbol list
6787
_LT_TAGVAR(include_expsyms, $1)=
6788
# exclude_expsyms can be an extended regexp of symbols to exclude
6789
# it will be wrapped by ` (' and `)$', so one must not match beginning or
6790
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6791
# as well as any symbol that contains `d'.
6792
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6793
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6794
# platforms (ab)use it in PIC code, but their linkers get confused if
6795
# the symbol is explicitly referenced. Since portable code cannot
6796
# rely on this symbol name, it's probably fine to never include it in
6797
# preloaded symbol tables.
6798
# Exclude shared library initialization/finalization symbols.
6799
dnl Note also adjust exclude_expsyms for C++ above.
6800
extract_expsyms_cmds=
6803
cygwin* | mingw* | pw32* | cegcc*)
6804
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6805
# When not using gcc, we currently assume that we are using
6806
# Microsoft Visual C++.
6807
if test "$GCC" != yes; then
6812
# we just hope/assume this is gcc and not c89 (= MSVC++)
6820
_LT_TAGVAR(ld_shlibs, $1)=yes
6822
# On some targets, GNU ld is compatible enough with the native linker
6823
# that we're better off using the native interface for both.
6824
lt_use_gnu_ld_interface=no
6825
if test "$with_gnu_ld" = yes; then
6828
# The AIX port of GNU ld has always aspired to compatibility
6829
# with the native linker. However, as the warning in the GNU ld
6830
# block says, versions before 2.19.5* couldn't really create working
6831
# shared libraries, regardless of the interface used.
6832
case `$LD -v 2>&1` in
6833
*\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6834
*\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6835
*\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6837
lt_use_gnu_ld_interface=yes
6842
lt_use_gnu_ld_interface=yes
6847
if test "$lt_use_gnu_ld_interface" = yes; then
6848
# If archive_cmds runs LD, not CC, wlarc should be empty
6851
# Set some defaults for GNU ld with shared library support. These
6852
# are reset later if shared libraries are not supported. Putting them
6853
# here allows them to be overridden if necessary.
6854
runpath_var=LD_RUN_PATH
6855
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6856
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6857
# ancient GNU ld didn't support --whole-archive et. al.
6858
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6859
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6861
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6863
supports_anon_versioning=no
6864
case `$LD -v 2>&1` in
6865
*GNU\ gold*) supports_anon_versioning=yes ;;
6866
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6867
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6868
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6869
*\ 2.11.*) ;; # other 2.11 versions
6870
*) supports_anon_versioning=yes ;;
6873
# See if GNU ld supports shared libraries.
6876
# On AIX/PPC, the GNU linker is very broken
6877
if test "$host_cpu" != ia64; then
6878
_LT_TAGVAR(ld_shlibs, $1)=no
6881
*** Warning: the GNU linker, at least up to release 2.19, is reported
6882
*** to be unable to reliably create shared libraries on AIX.
6883
*** Therefore, libtool is disabling shared libraries support. If you
6884
*** really care for shared libraries, you may want to install binutils
6885
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6886
*** You will then need to restart the configuration process.
6895
# see comment about AmigaOS4 .so support
6896
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6897
_LT_TAGVAR(archive_expsym_cmds, $1)=''
6900
_LT_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)'
6901
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6902
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6908
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6909
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6910
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6911
# support --undefined. This deserves some investigation. FIXME
6912
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6914
_LT_TAGVAR(ld_shlibs, $1)=no
6918
cygwin* | mingw* | pw32* | cegcc*)
6919
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6920
# as there is no search path for DLLs.
6921
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6922
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6923
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6924
_LT_TAGVAR(always_export_symbols, $1)=no
6925
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6926
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6927
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6929
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6930
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6931
# If the export-symbols file already is a .def file (1st line
6932
# is EXPORTS), use it as is; otherwise, prepend...
6933
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6934
cp $export_symbols $output_objdir/$soname.def;
6936
echo EXPORTS > $output_objdir/$soname.def;
6937
cat $export_symbols >> $output_objdir/$soname.def;
6939
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6941
_LT_TAGVAR(ld_shlibs, $1)=no
6946
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6947
_LT_TAGVAR(link_all_deplibs, $1)=yes
6951
_LT_TAGVAR(hardcode_direct, $1)=no
6952
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6953
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6954
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6955
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6956
# Instead, shared libraries are loaded at an image base (0x10000000 by
6957
# default) and relocated if they conflict, which is a slow very memory
6958
# consuming and fragmenting process. To avoid this, we pick a random,
6959
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6960
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6961
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6962
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6965
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6967
if test "$host_os" = linux-dietlibc; then
6968
case $cc_basename in
6969
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6972
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6973
&& test "$tmp_diet" = no
6975
tmp_addflag=' $pic_flag'
6976
tmp_sharedflag='-shared'
6977
case $cc_basename,$host_cpu in
6978
pgcc*) # Portland Group C compiler
6979
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6980
tmp_addflag=' $pic_flag'
6982
pgf77* | pgf90* | pgf95* | pgfortran*)
6983
# Portland Group f77 and f90 compilers
6984
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6985
tmp_addflag=' $pic_flag -Mnomain' ;;
6986
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6987
tmp_addflag=' -i_dynamic' ;;
6988
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6989
tmp_addflag=' -i_dynamic -nofor_main' ;;
6990
ifc* | ifort*) # Intel Fortran compiler
6991
tmp_addflag=' -nofor_main' ;;
6992
lf95*) # Lahey Fortran 8.1
6993
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6994
tmp_sharedflag='--shared' ;;
6995
xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6996
tmp_sharedflag='-qmkshrobj'
6998
nvcc*) # Cuda Compiler Driver 2.2
6999
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7000
_LT_TAGVAR(compiler_needs_object, $1)=yes
7003
case `$CC -V 2>&1 | sed 5q` in
7004
*Sun\ C*) # Sun C 5.9
7005
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7006
_LT_TAGVAR(compiler_needs_object, $1)=yes
7007
tmp_sharedflag='-G' ;;
7008
*Sun\ F*) # Sun Fortran 8.3
7009
tmp_sharedflag='-G' ;;
7011
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7013
if test "x$supports_anon_versioning" = xyes; then
7014
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7015
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7016
echo "local: *; };" >> $output_objdir/$libname.ver~
7017
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7020
case $cc_basename in
7021
xlf* | bgf* | bgxlf* | mpixlf*)
7022
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7023
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7024
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7025
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7026
if test "x$supports_anon_versioning" = xyes; then
7027
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7028
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7029
echo "local: *; };" >> $output_objdir/$libname.ver~
7030
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7035
_LT_TAGVAR(ld_shlibs, $1)=no
7040
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7041
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7044
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7045
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7050
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7051
_LT_TAGVAR(ld_shlibs, $1)=no
7054
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7055
*** create shared libraries on Solaris systems. Therefore, libtool
7056
*** is disabling shared libraries support. We urge you to upgrade GNU
7057
*** binutils to release 2.9.1 or newer. Another option is to modify
7058
*** your PATH or compiler configuration so that the native linker is
7059
*** used, and then restart.
7062
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7063
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7064
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7066
_LT_TAGVAR(ld_shlibs, $1)=no
7070
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7071
case `$LD -v 2>&1` in
7072
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7073
_LT_TAGVAR(ld_shlibs, $1)=no
7076
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7077
*** reliably create shared libraries on SCO systems. Therefore, libtool
7078
*** is disabling shared libraries support. We urge you to upgrade GNU
7079
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
7080
*** your PATH or compiler configuration so that the native linker is
7081
*** used, and then restart.
7086
# For security reasons, it is highly recommended that you always
7087
# use absolute paths for naming shared libraries, and exclude the
7088
# DT_RUNPATH tag from executables and libraries. But doing so
7089
# requires that you compile everything twice, which is a pain.
7090
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7091
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7092
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7093
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7095
_LT_TAGVAR(ld_shlibs, $1)=no
7102
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7104
_LT_TAGVAR(hardcode_direct, $1)=yes
7105
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7109
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7110
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7111
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7113
_LT_TAGVAR(ld_shlibs, $1)=no
7118
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
7120
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7121
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7122
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7125
# PORTME fill in a description of your system's linker (not GNU ld)
7128
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7129
_LT_TAGVAR(always_export_symbols, $1)=yes
7130
_LT_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'
7131
# Note: this linker hardcodes the directories in LIBPATH if there
7132
# are no directories specified by -L.
7133
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7134
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7135
# Neither direct hardcoding nor static linking is supported with a
7137
_LT_TAGVAR(hardcode_direct, $1)=unsupported
7142
if test "$host_cpu" = ia64; then
7143
# On IA64, the linker does run time linking by default, so we don't
7144
# have to do anything special.
7145
aix_use_runtimelinking=no
7146
exp_sym_flag='-Bexport'
7149
# If we're using GNU nm, then we don't want the "-C" option.
7150
# -C means demangle to AIX nm, but means don't demangle with GNU nm
7151
# Also, AIX nm treats weak defined symbols like other global
7152
# defined symbols, whereas GNU nm marks them as "W".
7153
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7154
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7156
_LT_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'
7158
aix_use_runtimelinking=no
7160
# Test if we are trying to use run time linking or normal
7161
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7162
# need to do runtime linking.
7163
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7164
for ld_flag in $LDFLAGS; do
7165
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7166
aix_use_runtimelinking=yes
7173
exp_sym_flag='-bexport'
7174
no_entry_flag='-bnoentry'
7177
# When large executables or shared objects are built, AIX ld can
7178
# have problems creating the table of contents. If linking a library
7179
# or program results in "error TOC overflow" add -mminimal-toc to
7180
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7181
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7183
_LT_TAGVAR(archive_cmds, $1)=''
7184
_LT_TAGVAR(hardcode_direct, $1)=yes
7185
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7186
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7187
_LT_TAGVAR(link_all_deplibs, $1)=yes
7188
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7190
if test "$GCC" = yes; then
7191
case $host_os in aix4.[[012]]|aix4.[[012]].*)
7192
# We only want to do this on AIX 4.2 and lower, the check
7193
# below for broken collect2 doesn't work under 4.3+
7194
collect2name=`${CC} -print-prog-name=collect2`
7195
if test -f "$collect2name" &&
7196
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7198
# We have reworked collect2
7201
# We have old collect2
7202
_LT_TAGVAR(hardcode_direct, $1)=unsupported
7203
# It fails to find uninstalled libraries when the uninstalled
7204
# path is not listed in the libpath. Setting hardcode_minus_L
7205
# to unsupported forces relinking
7206
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7207
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7208
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7212
shared_flag='-shared'
7213
if test "$aix_use_runtimelinking" = yes; then
7214
shared_flag="$shared_flag "'${wl}-G'
7218
if test "$host_cpu" = ia64; then
7219
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7220
# chokes on -Wl,-G. The following line is correct:
7223
if test "$aix_use_runtimelinking" = yes; then
7224
shared_flag='${wl}-G'
7226
shared_flag='${wl}-bM:SRE'
7231
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7232
# It seems that -bexpall does not export symbols beginning with
7233
# underscore (_), so it is better to generate a list of symbols to export.
7234
_LT_TAGVAR(always_export_symbols, $1)=yes
7235
if test "$aix_use_runtimelinking" = yes; then
7236
# Warning - without using the other runtime loading flags (-brtl),
7237
# -berok will link without error, but may produce a broken library.
7238
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7239
# Determine the default libpath from the value encoded in an
7241
_LT_SYS_MODULE_PATH_AIX([$1])
7242
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7243
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7245
if test "$host_cpu" = ia64; then
7246
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7247
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7248
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7250
# Determine the default libpath from the value encoded in an
7252
_LT_SYS_MODULE_PATH_AIX([$1])
7253
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7254
# Warning - without using the other run time loading flags,
7255
# -berok will link without error, but may produce a broken library.
7256
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7257
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7258
if test "$with_gnu_ld" = yes; then
7259
# We only use this code for GNU lds that support --whole-archive.
7260
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7262
# Exported symbols can be pulled into shared objects from archives
7263
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7265
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7266
# This is similar to how AIX traditionally builds its shared libraries.
7267
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7275
# see comment about AmigaOS4 .so support
7276
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7277
_LT_TAGVAR(archive_expsym_cmds, $1)=''
7280
_LT_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)'
7281
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7282
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7288
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7291
cygwin* | mingw* | pw32* | cegcc*)
7292
# When not using gcc, we currently assume that we are using
7293
# Microsoft Visual C++.
7294
# hardcode_libdir_flag_spec is actually meaningless, as there is
7295
# no search path for DLLs.
7296
case $cc_basename in
7299
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7300
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7301
_LT_TAGVAR(always_export_symbols, $1)=yes
7302
_LT_TAGVAR(file_list_spec, $1)='@'
7303
# Tell ltmain to make .lib files, not .a files.
7305
# Tell ltmain to make .dll files, not .so files.
7307
# FIXME: Setting linknames here is a bad hack.
7308
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7309
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7310
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7312
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7314
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7316
# The linker will not automatically build a static lib if we build a DLL.
7317
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7318
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7319
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7320
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7322
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7323
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7324
lt_tool_outputfile="@TOOL_OUTPUT@"~
7325
case $lt_outputfile in
7328
lt_outputfile="$lt_outputfile.exe"
7329
lt_tool_outputfile="$lt_tool_outputfile.exe"
7332
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7333
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7334
$RM "$lt_outputfile.manifest";
7338
# Assume MSVC wrapper
7339
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7340
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7341
# Tell ltmain to make .lib files, not .a files.
7343
# Tell ltmain to make .dll files, not .so files.
7345
# FIXME: Setting linknames here is a bad hack.
7346
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7347
# The linker will automatically build a .lib file if we build a DLL.
7348
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7349
# FIXME: Should let the user specify the lib program.
7350
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7351
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7356
darwin* | rhapsody*)
7357
_LT_DARWIN_LINKER_FEATURES($1)
7361
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7362
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7363
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7366
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7367
# support. Future versions do this automatically, but an explicit c++rt0.o
7368
# does not break anything, and helps significantly (at the cost of a little
7371
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7372
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7373
_LT_TAGVAR(hardcode_direct, $1)=yes
7374
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7377
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
7379
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7380
_LT_TAGVAR(hardcode_direct, $1)=yes
7381
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7382
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7385
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7386
freebsd* | dragonfly*)
7387
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7388
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7389
_LT_TAGVAR(hardcode_direct, $1)=yes
7390
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7394
if test "$GCC" = yes; then
7395
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7397
_LT_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'
7399
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7400
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7401
_LT_TAGVAR(hardcode_direct, $1)=yes
7403
# hardcode_minus_L: Not really in the search PATH,
7404
# but as the default location of the library.
7405
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7406
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7410
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7411
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7413
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7415
if test "$with_gnu_ld" = no; then
7416
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7417
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7418
_LT_TAGVAR(hardcode_direct, $1)=yes
7419
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7420
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7421
# hardcode_minus_L: Not really in the search PATH,
7422
# but as the default location of the library.
7423
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7428
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7431
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7434
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7437
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7443
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7446
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7450
# Older versions of the 11.00 compiler do not understand -b yet
7451
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7452
_LT_LINKER_OPTION([if $CC understands -b],
7453
_LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7454
[_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7455
[_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7456
[_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7460
if test "$with_gnu_ld" = no; then
7461
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7462
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7466
_LT_TAGVAR(hardcode_direct, $1)=no
7467
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7470
_LT_TAGVAR(hardcode_direct, $1)=yes
7471
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7472
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7474
# hardcode_minus_L: Not really in the search PATH,
7475
# but as the default location of the library.
7476
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7482
irix5* | irix6* | nonstopux*)
7483
if test "$GCC" = yes; then
7484
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7485
# Try to use the -exported_symbol ld option, if it does not
7486
# work, assume that -exports_file does not work either and
7487
# implicitly export all symbols.
7488
# This should be the same for all languages, so no per-tag cache variable.
7489
AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7490
[lt_cv_irix_exported_symbol],
7491
[save_LDFLAGS="$LDFLAGS"
7492
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7495
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7496
[C++], [[int foo (void) { return 0; }]],
7503
[lt_cv_irix_exported_symbol=yes],
7504
[lt_cv_irix_exported_symbol=no])
7505
LDFLAGS="$save_LDFLAGS"])
7506
if test "$lt_cv_irix_exported_symbol" = yes; then
7507
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7510
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7511
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7513
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7514
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7515
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7516
_LT_TAGVAR(inherit_rpath, $1)=yes
7517
_LT_TAGVAR(link_all_deplibs, $1)=yes
7521
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7522
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7524
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7526
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7527
_LT_TAGVAR(hardcode_direct, $1)=yes
7528
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7532
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7533
_LT_TAGVAR(hardcode_direct, $1)=yes
7534
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7535
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7536
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7543
if test -f /usr/libexec/ld.so; then
7544
_LT_TAGVAR(hardcode_direct, $1)=yes
7545
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7546
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7547
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7548
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7549
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7550
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7551
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7554
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7555
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7556
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7559
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7560
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7565
_LT_TAGVAR(ld_shlibs, $1)=no
7570
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7571
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7572
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7573
_LT_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'
7574
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7578
if test "$GCC" = yes; then
7579
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7580
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7582
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7583
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7585
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7586
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7587
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7590
osf4* | osf5*) # as osf3* with the addition of -msym flag
7591
if test "$GCC" = yes; then
7592
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7593
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7594
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7596
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7597
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7598
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
7599
$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7601
# Both c and cxx compiler support -rpath directly
7602
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7604
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7605
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7609
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7610
if test "$GCC" = yes; then
7612
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7613
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7614
$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7616
case `$CC -V 2>&1` in
7619
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7620
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7621
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7625
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7626
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7627
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7631
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7632
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7634
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7636
# The compiler driver will combine and reorder linker options,
7637
# but understands `-z linker_flag'. GCC discards it without `$wl',
7638
# but is careful enough not to reorder.
7639
# Supported since Solaris 2.6 (maybe 2.5.1?)
7640
if test "$GCC" = yes; then
7641
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7643
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7647
_LT_TAGVAR(link_all_deplibs, $1)=yes
7651
if test "x$host_vendor" = xsequent; then
7652
# Use $CC to link under sequent, because it throws in some extra .o
7653
# files that make .init and .fini sections work.
7654
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7656
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7658
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7659
_LT_TAGVAR(hardcode_direct, $1)=yes
7660
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7661
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7665
case $host_vendor in
7667
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7668
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7671
## LD is ld it makes a PLAMLIB
7672
## CC just makes a GrossModule.
7673
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7674
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7675
_LT_TAGVAR(hardcode_direct, $1)=no
7678
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7679
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7682
runpath_var='LD_RUN_PATH'
7683
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7687
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7688
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7689
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7693
if test -d /usr/nec; then
7694
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7695
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7696
runpath_var=LD_RUN_PATH
7697
hardcode_runpath_var=yes
7698
_LT_TAGVAR(ld_shlibs, $1)=yes
7702
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7703
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7704
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7705
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7706
runpath_var='LD_RUN_PATH'
7708
if test "$GCC" = yes; then
7709
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7710
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7712
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7713
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7717
sysv5* | sco3.2v5* | sco5v6*)
7718
# Note: We can NOT use -z defs as we might desire, because we do not
7719
# link with -lc, and that would cause any symbols used from libc to
7720
# always be unresolved, which means just about no library would
7721
# ever link correctly. If we're not using GNU ld we use -z text
7722
# though, which does catch some bad symbols but isn't as heavy-handed
7724
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7725
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7726
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7727
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7728
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7729
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7730
_LT_TAGVAR(link_all_deplibs, $1)=yes
7731
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7732
runpath_var='LD_RUN_PATH'
7734
if test "$GCC" = yes; then
7735
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7736
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7738
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7739
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7744
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7745
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7746
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7750
_LT_TAGVAR(ld_shlibs, $1)=no
7754
if test x$host_vendor = xsni; then
7756
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7757
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7763
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7764
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7766
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7768
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7769
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7770
_LT_DECL([], [extract_expsyms_cmds], [2],
7771
[The commands to extract the exported symbol list from a shared archive])
7774
# Do we need to explicitly link libc?
7776
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7778
# Assume -lc should be added
7779
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7781
if test "$enable_shared" = yes && test "$GCC" = yes; then
7782
case $_LT_TAGVAR(archive_cmds, $1) in
7784
# FIXME: we may have to deal with multi-command sequences.
7787
# Test whether the compiler implicitly links with -lc since on some
7788
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7789
# to ld, don't add -lc before -lgcc.
7790
AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7791
[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7793
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7795
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7798
libobjs=conftest.$ac_objext
7800
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7801
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7807
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7808
_LT_TAGVAR(allow_undefined_flag, $1)=
7809
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7811
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7813
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7815
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7817
cat conftest.err 1>&5
7821
_LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7828
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7829
[Whether or not to add -lc for building shared libraries])
7830
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7831
[enable_shared_with_static_runtimes], [0],
7832
[Whether or not to disallow shared libs when runtime libs are static])
7833
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7834
[Compiler flag to allow reflexive dlopens])
7835
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7836
[Compiler flag to generate shared objects directly from archives])
7837
_LT_TAGDECL([], [compiler_needs_object], [1],
7838
[Whether the compiler copes with passing no objects directly])
7839
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7840
[Create an old-style archive from a shared archive])
7841
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7842
[Create a temporary old-style archive to link instead of a shared archive])
7843
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7844
_LT_TAGDECL([], [archive_expsym_cmds], [2])
7845
_LT_TAGDECL([], [module_cmds], [2],
7846
[Commands used to build a loadable module if different from building
7848
_LT_TAGDECL([], [module_expsym_cmds], [2])
7849
_LT_TAGDECL([], [with_gnu_ld], [1],
7850
[Whether we are building with GNU ld or not])
7851
_LT_TAGDECL([], [allow_undefined_flag], [1],
7852
[Flag that allows shared libraries with undefined symbols to be built])
7853
_LT_TAGDECL([], [no_undefined_flag], [1],
7854
[Flag that enforces no undefined symbols])
7855
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7856
[Flag to hardcode $libdir into a binary during linking.
7857
This must work even if $libdir does not exist])
7858
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7859
[Whether we need a single "-rpath" flag with a separated argument])
7860
_LT_TAGDECL([], [hardcode_direct], [0],
7861
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7862
DIR into the resulting binary])
7863
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7864
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7865
DIR into the resulting binary and the resulting library dependency is
7866
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
7867
library is relocated])
7868
_LT_TAGDECL([], [hardcode_minus_L], [0],
7869
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7870
into the resulting binary])
7871
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7872
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7873
into the resulting binary])
7874
_LT_TAGDECL([], [hardcode_automatic], [0],
7875
[Set to "yes" if building a shared library automatically hardcodes DIR
7876
into the library and all subsequent libraries and executables linked
7878
_LT_TAGDECL([], [inherit_rpath], [0],
7879
[Set to yes if linker adds runtime paths of dependent libraries
7880
to runtime path list])
7881
_LT_TAGDECL([], [link_all_deplibs], [0],
7882
[Whether libtool must link a program against all its dependency libraries])
7883
_LT_TAGDECL([], [always_export_symbols], [0],
7884
[Set to "yes" if exported symbols are required])
7885
_LT_TAGDECL([], [export_symbols_cmds], [2],
7886
[The commands to list exported symbols])
7887
_LT_TAGDECL([], [exclude_expsyms], [1],
7888
[Symbols that should not be listed in the preloaded symbols])
7889
_LT_TAGDECL([], [include_expsyms], [1],
7890
[Symbols that must always be exported])
7891
_LT_TAGDECL([], [prelink_cmds], [2],
7892
[Commands necessary for linking programs (against libraries) with templates])
7893
_LT_TAGDECL([], [postlink_cmds], [2],
7894
[Commands necessary for finishing linking programs])
7895
_LT_TAGDECL([], [file_list_spec], [1],
7896
[Specify filename containing input files])
7897
dnl FIXME: Not yet implemented
7898
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7899
dnl [Compiler flag to generate thread safe objects])
7900
])# _LT_LINKER_SHLIBS
7903
# _LT_LANG_C_CONFIG([TAG])
7904
# ------------------------
7905
# Ensure that the configuration variables for a C compiler are suitably
7906
# defined. These variables are subsequently used by _LT_CONFIG to write
7907
# the compiler configuration to `libtool'.
7908
m4_defun([_LT_LANG_C_CONFIG],
7909
[m4_require([_LT_DECL_EGREP])dnl
7913
# Source file extension for C test sources.
7916
# Object file extension for compiled C test sources.
7918
_LT_TAGVAR(objext, $1)=$objext
7920
# Code to be used in simple compile tests
7921
lt_simple_compile_test_code="int some_variable = 0;"
7923
# Code to be used in simple link tests
7924
lt_simple_link_test_code='int main(){return(0);}'
7927
# Save the default compiler, since it gets overwritten when the other
7928
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7929
compiler_DEFAULT=$CC
7931
# save warnings/boilerplate of simple test code
7932
_LT_COMPILER_BOILERPLATE
7933
_LT_LINKER_BOILERPLATE
7935
if test -n "$compiler"; then
7936
_LT_COMPILER_NO_RTTI($1)
7937
_LT_COMPILER_PIC($1)
7938
_LT_COMPILER_C_O($1)
7939
_LT_COMPILER_FILE_LOCKS($1)
7940
_LT_LINKER_SHLIBS($1)
7941
_LT_SYS_DYNAMIC_LINKER($1)
7942
_LT_LINKER_HARDCODE_LIBPATH($1)
7946
# Report which library types will actually be built
7947
AC_MSG_CHECKING([if libtool supports shared libraries])
7948
AC_MSG_RESULT([$can_build_shared])
7950
AC_MSG_CHECKING([whether to build shared libraries])
7951
test "$can_build_shared" = "no" && enable_shared=no
7953
# On AIX, shared libraries and static libraries use the same namespace, and
7954
# are all built from PIC.
7957
test "$enable_shared" = yes && enable_static=no
7958
if test -n "$RANLIB"; then
7959
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7960
postinstall_cmds='$RANLIB $lib'
7965
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7966
test "$enable_shared" = yes && enable_static=no
7970
AC_MSG_RESULT([$enable_shared])
7972
AC_MSG_CHECKING([whether to build static libraries])
7973
# Make sure either enable_shared or enable_static is yes.
7974
test "$enable_shared" = yes || enable_static=yes
7975
AC_MSG_RESULT([$enable_static])
7981
])# _LT_LANG_C_CONFIG
7984
# _LT_LANG_CXX_CONFIG([TAG])
7985
# --------------------------
7986
# Ensure that the configuration variables for a C++ compiler are suitably
7987
# defined. These variables are subsequently used by _LT_CONFIG to write
7988
# the compiler configuration to `libtool'.
7989
m4_defun([_LT_LANG_CXX_CONFIG],
7990
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7991
m4_require([_LT_DECL_EGREP])dnl
7992
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7993
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7994
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7995
(test "X$CXX" != "Xg++"))) ; then
7998
_lt_caught_CXX_error=yes
8002
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8003
_LT_TAGVAR(allow_undefined_flag, $1)=
8004
_LT_TAGVAR(always_export_symbols, $1)=no
8005
_LT_TAGVAR(archive_expsym_cmds, $1)=
8006
_LT_TAGVAR(compiler_needs_object, $1)=no
8007
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8008
_LT_TAGVAR(hardcode_direct, $1)=no
8009
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8010
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8011
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8012
_LT_TAGVAR(hardcode_minus_L, $1)=no
8013
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8014
_LT_TAGVAR(hardcode_automatic, $1)=no
8015
_LT_TAGVAR(inherit_rpath, $1)=no
8016
_LT_TAGVAR(module_cmds, $1)=
8017
_LT_TAGVAR(module_expsym_cmds, $1)=
8018
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8019
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8020
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8021
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8022
_LT_TAGVAR(no_undefined_flag, $1)=
8023
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8024
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8026
# Source file extension for C++ test sources.
8029
# Object file extension for compiled C++ test sources.
8031
_LT_TAGVAR(objext, $1)=$objext
8033
# No sense in running all these tests if we already determined that
8034
# the CXX compiler isn't working. Some variables (like enable_shared)
8035
# are currently assumed to apply to all compilers on this platform,
8036
# and will be corrupted by setting them based on a non-working compiler.
8037
if test "$_lt_caught_CXX_error" != yes; then
8038
# Code to be used in simple compile tests
8039
lt_simple_compile_test_code="int some_variable = 0;"
8041
# Code to be used in simple link tests
8042
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8044
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8047
# save warnings/boilerplate of simple test code
8048
_LT_COMPILER_BOILERPLATE
8049
_LT_LINKER_BOILERPLATE
8051
# Allow CC to be a program name with arguments.
8053
lt_save_CFLAGS=$CFLAGS
8057
lt_save_with_gnu_ld=$with_gnu_ld
8058
lt_save_path_LD=$lt_cv_path_LD
8059
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8060
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8062
$as_unset lt_cv_prog_gnu_ld
8064
if test -n "${lt_cv_path_LDCXX+set}"; then
8065
lt_cv_path_LD=$lt_cv_path_LDCXX
8067
$as_unset lt_cv_path_LD
8069
test -z "${LDCXX+set}" || LD=$LDCXX
8073
_LT_TAGVAR(compiler, $1)=$CC
8074
_LT_CC_BASENAME([$compiler])
8076
if test -n "$compiler"; then
8077
# We don't want -fno-exception when compiling C++ code, so set the
8078
# no_builtin_flag separately
8079
if test "$GXX" = yes; then
8080
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8082
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8085
if test "$GXX" = yes; then
8086
# Set up default GNU C++ configuration
8090
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8091
# archiving commands below assume that GNU ld is being used.
8092
if test "$with_gnu_ld" = yes; then
8093
_LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8094
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8096
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8097
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8099
# If archive_cmds runs LD, not CC, wlarc should be empty
8100
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8101
# investigate it a little bit more. (MM)
8104
# ancient GNU ld didn't support --whole-archive et. al.
8105
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8106
$GREP 'no-whole-archive' > /dev/null; then
8107
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8109
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8115
# A generic and very simple default shared library creation
8116
# command for GNU C++ for the case where it uses the native
8117
# linker, instead of GNU ld. If possible, this setting should
8118
# overridden to take advantage of the native linker features on
8119
# the platform it is being used on.
8120
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8123
# Commands to make compiler produce verbose output that lists
8124
# what "hidden" libraries, object files and flags are used when
8125
# linking a shared library.
8126
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8134
# PORTME: fill in a description of your system's C++ link characteristics
8135
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8136
_LT_TAGVAR(ld_shlibs, $1)=yes
8139
# FIXME: insert proper C++ library support
8140
_LT_TAGVAR(ld_shlibs, $1)=no
8143
if test "$host_cpu" = ia64; then
8144
# On IA64, the linker does run time linking by default, so we don't
8145
# have to do anything special.
8146
aix_use_runtimelinking=no
8147
exp_sym_flag='-Bexport'
8150
aix_use_runtimelinking=no
8152
# Test if we are trying to use run time linking or normal
8153
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
8154
# need to do runtime linking.
8155
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8156
for ld_flag in $LDFLAGS; do
8159
aix_use_runtimelinking=yes
8167
exp_sym_flag='-bexport'
8168
no_entry_flag='-bnoentry'
8171
# When large executables or shared objects are built, AIX ld can
8172
# have problems creating the table of contents. If linking a library
8173
# or program results in "error TOC overflow" add -mminimal-toc to
8174
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8175
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8177
_LT_TAGVAR(archive_cmds, $1)=''
8178
_LT_TAGVAR(hardcode_direct, $1)=yes
8179
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8180
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8181
_LT_TAGVAR(link_all_deplibs, $1)=yes
8182
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
8184
if test "$GXX" = yes; then
8185
case $host_os in aix4.[[012]]|aix4.[[012]].*)
8186
# We only want to do this on AIX 4.2 and lower, the check
8187
# below for broken collect2 doesn't work under 4.3+
8188
collect2name=`${CC} -print-prog-name=collect2`
8189
if test -f "$collect2name" &&
8190
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8192
# We have reworked collect2
8195
# We have old collect2
8196
_LT_TAGVAR(hardcode_direct, $1)=unsupported
8197
# It fails to find uninstalled libraries when the uninstalled
8198
# path is not listed in the libpath. Setting hardcode_minus_L
8199
# to unsupported forces relinking
8200
_LT_TAGVAR(hardcode_minus_L, $1)=yes
8201
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8202
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8205
shared_flag='-shared'
8206
if test "$aix_use_runtimelinking" = yes; then
8207
shared_flag="$shared_flag "'${wl}-G'
8211
if test "$host_cpu" = ia64; then
8212
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8213
# chokes on -Wl,-G. The following line is correct:
8216
if test "$aix_use_runtimelinking" = yes; then
8217
shared_flag='${wl}-G'
8219
shared_flag='${wl}-bM:SRE'
8224
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8225
# It seems that -bexpall does not export symbols beginning with
8226
# underscore (_), so it is better to generate a list of symbols to
8228
_LT_TAGVAR(always_export_symbols, $1)=yes
8229
if test "$aix_use_runtimelinking" = yes; then
8230
# Warning - without using the other runtime loading flags (-brtl),
8231
# -berok will link without error, but may produce a broken library.
8232
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8233
# Determine the default libpath from the value encoded in an empty
8235
_LT_SYS_MODULE_PATH_AIX([$1])
8236
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8238
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8240
if test "$host_cpu" = ia64; then
8241
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8242
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8243
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8245
# Determine the default libpath from the value encoded in an
8247
_LT_SYS_MODULE_PATH_AIX([$1])
8248
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8249
# Warning - without using the other run time loading flags,
8250
# -berok will link without error, but may produce a broken library.
8251
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8252
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8253
if test "$with_gnu_ld" = yes; then
8254
# We only use this code for GNU lds that support --whole-archive.
8255
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8257
# Exported symbols can be pulled into shared objects from archives
8258
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8260
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8261
# This is similar to how AIX traditionally builds its shared
8263
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8269
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8270
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8271
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8272
# support --undefined. This deserves some investigation. FIXME
8273
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8275
_LT_TAGVAR(ld_shlibs, $1)=no
8280
case $cc_basename in
8282
# FIXME: insert proper C++ library support
8283
_LT_TAGVAR(ld_shlibs, $1)=no
8288
cygwin* | mingw* | pw32* | cegcc*)
8289
case $GXX,$cc_basename in
8292
# hardcode_libdir_flag_spec is actually meaningless, as there is
8293
# no search path for DLLs.
8294
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8295
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8296
_LT_TAGVAR(always_export_symbols, $1)=yes
8297
_LT_TAGVAR(file_list_spec, $1)='@'
8298
# Tell ltmain to make .lib files, not .a files.
8300
# Tell ltmain to make .dll files, not .so files.
8302
# FIXME: Setting linknames here is a bad hack.
8303
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8304
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8305
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8307
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8309
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8311
# The linker will not automatically build a static lib if we build a DLL.
8312
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8313
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8315
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8316
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8317
lt_tool_outputfile="@TOOL_OUTPUT@"~
8318
case $lt_outputfile in
8321
lt_outputfile="$lt_outputfile.exe"
8322
lt_tool_outputfile="$lt_tool_outputfile.exe"
8325
func_to_tool_file "$lt_outputfile"~
8326
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8327
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8328
$RM "$lt_outputfile.manifest";
8333
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8334
# as there is no search path for DLLs.
8335
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8336
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8337
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8338
_LT_TAGVAR(always_export_symbols, $1)=no
8339
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8341
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8342
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8343
# If the export-symbols file already is a .def file (1st line
8344
# is EXPORTS), use it as is; otherwise, prepend...
8345
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8346
cp $export_symbols $output_objdir/$soname.def;
8348
echo EXPORTS > $output_objdir/$soname.def;
8349
cat $export_symbols >> $output_objdir/$soname.def;
8351
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8353
_LT_TAGVAR(ld_shlibs, $1)=no
8358
darwin* | rhapsody*)
8359
_LT_DARWIN_LINKER_FEATURES($1)
8363
case $cc_basename in
8365
# FIXME: insert proper C++ library support
8366
_LT_TAGVAR(ld_shlibs, $1)=no
8369
# Green Hills C++ Compiler
8370
# FIXME: insert proper C++ library support
8371
_LT_TAGVAR(ld_shlibs, $1)=no
8374
# FIXME: insert proper C++ library support
8375
_LT_TAGVAR(ld_shlibs, $1)=no
8381
# C++ shared libraries reported to be fairly broken before
8383
_LT_TAGVAR(ld_shlibs, $1)=no
8387
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8390
freebsd* | dragonfly*)
8391
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8393
_LT_TAGVAR(ld_shlibs, $1)=yes
8400
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8401
_LT_TAGVAR(link_all_deplibs, $1)=yes
8405
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8406
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8407
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8408
_LT_TAGVAR(hardcode_direct, $1)=yes
8409
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8410
# but as the default
8411
# location of the library.
8413
case $cc_basename in
8415
# FIXME: insert proper C++ library support
8416
_LT_TAGVAR(ld_shlibs, $1)=no
8419
_LT_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'
8420
# Commands to make compiler produce verbose output that lists
8421
# what "hidden" libraries, object files and flags are used when
8422
# linking a shared library.
8424
# There doesn't appear to be a way to prevent this compiler from
8425
# explicitly linking system object files so we need to strip them
8426
# from the output so that they don't get included in the library
8428
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; func_echo_all "$list"'
8431
if test "$GXX" = yes; then
8432
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
8434
# FIXME: insert proper C++ library support
8435
_LT_TAGVAR(ld_shlibs, $1)=no
8442
if test $with_gnu_ld = no; then
8443
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8444
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8450
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8456
_LT_TAGVAR(hardcode_direct, $1)=no
8457
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8460
_LT_TAGVAR(hardcode_direct, $1)=yes
8461
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8462
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8463
# but as the default
8464
# location of the library.
8468
case $cc_basename in
8470
# FIXME: insert proper C++ library support
8471
_LT_TAGVAR(ld_shlibs, $1)=no
8476
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8479
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8482
_LT_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'
8485
# Commands to make compiler produce verbose output that lists
8486
# what "hidden" libraries, object files and flags are used when
8487
# linking a shared library.
8489
# There doesn't appear to be a way to prevent this compiler from
8490
# explicitly linking system object files so we need to strip them
8491
# from the output so that they don't get included in the library
8493
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; func_echo_all "$list"'
8496
if test "$GXX" = yes; then
8497
if test $with_gnu_ld = no; then
8500
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8503
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8506
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8511
# FIXME: insert proper C++ library support
8512
_LT_TAGVAR(ld_shlibs, $1)=no
8519
_LT_TAGVAR(hardcode_direct, $1)=no
8520
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8521
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8522
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8523
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8524
# Instead, shared libraries are loaded at an image base (0x10000000 by
8525
# default) and relocated if they conflict, which is a slow very memory
8526
# consuming and fragmenting process. To avoid this, we pick a random,
8527
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8528
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
8529
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8530
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8533
case $cc_basename in
8536
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8538
# Archives containing C++ object files must be created using
8539
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8540
# necessary to make sure instantiated templates are included
8542
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8545
if test "$GXX" = yes; then
8546
if test "$with_gnu_ld" = no; then
8547
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8549
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8552
_LT_TAGVAR(link_all_deplibs, $1)=yes
8555
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8556
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8557
_LT_TAGVAR(inherit_rpath, $1)=yes
8560
linux* | k*bsd*-gnu | kopensolaris*-gnu)
8561
case $cc_basename in
8563
# Kuck and Associates, Inc. (KAI) C++ Compiler
8565
# KCC will only create a shared library if the output file
8566
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8567
# to its proper name (with version) after linking.
8568
_LT_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'
8569
_LT_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'
8570
# Commands to make compiler produce verbose output that lists
8571
# what "hidden" libraries, object files and flags are used when
8572
# linking a shared library.
8574
# There doesn't appear to be a way to prevent this compiler from
8575
# explicitly linking system object files so we need to strip them
8576
# from the output so that they don't get included in the library
8578
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; func_echo_all "$list"'
8580
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8581
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8583
# Archives containing C++ object files must be created using
8584
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8585
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8590
# version 8.0 and above of icpc choke on multiply defined symbols
8591
# if we add $predep_objects and $postdep_objects, however 7.1 and
8592
# earlier do not add the objects themselves.
8593
case `$CC -V 2>&1` in
8595
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8596
_LT_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'
8598
*) # Version 8.0 or newer
8601
ia64*) tmp_idyn=' -i_dynamic';;
8603
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8604
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8607
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8608
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8609
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8610
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8613
# Portland Group C++ compiler
8615
*pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8616
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8618
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8619
compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8620
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8622
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8623
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8625
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8627
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8628
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8629
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8631
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8632
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8634
*) # Version 6 and above use weak symbols
8635
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8636
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8640
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8641
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8642
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8646
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8647
_LT_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'
8649
runpath_var=LD_RUN_PATH
8650
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8651
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8653
# Commands to make compiler produce verbose output that lists
8654
# what "hidden" libraries, object files and flags are used when
8655
# linking a shared library.
8657
# There doesn't appear to be a way to prevent this compiler from
8658
# explicitly linking system object files so we need to strip them
8659
# from the output so that they don't get included in the library
8661
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
8663
xl* | mpixl* | bgxl*)
8664
# IBM XL 8.0 on PPC, with GNU ld
8665
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8666
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8667
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8668
if test "x$supports_anon_versioning" = xyes; then
8669
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8670
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8671
echo "local: *; };" >> $output_objdir/$libname.ver~
8672
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8676
case `$CC -V 2>&1 | sed 5q` in
8679
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8680
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8681
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
8682
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8683
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8684
_LT_TAGVAR(compiler_needs_object, $1)=yes
8686
# Not sure whether something based on
8687
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8689
output_verbose_link_cmd='func_echo_all'
8691
# Archives containing C++ object files must be created using
8692
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8693
# necessary to make sure instantiated templates are included
8695
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8703
# FIXME: insert proper C++ library support
8704
_LT_TAGVAR(ld_shlibs, $1)=no
8708
# FIXME: insert proper C++ library support
8709
_LT_TAGVAR(ld_shlibs, $1)=no
8713
case $cc_basename in
8715
# FIXME: insert proper C++ library support
8716
_LT_TAGVAR(ld_shlibs, $1)=no
8719
# FIXME: insert proper C++ library support
8720
_LT_TAGVAR(ld_shlibs, $1)=no
8726
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8727
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8729
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8730
_LT_TAGVAR(hardcode_direct, $1)=yes
8731
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8733
# Workaround some broken pre-1.5 toolchains
8734
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8738
_LT_TAGVAR(ld_shlibs, $1)=yes
8742
# C++ shared libraries are fairly broken
8743
_LT_TAGVAR(ld_shlibs, $1)=no
8747
if test -f /usr/libexec/ld.so; then
8748
_LT_TAGVAR(hardcode_direct, $1)=yes
8749
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8750
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8751
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8752
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8753
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8754
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
8755
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8756
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8758
output_verbose_link_cmd=func_echo_all
8760
_LT_TAGVAR(ld_shlibs, $1)=no
8764
osf3* | osf4* | osf5*)
8765
case $cc_basename in
8767
# Kuck and Associates, Inc. (KAI) C++ Compiler
8769
# KCC will only create a shared library if the output file
8770
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8771
# to its proper name (with version) after linking.
8772
_LT_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'
8774
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8775
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8777
# Archives containing C++ object files must be created using
8778
# the KAI C++ compiler.
8780
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8781
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8785
# Rational C++ 2.4.1
8786
# FIXME: insert proper C++ library support
8787
_LT_TAGVAR(ld_shlibs, $1)=no
8792
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8793
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8794
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8797
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8798
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8799
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8800
echo "-hidden">> $lib.exp~
8801
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
8803
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8807
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8809
# Commands to make compiler produce verbose output that lists
8810
# what "hidden" libraries, object files and flags are used when
8811
# linking a shared library.
8813
# There doesn't appear to be a way to prevent this compiler from
8814
# explicitly linking system object files so we need to strip them
8815
# from the output so that they don't get included in the library
8817
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
8820
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8821
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8824
_LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8827
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8831
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8832
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8834
# Commands to make compiler produce verbose output that lists
8835
# what "hidden" libraries, object files and flags are used when
8836
# linking a shared library.
8837
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8840
# FIXME: insert proper C++ library support
8841
_LT_TAGVAR(ld_shlibs, $1)=no
8848
# FIXME: insert proper C++ library support
8849
_LT_TAGVAR(ld_shlibs, $1)=no
8853
case $cc_basename in
8856
# FIXME: insert proper C++ library support
8857
_LT_TAGVAR(ld_shlibs, $1)=no
8861
# FIXME: insert proper C++ library support
8862
_LT_TAGVAR(ld_shlibs, $1)=no
8865
# FIXME: insert proper C++ library support
8866
_LT_TAGVAR(ld_shlibs, $1)=no
8872
case $cc_basename in
8874
# Sun C++ 4.2, 5.x and Centerline C++
8875
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8876
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8877
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8878
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8879
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8881
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8882
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8884
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8886
# The compiler driver will combine and reorder linker options,
8887
# but understands `-z linker_flag'.
8888
# Supported since Solaris 2.6 (maybe 2.5.1?)
8889
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8892
_LT_TAGVAR(link_all_deplibs, $1)=yes
8894
output_verbose_link_cmd='func_echo_all'
8896
# Archives containing C++ object files must be created using
8897
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8898
# necessary to make sure instantiated templates are included
8900
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8903
# Green Hills C++ Compiler
8904
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8906
# The C++ compiler must be used to create the archive.
8907
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8910
# GNU C++ compiler with Solaris linker
8911
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8912
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8913
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8914
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8915
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8916
$CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8918
# Commands to make compiler produce verbose output that lists
8919
# what "hidden" libraries, object files and flags are used when
8920
# linking a shared library.
8921
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8923
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8925
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8926
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8927
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8929
# Commands to make compiler produce verbose output that lists
8930
# what "hidden" libraries, object files and flags are used when
8931
# linking a shared library.
8932
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8935
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8937
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8939
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8947
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8948
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8949
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8950
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8951
runpath_var='LD_RUN_PATH'
8953
case $cc_basename in
8955
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8956
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8959
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8960
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8965
sysv5* | sco3.2v5* | sco5v6*)
8966
# Note: We can NOT use -z defs as we might desire, because we do not
8967
# link with -lc, and that would cause any symbols used from libc to
8968
# always be unresolved, which means just about no library would
8969
# ever link correctly. If we're not using GNU ld we use -z text
8970
# though, which does catch some bad symbols but isn't as heavy-handed
8972
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8973
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8974
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8975
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8976
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8977
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8978
_LT_TAGVAR(link_all_deplibs, $1)=yes
8979
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8980
runpath_var='LD_RUN_PATH'
8982
case $cc_basename in
8984
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8985
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8986
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8987
'"$_LT_TAGVAR(old_archive_cmds, $1)"
8988
_LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8989
'"$_LT_TAGVAR(reload_cmds, $1)"
8992
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8993
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8999
case $cc_basename in
9001
# NonStop-UX NCC 3.20
9002
# FIXME: insert proper C++ library support
9003
_LT_TAGVAR(ld_shlibs, $1)=no
9006
# FIXME: insert proper C++ library support
9007
_LT_TAGVAR(ld_shlibs, $1)=no
9013
# FIXME: insert proper C++ library support
9014
_LT_TAGVAR(ld_shlibs, $1)=no
9018
# FIXME: insert proper C++ library support
9019
_LT_TAGVAR(ld_shlibs, $1)=no
9023
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9024
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9026
_LT_TAGVAR(GCC, $1)="$GXX"
9027
_LT_TAGVAR(LD, $1)="$LD"
9030
## There is no encapsulation within the following macros, do not change
9031
## the running order or otherwise move them around unless you know exactly
9032
## what you are doing...
9033
_LT_SYS_HIDDEN_LIBDEPS($1)
9034
_LT_COMPILER_PIC($1)
9035
_LT_COMPILER_C_O($1)
9036
_LT_COMPILER_FILE_LOCKS($1)
9037
_LT_LINKER_SHLIBS($1)
9038
_LT_SYS_DYNAMIC_LINKER($1)
9039
_LT_LINKER_HARDCODE_LIBPATH($1)
9042
fi # test -n "$compiler"
9045
CFLAGS=$lt_save_CFLAGS
9049
with_gnu_ld=$lt_save_with_gnu_ld
9050
lt_cv_path_LDCXX=$lt_cv_path_LD
9051
lt_cv_path_LD=$lt_save_path_LD
9052
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9053
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9054
fi # test "$_lt_caught_CXX_error" != yes
9057
])# _LT_LANG_CXX_CONFIG
9060
# _LT_FUNC_STRIPNAME_CNF
9061
# ----------------------
9062
# func_stripname_cnf prefix suffix name
9063
# strip PREFIX and SUFFIX off of NAME.
9064
# PREFIX and SUFFIX must not contain globbing or regex special
9065
# characters, hashes, percent signs, but SUFFIX may contain a leading
9066
# dot (in which case that matches only a dot).
9068
# This function is identical to the (non-XSI) version of func_stripname,
9069
# except this one can be used by m4 code that may be executed by configure,
9070
# rather than the libtool script.
9071
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9072
AC_REQUIRE([_LT_DECL_SED])
9073
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9074
func_stripname_cnf ()
9077
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9078
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9080
} # func_stripname_cnf
9081
])# _LT_FUNC_STRIPNAME_CNF
9083
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9084
# ---------------------------------
9085
# Figure out "hidden" library dependencies from verbose
9086
# compiler output when linking a shared library.
9087
# Parse the compiler output and extract the necessary
9088
# objects, libraries and library flags.
9089
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9090
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9091
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9092
# Dependencies to place before and after the object being linked:
9093
_LT_TAGVAR(predep_objects, $1)=
9094
_LT_TAGVAR(postdep_objects, $1)=
9095
_LT_TAGVAR(predeps, $1)=
9096
_LT_TAGVAR(postdeps, $1)=
9097
_LT_TAGVAR(compiler_lib_search_path, $1)=
9099
dnl we can't use the lt_simple_compile_test_code here,
9100
dnl because it contains code intended for an executable,
9101
dnl not a library. It's possible we should let each
9102
dnl tag define a new lt_????_link_test_code variable,
9103
dnl but it's only used here...
9104
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9106
void foo (void) { a = 0; }
9108
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9112
Foo (void) { a = 0; }
9117
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9125
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9133
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9136
public void bar (void) {
9141
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9148
_lt_libdeps_save_CFLAGS=$CFLAGS
9149
case "$CC $CFLAGS " in #(
9150
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9151
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9152
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9155
dnl Parse the compiler output and extract the necessary
9156
dnl objects, libraries and library flags.
9157
if AC_TRY_EVAL(ac_compile); then
9158
# Parse the compiler output and extract the necessary
9159
# objects, libraries and library flags.
9161
# Sentinel used to keep track of whether or not we are before
9162
# the conftest object file.
9163
pre_test_object_deps_done=no
9165
for p in `eval "$output_verbose_link_cmd"`; do
9169
# Some compilers place space between "-{L,R}" and the path.
9171
if test $p = "-L" ||
9172
test $p = "-R"; then
9177
# Expand the sysroot to ease extracting the directories later.
9178
if test -z "$prev"; then
9180
-L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9181
-R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9182
-l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9186
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9188
if test "$pre_test_object_deps_done" = no; then
9191
# Internal compiler library paths should come after those
9192
# provided the user. The postdeps already come after the
9193
# user supplied libs so there is no need to process them.
9194
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9195
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9197
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9200
# The "-l" case would never come before the object being
9201
# linked, so don't bother handling this case.
9204
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9205
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
9207
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
9213
*.lto.$objext) ;; # Ignore GCC LTO objects
9215
# This assumes that the test object file only shows up
9216
# once in the compiler output.
9217
if test "$p" = "conftest.$objext"; then
9218
pre_test_object_deps_done=yes
9222
if test "$pre_test_object_deps_done" = no; then
9223
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9224
_LT_TAGVAR(predep_objects, $1)="$p"
9226
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9229
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9230
_LT_TAGVAR(postdep_objects, $1)="$p"
9232
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9237
*) ;; # Ignore the rest.
9245
echo "libtool.m4: error: problem compiling $1 test program"
9248
$RM -f confest.$objext
9249
CFLAGS=$_lt_libdeps_save_CFLAGS
9251
# PORTME: override above test on systems where it is broken
9255
# Interix 3.5 installs completely hosed .la files for C++, so rather than
9256
# hack all around it, let's just trust "g++" to DTRT.
9257
_LT_TAGVAR(predep_objects,$1)=
9258
_LT_TAGVAR(postdep_objects,$1)=
9259
_LT_TAGVAR(postdeps,$1)=
9263
case `$CC -V 2>&1 | sed 5q` in
9267
# The more standards-conforming stlport4 library is
9268
# incompatible with the Cstd library. Avoid specifying
9269
# it if it's in CXXFLAGS. Ignore libCrun as
9270
# -library=stlport4 depends on it.
9271
case " $CXX $CXXFLAGS " in
9272
*" -library=stlport4 "*)
9273
solaris_use_stlport4=yes
9277
if test "$solaris_use_stlport4" != yes; then
9278
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9285
case $cc_basename in
9287
# The more standards-conforming stlport4 library is
9288
# incompatible with the Cstd library. Avoid specifying
9289
# it if it's in CXXFLAGS. Ignore libCrun as
9290
# -library=stlport4 depends on it.
9291
case " $CXX $CXXFLAGS " in
9292
*" -library=stlport4 "*)
9293
solaris_use_stlport4=yes
9297
# Adding this requires a known-good setup of shared libraries for
9298
# Sun compiler versions before 5.6, else PIC objects from an old
9299
# archive will be linked into the output, leading to subtle bugs.
9300
if test "$solaris_use_stlport4" != yes; then
9301
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9309
case " $_LT_TAGVAR(postdeps, $1) " in
9310
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9312
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
9313
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9314
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9316
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9317
[The directories searched by this compiler when creating a shared library])
9318
_LT_TAGDECL([], [predep_objects], [1],
9319
[Dependencies to place before and after the objects being linked to
9320
create a shared library])
9321
_LT_TAGDECL([], [postdep_objects], [1])
9322
_LT_TAGDECL([], [predeps], [1])
9323
_LT_TAGDECL([], [postdeps], [1])
9324
_LT_TAGDECL([], [compiler_lib_search_path], [1],
9325
[The library search path used internally by the compiler when linking
9327
])# _LT_SYS_HIDDEN_LIBDEPS
9330
# _LT_LANG_F77_CONFIG([TAG])
9331
# --------------------------
9332
# Ensure that the configuration variables for a Fortran 77 compiler are
9333
# suitably defined. These variables are subsequently used by _LT_CONFIG
9334
# to write the compiler configuration to `libtool'.
9335
m4_defun([_LT_LANG_F77_CONFIG],
9336
[AC_LANG_PUSH(Fortran 77)
9337
if test -z "$F77" || test "X$F77" = "Xno"; then
9341
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9342
_LT_TAGVAR(allow_undefined_flag, $1)=
9343
_LT_TAGVAR(always_export_symbols, $1)=no
9344
_LT_TAGVAR(archive_expsym_cmds, $1)=
9345
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9346
_LT_TAGVAR(hardcode_direct, $1)=no
9347
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9348
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9349
_LT_TAGVAR(hardcode_libdir_separator, $1)=
9350
_LT_TAGVAR(hardcode_minus_L, $1)=no
9351
_LT_TAGVAR(hardcode_automatic, $1)=no
9352
_LT_TAGVAR(inherit_rpath, $1)=no
9353
_LT_TAGVAR(module_cmds, $1)=
9354
_LT_TAGVAR(module_expsym_cmds, $1)=
9355
_LT_TAGVAR(link_all_deplibs, $1)=unknown
9356
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9357
_LT_TAGVAR(reload_flag, $1)=$reload_flag
9358
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9359
_LT_TAGVAR(no_undefined_flag, $1)=
9360
_LT_TAGVAR(whole_archive_flag_spec, $1)=
9361
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9363
# Source file extension for f77 test sources.
9366
# Object file extension for compiled f77 test sources.
9368
_LT_TAGVAR(objext, $1)=$objext
9370
# No sense in running all these tests if we already determined that
9371
# the F77 compiler isn't working. Some variables (like enable_shared)
9372
# are currently assumed to apply to all compilers on this platform,
9373
# and will be corrupted by setting them based on a non-working compiler.
9374
if test "$_lt_disable_F77" != yes; then
9375
# Code to be used in simple compile tests
9376
lt_simple_compile_test_code="\
9382
# Code to be used in simple link tests
9383
lt_simple_link_test_code="\
9388
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9391
# save warnings/boilerplate of simple test code
9392
_LT_COMPILER_BOILERPLATE
9393
_LT_LINKER_BOILERPLATE
9395
# Allow CC to be a program name with arguments.
9398
lt_save_CFLAGS=$CFLAGS
9402
_LT_TAGVAR(compiler, $1)=$CC
9403
_LT_CC_BASENAME([$compiler])
9405
if test -n "$compiler"; then
9406
AC_MSG_CHECKING([if libtool supports shared libraries])
9407
AC_MSG_RESULT([$can_build_shared])
9409
AC_MSG_CHECKING([whether to build shared libraries])
9410
test "$can_build_shared" = "no" && enable_shared=no
9412
# On AIX, shared libraries and static libraries use the same namespace, and
9413
# are all built from PIC.
9416
test "$enable_shared" = yes && enable_static=no
9417
if test -n "$RANLIB"; then
9418
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9419
postinstall_cmds='$RANLIB $lib'
9423
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9424
test "$enable_shared" = yes && enable_static=no
9428
AC_MSG_RESULT([$enable_shared])
9430
AC_MSG_CHECKING([whether to build static libraries])
9431
# Make sure either enable_shared or enable_static is yes.
9432
test "$enable_shared" = yes || enable_static=yes
9433
AC_MSG_RESULT([$enable_static])
9435
_LT_TAGVAR(GCC, $1)="$G77"
9436
_LT_TAGVAR(LD, $1)="$LD"
9439
## There is no encapsulation within the following macros, do not change
9440
## the running order or otherwise move them around unless you know exactly
9441
## what you are doing...
9442
_LT_COMPILER_PIC($1)
9443
_LT_COMPILER_C_O($1)
9444
_LT_COMPILER_FILE_LOCKS($1)
9445
_LT_LINKER_SHLIBS($1)
9446
_LT_SYS_DYNAMIC_LINKER($1)
9447
_LT_LINKER_HARDCODE_LIBPATH($1)
9450
fi # test -n "$compiler"
9454
CFLAGS="$lt_save_CFLAGS"
9455
fi # test "$_lt_disable_F77" != yes
9458
])# _LT_LANG_F77_CONFIG
9461
# _LT_LANG_FC_CONFIG([TAG])
9462
# -------------------------
9463
# Ensure that the configuration variables for a Fortran compiler are
9464
# suitably defined. These variables are subsequently used by _LT_CONFIG
9465
# to write the compiler configuration to `libtool'.
9466
m4_defun([_LT_LANG_FC_CONFIG],
9467
[AC_LANG_PUSH(Fortran)
9469
if test -z "$FC" || test "X$FC" = "Xno"; then
9473
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9474
_LT_TAGVAR(allow_undefined_flag, $1)=
9475
_LT_TAGVAR(always_export_symbols, $1)=no
9476
_LT_TAGVAR(archive_expsym_cmds, $1)=
9477
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9478
_LT_TAGVAR(hardcode_direct, $1)=no
9479
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9480
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9481
_LT_TAGVAR(hardcode_libdir_separator, $1)=
9482
_LT_TAGVAR(hardcode_minus_L, $1)=no
9483
_LT_TAGVAR(hardcode_automatic, $1)=no
9484
_LT_TAGVAR(inherit_rpath, $1)=no
9485
_LT_TAGVAR(module_cmds, $1)=
9486
_LT_TAGVAR(module_expsym_cmds, $1)=
9487
_LT_TAGVAR(link_all_deplibs, $1)=unknown
9488
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9489
_LT_TAGVAR(reload_flag, $1)=$reload_flag
9490
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9491
_LT_TAGVAR(no_undefined_flag, $1)=
9492
_LT_TAGVAR(whole_archive_flag_spec, $1)=
9493
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9495
# Source file extension for fc test sources.
9496
ac_ext=${ac_fc_srcext-f}
9498
# Object file extension for compiled fc test sources.
9500
_LT_TAGVAR(objext, $1)=$objext
9502
# No sense in running all these tests if we already determined that
9503
# the FC compiler isn't working. Some variables (like enable_shared)
9504
# are currently assumed to apply to all compilers on this platform,
9505
# and will be corrupted by setting them based on a non-working compiler.
9506
if test "$_lt_disable_FC" != yes; then
9507
# Code to be used in simple compile tests
9508
lt_simple_compile_test_code="\
9514
# Code to be used in simple link tests
9515
lt_simple_link_test_code="\
9520
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9523
# save warnings/boilerplate of simple test code
9524
_LT_COMPILER_BOILERPLATE
9525
_LT_LINKER_BOILERPLATE
9527
# Allow CC to be a program name with arguments.
9530
lt_save_CFLAGS=$CFLAGS
9534
GCC=$ac_cv_fc_compiler_gnu
9536
_LT_TAGVAR(compiler, $1)=$CC
9537
_LT_CC_BASENAME([$compiler])
9539
if test -n "$compiler"; then
9540
AC_MSG_CHECKING([if libtool supports shared libraries])
9541
AC_MSG_RESULT([$can_build_shared])
9543
AC_MSG_CHECKING([whether to build shared libraries])
9544
test "$can_build_shared" = "no" && enable_shared=no
9546
# On AIX, shared libraries and static libraries use the same namespace, and
9547
# are all built from PIC.
9550
test "$enable_shared" = yes && enable_static=no
9551
if test -n "$RANLIB"; then
9552
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9553
postinstall_cmds='$RANLIB $lib'
9557
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9558
test "$enable_shared" = yes && enable_static=no
9562
AC_MSG_RESULT([$enable_shared])
9564
AC_MSG_CHECKING([whether to build static libraries])
9565
# Make sure either enable_shared or enable_static is yes.
9566
test "$enable_shared" = yes || enable_static=yes
9567
AC_MSG_RESULT([$enable_static])
9569
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9570
_LT_TAGVAR(LD, $1)="$LD"
9573
## There is no encapsulation within the following macros, do not change
9574
## the running order or otherwise move them around unless you know exactly
9575
## what you are doing...
9576
_LT_SYS_HIDDEN_LIBDEPS($1)
9577
_LT_COMPILER_PIC($1)
9578
_LT_COMPILER_C_O($1)
9579
_LT_COMPILER_FILE_LOCKS($1)
9580
_LT_LINKER_SHLIBS($1)
9581
_LT_SYS_DYNAMIC_LINKER($1)
9582
_LT_LINKER_HARDCODE_LIBPATH($1)
9585
fi # test -n "$compiler"
9589
CFLAGS=$lt_save_CFLAGS
9590
fi # test "$_lt_disable_FC" != yes
9593
])# _LT_LANG_FC_CONFIG
9596
# _LT_LANG_GCJ_CONFIG([TAG])
9597
# --------------------------
9598
# Ensure that the configuration variables for the GNU Java Compiler compiler
9599
# are suitably defined. These variables are subsequently used by _LT_CONFIG
9600
# to write the compiler configuration to `libtool'.
9601
m4_defun([_LT_LANG_GCJ_CONFIG],
9602
[AC_REQUIRE([LT_PROG_GCJ])dnl
9605
# Source file extension for Java test sources.
9608
# Object file extension for compiled Java test sources.
9610
_LT_TAGVAR(objext, $1)=$objext
9612
# Code to be used in simple compile tests
9613
lt_simple_compile_test_code="class foo {}"
9615
# Code to be used in simple link tests
9616
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9618
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9621
# save warnings/boilerplate of simple test code
9622
_LT_COMPILER_BOILERPLATE
9623
_LT_LINKER_BOILERPLATE
9625
# Allow CC to be a program name with arguments.
9627
lt_save_CFLAGS=$CFLAGS
9633
_LT_TAGVAR(compiler, $1)=$CC
9634
_LT_TAGVAR(LD, $1)="$LD"
9635
_LT_CC_BASENAME([$compiler])
9637
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9638
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9640
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9641
_LT_TAGVAR(reload_flag, $1)=$reload_flag
9642
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9644
if test -n "$compiler"; then
9645
_LT_COMPILER_NO_RTTI($1)
9646
_LT_COMPILER_PIC($1)
9647
_LT_COMPILER_C_O($1)
9648
_LT_COMPILER_FILE_LOCKS($1)
9649
_LT_LINKER_SHLIBS($1)
9650
_LT_LINKER_HARDCODE_LIBPATH($1)
9659
CFLAGS=$lt_save_CFLAGS
9660
])# _LT_LANG_GCJ_CONFIG
9663
# _LT_LANG_GO_CONFIG([TAG])
9664
# --------------------------
9665
# Ensure that the configuration variables for the GNU Go compiler
9666
# are suitably defined. These variables are subsequently used by _LT_CONFIG
9667
# to write the compiler configuration to `libtool'.
9668
m4_defun([_LT_LANG_GO_CONFIG],
9669
[AC_REQUIRE([LT_PROG_GO])dnl
9672
# Source file extension for Go test sources.
9675
# Object file extension for compiled Go test sources.
9677
_LT_TAGVAR(objext, $1)=$objext
9679
# Code to be used in simple compile tests
9680
lt_simple_compile_test_code="package main; func main() { }"
9682
# Code to be used in simple link tests
9683
lt_simple_link_test_code='package main; func main() { }'
9685
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9688
# save warnings/boilerplate of simple test code
9689
_LT_COMPILER_BOILERPLATE
9690
_LT_LINKER_BOILERPLATE
9692
# Allow CC to be a program name with arguments.
9694
lt_save_CFLAGS=$CFLAGS
9700
_LT_TAGVAR(compiler, $1)=$CC
9701
_LT_TAGVAR(LD, $1)="$LD"
9702
_LT_CC_BASENAME([$compiler])
9704
# Go did not exist at the time GCC didn't implicitly link libc in.
9705
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9707
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9708
_LT_TAGVAR(reload_flag, $1)=$reload_flag
9709
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9711
if test -n "$compiler"; then
9712
_LT_COMPILER_NO_RTTI($1)
9713
_LT_COMPILER_PIC($1)
9714
_LT_COMPILER_C_O($1)
9715
_LT_COMPILER_FILE_LOCKS($1)
9716
_LT_LINKER_SHLIBS($1)
9717
_LT_LINKER_HARDCODE_LIBPATH($1)
9726
CFLAGS=$lt_save_CFLAGS
9727
])# _LT_LANG_GO_CONFIG
9730
# _LT_LANG_RC_CONFIG([TAG])
9731
# -------------------------
9732
# Ensure that the configuration variables for the Windows resource compiler
9733
# are suitably defined. These variables are subsequently used by _LT_CONFIG
9734
# to write the compiler configuration to `libtool'.
9735
m4_defun([_LT_LANG_RC_CONFIG],
9736
[AC_REQUIRE([LT_PROG_RC])dnl
9739
# Source file extension for RC test sources.
9742
# Object file extension for compiled RC test sources.
9744
_LT_TAGVAR(objext, $1)=$objext
9746
# Code to be used in simple compile tests
9747
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9749
# Code to be used in simple link tests
9750
lt_simple_link_test_code="$lt_simple_compile_test_code"
9752
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9755
# save warnings/boilerplate of simple test code
9756
_LT_COMPILER_BOILERPLATE
9757
_LT_LINKER_BOILERPLATE
9759
# Allow CC to be a program name with arguments.
9761
lt_save_CFLAGS=$CFLAGS
9767
_LT_TAGVAR(compiler, $1)=$CC
9768
_LT_CC_BASENAME([$compiler])
9769
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9771
if test -n "$compiler"; then
9779
CFLAGS=$lt_save_CFLAGS
9780
])# _LT_LANG_RC_CONFIG
9785
AC_DEFUN([LT_PROG_GCJ],
9786
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9787
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9788
[AC_CHECK_TOOL(GCJ, gcj,)
9789
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9790
AC_SUBST(GCJFLAGS)])])[]dnl
9794
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9795
dnl aclocal-1.4 backwards compatibility:
9796
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9801
AC_DEFUN([LT_PROG_GO],
9802
[AC_CHECK_TOOL(GOC, gccgo,)
9808
AC_DEFUN([LT_PROG_RC],
9809
[AC_CHECK_TOOL(RC, windres,)
9813
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9814
dnl aclocal-1.4 backwards compatibility:
9815
dnl AC_DEFUN([LT_AC_PROG_RC], [])
9820
# If we don't have a new enough Autoconf to choose the best grep
9821
# available, choose the one first in the user's PATH.
9822
m4_defun([_LT_DECL_EGREP],
9823
[AC_REQUIRE([AC_PROG_EGREP])dnl
9824
AC_REQUIRE([AC_PROG_FGREP])dnl
9825
test -z "$GREP" && GREP=grep
9826
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9827
_LT_DECL([], [EGREP], [1], [An ERE matcher])
9828
_LT_DECL([], [FGREP], [1], [A literal string matcher])
9829
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9836
# If we don't have a new enough Autoconf to choose the best objdump
9837
# available, choose the one first in the user's PATH.
9838
m4_defun([_LT_DECL_OBJDUMP],
9839
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9840
test -z "$OBJDUMP" && OBJDUMP=objdump
9841
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9847
# Ensure DLLTOOL variable is set.
9848
m4_defun([_LT_DECL_DLLTOOL],
9849
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9850
test -z "$DLLTOOL" && DLLTOOL=dlltool
9851
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9857
# Check for a fully-functional sed program, that truncates
9858
# as few characters as possible. Prefer GNU sed if found.
9859
m4_defun([_LT_DECL_SED],
9861
test -z "$SED" && SED=sed
9862
Xsed="$SED -e 1s/^X//"
9863
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9864
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9865
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
9868
m4_ifndef([AC_PROG_SED], [
9869
# NOTE: This macro has been submitted for inclusion into #
9870
# GNU Autoconf as AC_PROG_SED. When it is available in #
9871
# a released version of Autoconf we should remove this #
9872
# macro and use it instead. #
9874
m4_defun([AC_PROG_SED],
9875
[AC_MSG_CHECKING([for a sed that does not truncate output])
9876
AC_CACHE_VAL(lt_cv_path_SED,
9877
[# Loop through the user's path and test for sed and gsed.
9878
# Then use that list of sed's as ones to test for truncation.
9879
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9883
test -z "$as_dir" && as_dir=.
9884
for lt_ac_prog in sed gsed; do
9885
for ac_exec_ext in '' $ac_executable_extensions; do
9886
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9887
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9895
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9896
# along with /bin/sed that truncates output.
9897
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9898
test ! -f $lt_ac_sed && continue
9899
cat /dev/null > conftest.in
9901
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9902
# Check for GNU sed and select it if it is found.
9903
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9904
lt_cv_path_SED=$lt_ac_sed
9908
cat conftest.in conftest.in >conftest.tmp
9909
mv conftest.tmp conftest.in
9910
cp conftest.in conftest.nl
9912
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9913
cmp -s conftest.out conftest.nl || break
9914
# 10000 chars as input seems more than enough
9915
test $lt_ac_count -gt 10 && break
9916
lt_ac_count=`expr $lt_ac_count + 1`
9917
if test $lt_ac_count -gt $lt_ac_max; then
9918
lt_ac_max=$lt_ac_count
9919
lt_cv_path_SED=$lt_ac_sed
9926
AC_MSG_RESULT([$SED])
9931
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9932
dnl aclocal-1.4 backwards compatibility:
9933
dnl AC_DEFUN([LT_AC_PROG_SED], [])
9936
# _LT_CHECK_SHELL_FEATURES
9937
# ------------------------
9938
# Find out whether the shell is Bourne or XSI compatible,
9939
# or has some other useful features.
9940
m4_defun([_LT_CHECK_SHELL_FEATURES],
9941
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9942
# Try some XSI features
9945
test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9947
&& eval 'test $(( 1 + 1 )) -eq 2 \
9948
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9950
AC_MSG_RESULT([$xsi_shell])
9951
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9953
AC_MSG_CHECKING([whether the shell understands "+="])
9955
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9957
&& lt_shell_append=yes
9958
AC_MSG_RESULT([$lt_shell_append])
9959
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9961
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9966
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9968
# test EBCDIC or ASCII
9969
case `echo X|tr X '\101'` in
9970
A) # ASCII based system
9971
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9972
lt_SP2NL='tr \040 \012'
9973
lt_NL2SP='tr \015\012 \040\040'
9975
*) # EBCDIC based system
9976
lt_SP2NL='tr \100 \n'
9977
lt_NL2SP='tr \r\n \100\100'
9980
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9981
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9982
])# _LT_CHECK_SHELL_FEATURES
9985
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9986
# ------------------------------------------------------
9987
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9988
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9989
m4_defun([_LT_PROG_FUNCTION_REPLACE],
9991
sed -e '/^$1 ()$/,/^} # $1 /c\
9994
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
9995
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9996
&& mv -f "$cfgfile.tmp" "$cfgfile" \
9997
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9998
test 0 -eq $? || _lt_function_replace_fail=:
10002
# _LT_PROG_REPLACE_SHELLFNS
10003
# -------------------------
10004
# Replace existing portable implementations of several shell functions with
10005
# equivalent extended shell implementations where those features are available..
10006
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
10007
[if test x"$xsi_shell" = xyes; then
10008
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
10010
*/*) func_dirname_result="${1%/*}${2}" ;;
10011
* ) func_dirname_result="${3}" ;;
10014
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
10015
func_basename_result="${1##*/}"])
10017
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
10019
*/*) func_dirname_result="${1%/*}${2}" ;;
10020
* ) func_dirname_result="${3}" ;;
10022
func_basename_result="${1##*/}"])
10024
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
10025
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
10026
# positional parameters, so assign one to ordinary parameter first.
10027
func_stripname_result=${3}
10028
func_stripname_result=${func_stripname_result#"${1}"}
10029
func_stripname_result=${func_stripname_result%"${2}"}])
10031
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
10032
func_split_long_opt_name=${1%%=*}
10033
func_split_long_opt_arg=${1#*=}])
10035
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
10036
func_split_short_opt_arg=${1#??}
10037
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
10039
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
10041
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
10042
*) func_lo2o_result=${1} ;;
10045
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
10047
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
10049
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
10052
if test x"$lt_shell_append" = xyes; then
10053
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
10055
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
10056
func_quote_for_eval "${2}"
10057
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
10058
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
10060
# Save a `func_append' function call where possible by direct use of '+='
10061
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
10062
&& mv -f "$cfgfile.tmp" "$cfgfile" \
10063
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10064
test 0 -eq $? || _lt_function_replace_fail=:
10066
# Save a `func_append' function call even when '+=' is not available
10067
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
10068
&& mv -f "$cfgfile.tmp" "$cfgfile" \
10069
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10070
test 0 -eq $? || _lt_function_replace_fail=:
10073
if test x"$_lt_function_replace_fail" = x":"; then
10074
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
10078
# _LT_PATH_CONVERSION_FUNCTIONS
10079
# -----------------------------
10080
# Determine which file name conversion functions should be used by
10081
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
10082
# for certain cross-compile configurations and native mingw.
10083
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10084
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10085
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10086
AC_MSG_CHECKING([how to convert $build file names to $host format])
10087
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10091
*-*-mingw* ) # actually msys
10092
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10095
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10097
* ) # otherwise, assume *nix
10098
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10104
*-*-mingw* ) # actually msys
10105
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10108
lt_cv_to_host_file_cmd=func_convert_file_noop
10110
* ) # otherwise, assume *nix
10111
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10115
* ) # unhandled hosts (and "normal" native builds)
10116
lt_cv_to_host_file_cmd=func_convert_file_noop
10120
to_host_file_cmd=$lt_cv_to_host_file_cmd
10121
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10122
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10123
[0], [convert $build file names to $host format])dnl
10125
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10126
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10127
[#assume ordinary cross tools, or native build.
10128
lt_cv_to_tool_file_cmd=func_convert_file_noop
10132
*-*-mingw* ) # actually msys
10133
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10139
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10140
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10141
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10142
[0], [convert $build files to toolchain format])dnl
10143
])# _LT_PATH_CONVERSION_FUNCTIONS
10145
# Helper functions for option handling. -*- Autoconf -*-
10147
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
10149
# Written by Gary V. Vaughan, 2004
10151
# This file is free software; the Free Software Foundation gives
10152
# unlimited permission to copy and/or distribute it, with or without
10153
# modifications, as long as this notice is preserved.
10155
# serial 7 ltoptions.m4
10157
# This is to help aclocal find these macros, as it can't see m4_define.
10158
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
10161
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
10162
# ------------------------------------------
10163
m4_define([_LT_MANGLE_OPTION],
10164
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
10167
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
10168
# ---------------------------------------
10169
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
10170
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
10172
m4_define([_LT_SET_OPTION],
10173
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
10174
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
10175
_LT_MANGLE_DEFUN([$1], [$2]),
10176
[m4_warning([Unknown $1 option `$2'])])[]dnl
10180
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
10181
# ------------------------------------------------------------
10182
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10183
m4_define([_LT_IF_OPTION],
10184
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
10187
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
10188
# -------------------------------------------------------
10189
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
10191
m4_define([_LT_UNLESS_OPTIONS],
10192
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10193
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
10194
[m4_define([$0_found])])])[]dnl
10195
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
10200
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10201
# ----------------------------------------
10202
# OPTION-LIST is a space-separated list of Libtool options associated
10203
# with MACRO-NAME. If any OPTION has a matching handler declared with
10204
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10205
# the unknown option and exit.
10206
m4_defun([_LT_SET_OPTIONS],
10208
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10209
[_LT_SET_OPTION([$1], _LT_Option)])
10211
m4_if([$1],[LT_INIT],[
10213
dnl Simply set some default values (i.e off) if boolean options were not
10215
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10217
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10220
dnl If no reference was made to various pairs of opposing options, then
10221
dnl we run the default mode handler for the pair. For example, if neither
10222
dnl `shared' nor `disable-shared' was passed, we enable building of shared
10223
dnl archives by default:
10224
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10225
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10226
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10227
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10228
[_LT_ENABLE_FAST_INSTALL])
10230
])# _LT_SET_OPTIONS
10234
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10235
# -----------------------------------------
10236
m4_define([_LT_MANGLE_DEFUN],
10237
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10240
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10241
# -----------------------------------------------
10242
m4_define([LT_OPTION_DEFINE],
10243
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10244
])# LT_OPTION_DEFINE
10249
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10252
AU_DEFUN([AC_LIBTOOL_DLOPEN],
10253
[_LT_SET_OPTION([LT_INIT], [dlopen])
10254
AC_DIAGNOSE([obsolete],
10255
[$0: Remove this warning and the call to _LT_SET_OPTION when you
10256
put the `dlopen' option into LT_INIT's first parameter.])
10259
dnl aclocal-1.4 backwards compatibility:
10260
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10265
# Declare package support for building win32 dll's.
10266
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10267
[enable_win32_dll=yes
10270
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10271
AC_CHECK_TOOL(AS, as, false)
10272
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10273
AC_CHECK_TOOL(OBJDUMP, objdump, false)
10277
test -z "$AS" && AS=as
10278
_LT_DECL([], [AS], [1], [Assembler program])dnl
10280
test -z "$DLLTOOL" && DLLTOOL=dlltool
10281
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10283
test -z "$OBJDUMP" && OBJDUMP=objdump
10284
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10287
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10288
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10289
_LT_SET_OPTION([LT_INIT], [win32-dll])
10290
AC_DIAGNOSE([obsolete],
10291
[$0: Remove this warning and the call to _LT_SET_OPTION when you
10292
put the `win32-dll' option into LT_INIT's first parameter.])
10295
dnl aclocal-1.4 backwards compatibility:
10296
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10299
# _LT_ENABLE_SHARED([DEFAULT])
10300
# ----------------------------
10301
# implement the --enable-shared flag, and supports the `shared' and
10302
# `disable-shared' LT_INIT options.
10303
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10304
m4_define([_LT_ENABLE_SHARED],
10305
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10306
AC_ARG_ENABLE([shared],
10307
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10308
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10309
[p=${PACKAGE-default}
10311
yes) enable_shared=yes ;;
10312
no) enable_shared=no ;;
10315
# Look at the argument we got. We use all the common list separators.
10316
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10317
for pkg in $enableval; do
10319
if test "X$pkg" = "X$p"; then
10326
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10328
_LT_DECL([build_libtool_libs], [enable_shared], [0],
10329
[Whether or not to build shared libraries])
10330
])# _LT_ENABLE_SHARED
10332
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10333
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10336
AC_DEFUN([AC_ENABLE_SHARED],
10337
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10340
AC_DEFUN([AC_DISABLE_SHARED],
10341
[_LT_SET_OPTION([LT_INIT], [disable-shared])
10344
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10345
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10347
dnl aclocal-1.4 backwards compatibility:
10348
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10349
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10353
# _LT_ENABLE_STATIC([DEFAULT])
10354
# ----------------------------
10355
# implement the --enable-static flag, and support the `static' and
10356
# `disable-static' LT_INIT options.
10357
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10358
m4_define([_LT_ENABLE_STATIC],
10359
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10360
AC_ARG_ENABLE([static],
10361
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10362
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10363
[p=${PACKAGE-default}
10365
yes) enable_static=yes ;;
10366
no) enable_static=no ;;
10369
# Look at the argument we got. We use all the common list separators.
10370
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10371
for pkg in $enableval; do
10373
if test "X$pkg" = "X$p"; then
10380
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10382
_LT_DECL([build_old_libs], [enable_static], [0],
10383
[Whether or not to build static libraries])
10384
])# _LT_ENABLE_STATIC
10386
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10387
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10390
AC_DEFUN([AC_ENABLE_STATIC],
10391
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10394
AC_DEFUN([AC_DISABLE_STATIC],
10395
[_LT_SET_OPTION([LT_INIT], [disable-static])
10398
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10399
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10401
dnl aclocal-1.4 backwards compatibility:
10402
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10403
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10407
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10408
# ----------------------------------
10409
# implement the --enable-fast-install flag, and support the `fast-install'
10410
# and `disable-fast-install' LT_INIT options.
10411
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
10412
m4_define([_LT_ENABLE_FAST_INSTALL],
10413
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10414
AC_ARG_ENABLE([fast-install],
10415
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10416
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10417
[p=${PACKAGE-default}
10419
yes) enable_fast_install=yes ;;
10420
no) enable_fast_install=no ;;
10422
enable_fast_install=no
10423
# Look at the argument we got. We use all the common list separators.
10424
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10425
for pkg in $enableval; do
10427
if test "X$pkg" = "X$p"; then
10428
enable_fast_install=yes
10434
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10436
_LT_DECL([fast_install], [enable_fast_install], [0],
10437
[Whether or not to optimize for fast installation])dnl
10438
])# _LT_ENABLE_FAST_INSTALL
10440
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10441
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10444
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10445
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10446
AC_DIAGNOSE([obsolete],
10447
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10448
the `fast-install' option into LT_INIT's first parameter.])
10451
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10452
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10453
AC_DIAGNOSE([obsolete],
10454
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10455
the `disable-fast-install' option into LT_INIT's first parameter.])
10458
dnl aclocal-1.4 backwards compatibility:
10459
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10460
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10463
# _LT_WITH_PIC([MODE])
10464
# --------------------
10465
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10467
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
10468
m4_define([_LT_WITH_PIC],
10469
[AC_ARG_WITH([pic],
10470
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10471
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10472
[lt_p=${PACKAGE-default}
10474
yes|no) pic_mode=$withval ;;
10477
# Look at the argument we got. We use all the common list separators.
10478
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10479
for lt_pkg in $withval; do
10481
if test "X$lt_pkg" = "X$lt_p"; then
10488
[pic_mode=default])
10490
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10492
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10495
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10496
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10499
AU_DEFUN([AC_LIBTOOL_PICMODE],
10500
[_LT_SET_OPTION([LT_INIT], [pic-only])
10501
AC_DIAGNOSE([obsolete],
10502
[$0: Remove this warning and the call to _LT_SET_OPTION when you
10503
put the `pic-only' option into LT_INIT's first parameter.])
10506
dnl aclocal-1.4 backwards compatibility:
10507
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10510
m4_define([_LTDL_MODE], [])
10511
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10512
[m4_define([_LTDL_MODE], [nonrecursive])])
10513
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10514
[m4_define([_LTDL_MODE], [recursive])])
10515
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10516
[m4_define([_LTDL_MODE], [subproject])])
10518
m4_define([_LTDL_TYPE], [])
10519
LT_OPTION_DEFINE([LTDL_INIT], [installable],
10520
[m4_define([_LTDL_TYPE], [installable])])
10521
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10522
[m4_define([_LTDL_TYPE], [convenience])])
10524
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
10526
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10527
# Written by Gary V. Vaughan, 2004
10529
# This file is free software; the Free Software Foundation gives
10530
# unlimited permission to copy and/or distribute it, with or without
10531
# modifications, as long as this notice is preserved.
10533
# serial 6 ltsugar.m4
10535
# This is to help aclocal find these macros, as it can't see m4_define.
10536
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10539
# lt_join(SEP, ARG1, [ARG2...])
10540
# -----------------------------
10541
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10542
# associated separator.
10543
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10544
# versions in m4sugar had bugs.
10545
m4_define([lt_join],
10546
[m4_if([$#], [1], [],
10548
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10549
m4_define([_lt_join],
10550
[m4_if([$#$2], [2], [],
10551
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10557
# Manipulate m4 lists.
10558
# These macros are necessary as long as will still need to support
10559
# Autoconf-2.59 which quotes differently.
10560
m4_define([lt_car], [[$1]])
10561
m4_define([lt_cdr],
10562
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10564
[m4_dquote(m4_shift($@))])])
10565
m4_define([lt_unquote], $1)
10568
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10569
# ------------------------------------------
10570
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10571
# Note that neither SEPARATOR nor STRING are expanded; they are appended
10572
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10573
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10574
# than defined and empty).
10576
# This macro is needed until we can rely on Autoconf 2.62, since earlier
10577
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10578
m4_define([lt_append],
10580
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10584
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10585
# ----------------------------------------------------------
10586
# Produce a SEP delimited list of all paired combinations of elements of
10587
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
10588
# has the form PREFIXmINFIXSUFFIXn.
10589
# Needed until we can rely on m4_combine added in Autoconf 2.62.
10590
m4_define([lt_combine],
10591
[m4_if(m4_eval([$# > 3]), [1],
10592
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10593
[[m4_foreach([_Lt_prefix], [$2],
10594
[m4_foreach([_Lt_suffix],
10595
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10596
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10599
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10600
# -----------------------------------------------------------------------
10601
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10602
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10603
m4_define([lt_if_append_uniq],
10605
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10606
[lt_append([$1], [$2], [$3])$4],
10608
[lt_append([$1], [$2], [$3])$4])])
10611
# lt_dict_add(DICT, KEY, VALUE)
10612
# -----------------------------
10613
m4_define([lt_dict_add],
10614
[m4_define([$1($2)], [$3])])
10617
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10618
# --------------------------------------------
10619
m4_define([lt_dict_add_subkey],
10620
[m4_define([$1($2:$3)], [$4])])
10623
# lt_dict_fetch(DICT, KEY, [SUBKEY])
10624
# ----------------------------------
10625
m4_define([lt_dict_fetch],
10627
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10628
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10631
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10632
# -----------------------------------------------------------------
10633
m4_define([lt_if_dict_fetch],
10634
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10639
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10640
# --------------------------------------------------------------
10641
m4_define([lt_dict_filter],
10642
[m4_if([$5], [], [],
10643
[lt_join(m4_quote(m4_default([$4], [[, ]])),
10644
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10645
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10648
# ltversion.m4 -- version numbers -*- Autoconf -*-
10650
# Copyright (C) 2004 Free Software Foundation, Inc.
10651
# Written by Scott James Remnant, 2004
10653
# This file is free software; the Free Software Foundation gives
10654
# unlimited permission to copy and/or distribute it, with or without
10655
# modifications, as long as this notice is preserved.
10657
# @configure_input@
10659
# serial 3337 ltversion.m4
10660
# This file is part of GNU Libtool
10662
m4_define([LT_PACKAGE_VERSION], [2.4.2])
10663
m4_define([LT_PACKAGE_REVISION], [1.3337])
10665
AC_DEFUN([LTVERSION_VERSION],
10666
[macro_version='2.4.2'
10667
macro_revision='1.3337'
10668
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10669
_LT_DECL(, macro_revision, 0)
10672
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
10674
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10675
# Written by Scott James Remnant, 2004.
10677
# This file is free software; the Free Software Foundation gives
10678
# unlimited permission to copy and/or distribute it, with or without
10679
# modifications, as long as this notice is preserved.
10681
# serial 5 lt~obsolete.m4
10683
# These exist entirely to fool aclocal when bootstrapping libtool.
10685
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10686
# which have later been changed to m4_define as they aren't part of the
10687
# exported API, or moved to Autoconf or Automake where they belong.
10689
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
10690
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10691
# using a macro with the same name in our local m4/libtool.m4 it'll
10692
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10693
# and doesn't know about Autoconf macros at all.)
10695
# So we provide this file, which has a silly filename so it's always
10696
# included after everything else. This provides aclocal with the
10697
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10698
# because those macros already exist, or will be overwritten later.
10699
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10701
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10702
# Yes, that means every name once taken will need to remain here until
10703
# we give up compatibility with versions before 1.7, at which point
10704
# we need to keep only those names which we still refer to.
10706
# This is to help aclocal find these macros, as it can't see m4_define.
10707
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10709
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10710
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
10711
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10712
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
10713
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10714
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
10715
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
10716
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10717
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
10718
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10719
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
10720
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10721
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10722
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10723
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10724
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10725
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
10726
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10727
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10728
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
10729
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
10730
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10731
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10732
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10733
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10734
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10735
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10736
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10737
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
10738
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
10739
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
10740
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10741
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10742
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
10743
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
10744
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10745
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10746
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
10747
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10748
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
10749
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
10750
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
10751
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10752
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10753
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10754
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10755
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10756
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10757
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10758
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10759
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10760
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10761
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10762
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10763
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10764
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10765
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10766
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10767
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
10768
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
10769
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
10771
# nls.m4 serial 5 (gettext-0.18)
10772
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
10774
dnl This file is free software; the Free Software Foundation
10775
dnl gives unlimited permission to copy and/or distribute it,
10776
dnl with or without modifications, as long as this notice is preserved.
10778
dnl This file can can be used in projects which are not available under
10779
dnl the GNU General Public License or the GNU Library General Public
10780
dnl License but which still want to provide support for the GNU gettext
10782
dnl Please note that the actual code of the GNU gettext library is covered
10783
dnl by the GNU Library General Public License, and the rest of the GNU
10784
dnl gettext package package is covered by the GNU General Public License.
10785
dnl They are *not* in the public domain.
10788
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
10789
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
10795
AC_MSG_CHECKING([whether NLS is requested])
10796
dnl Default is enabled NLS
10797
AC_ARG_ENABLE([nls],
10798
[ --disable-nls do not use Native Language Support],
10799
USE_NLS=$enableval, USE_NLS=yes)
10800
AC_MSG_RESULT([$USE_NLS])
10801
AC_SUBST([USE_NLS])
10804
204
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
10805
205
# serial 1 (pkg-config-0.24)