1010
# _LT_SYS_MODULE_PATH_AIX
1011
# -----------------------
1120
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1121
# ----------------------------------
1012
1122
# Links a minimal program and checks the executable
1013
1123
# for the system default hardcoded library path. In most cases,
1014
1124
# this is /usr/lib:/lib, but when the MPI compilers are used
1015
1125
# the location of the communication and MPI libs are included too.
1016
1126
# If we don't find anything, use the default library path according
1017
1127
# to the aix ld manual.
1128
# Store the results from the different compilers for each TAGNAME.
1129
# Allow to override them for all tags through lt_cv_aix_libpath.
1018
1130
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1019
1131
[m4_require([_LT_DECL_SED])dnl
1020
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1021
lt_aix_libpath_sed='
1022
/Import File Strings/,/^$/ {
1028
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1029
# Check for a 64-bit object if we didn't find anything.
1030
if test -z "$aix_libpath"; then
1031
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1033
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1132
if test "${lt_cv_aix_libpath+set}" = set; then
1133
aix_libpath=$lt_cv_aix_libpath
1135
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1136
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1137
lt_aix_libpath_sed='[
1138
/Import File Strings/,/^$/ {
1140
s/^0 *\([^ ]*\) *$/\1/
1144
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1145
# Check for a 64-bit object if we didn't find anything.
1146
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1147
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1149
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1150
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1153
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1034
1155
])# _LT_SYS_MODULE_PATH_AIX
1037
1158
# _LT_SHELL_INIT(ARG)
1038
1159
# -------------------
1039
1160
m4_define([_LT_SHELL_INIT],
1040
[ifdef([AC_DIVERSION_NOTICE],
1041
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1042
[AC_DIVERT_PUSH(NOTICE)])
1161
[m4_divert_text([M4SH-INIT], [$1
1162
])])# _LT_SHELL_INIT
1048
1166
# _LT_PROG_ECHO_BACKSLASH
1049
1167
# -----------------------
1050
# Add some code to the start of the generated configure script which
1051
# will find an echo command which doesn't interpret backslashes.
1168
# Find how we can fake an echo command that does not interpret backslash.
1169
# In particular, with Autoconf 2.60 or later we add some code to the start
1170
# of the generated configure script which will find a shell with a builtin
1171
# printf (which we can use as an echo command).
1052
1172
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1054
# Check that we are running under the correct shell.
1055
SHELL=${CONFIG_SHELL-/bin/sh}
1059
# Remove one level of quotation (which was required for Make).
1060
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1173
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1174
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1175
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1177
AC_MSG_CHECKING([how to print strings])
1178
# Test print first, because it will be a builtin if present.
1179
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1180
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1182
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1185
# Use this function as a fallback that always works.
1186
func_fallback_echo ()
1188
eval 'cat <<_LTECHO_EOF
1192
ECHO='func_fallback_echo'
1195
# func_echo_all arg...
1196
# Invoke $ECHO with all args, space-separated.
1203
printf*) AC_MSG_RESULT([printf]) ;;
1204
print*) AC_MSG_RESULT([print -r]) ;;
1205
*) AC_MSG_RESULT([cat]) ;;
1064
ECHO=${lt_ECHO-echo}
1065
if test "X[$]1" = X--no-reexec; then
1066
# Discard the --no-reexec flag, and continue.
1068
elif test "X[$]1" = X--fallback-echo; then
1069
# Avoid inline document here, it may be left over
1071
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1072
# Yippee, $ECHO works!
1075
# Restart under the correct shell.
1076
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1079
if test "X[$]1" = X--fallback-echo; then
1080
# used as fallback echo
1088
# The HP-UX ksh and POSIX shell print the target directory to stdout
1090
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1092
if test -z "$lt_ECHO"; then
1093
if test "X${echo_test_string+set}" != Xset; then
1094
# find a string as large as possible, as long as the shell can cope with it
1095
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1096
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1097
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1098
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1105
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1106
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1107
test "X$echo_testing_string" = "X$echo_test_string"; then
1110
# The Solaris, AIX, and Digital Unix default echo programs unquote
1111
# backslashes. This makes it impossible to quote backslashes using
1112
# echo "$something" | sed 's/\\/\\\\/g'
1114
# So, first we look for a working echo in the user's PATH.
1116
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1117
for dir in $PATH /usr/ucb; do
1119
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1120
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1121
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1122
test "X$echo_testing_string" = "X$echo_test_string"; then
1129
if test "X$ECHO" = Xecho; then
1130
# We didn't find a better echo, so look for alternatives.
1131
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1132
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1133
test "X$echo_testing_string" = "X$echo_test_string"; then
1134
# This shell has a builtin print -r that does the trick.
1136
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1137
test "X$CONFIG_SHELL" != X/bin/ksh; then
1138
# If we have ksh, try running configure again with it.
1139
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1140
export ORIGINAL_CONFIG_SHELL
1141
CONFIG_SHELL=/bin/ksh
1143
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1147
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1148
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1149
test "X$echo_testing_string" = "X$echo_test_string"; then
1150
# Cool, printf works
1152
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1153
test "X$echo_testing_string" = 'X\t' &&
1154
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1155
test "X$echo_testing_string" = "X$echo_test_string"; then
1156
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1158
SHELL="$CONFIG_SHELL"
1160
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1161
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1162
test "X$echo_testing_string" = 'X\t' &&
1163
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1164
test "X$echo_testing_string" = "X$echo_test_string"; then
1165
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1167
# maybe with a smaller string...
1170
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1171
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1178
if test "$prev" != 'sed 50q "[$]0"'; then
1179
echo_test_string=`eval $prev`
1180
export echo_test_string
1181
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1183
# Oops. We lost completely, so just stick with echo.
1192
# Copy echo and quote the copy suitably for passing to libtool from
1193
# the Makefile, instead of quoting the original, which is used later.
1195
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1196
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1208
m4_ifdef([_AS_DETECT_SUGGESTED],
1209
[_AS_DETECT_SUGGESTED([
1210
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1211
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1212
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1213
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1214
PATH=/empty FPATH=/empty; export PATH FPATH
1215
test "X`printf %s $ECHO`" = "X$ECHO" \
1216
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1201
1218
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1202
_LT_DECL([], [ECHO], [1],
1203
[An echo program that does not interpret backslashes])
1219
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1204
1220
])# _LT_PROG_ECHO_BACKSLASH
1225
AC_DEFUN([_LT_WITH_SYSROOT],
1226
[AC_MSG_CHECKING([for sysroot])
1227
AC_ARG_WITH([sysroot],
1228
[ --with-sysroot[=DIR] Search for dependent libraries within DIR
1229
(or the compiler's sysroot if not specified).],
1230
[], [with_sysroot=no])
1232
dnl lt_sysroot will always be passed unquoted. We quote it here
1233
dnl in case the user passed a directory name.
1235
case ${with_sysroot} in #(
1237
if test "$GCC" = yes; then
1238
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1242
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1247
AC_MSG_RESULT([${with_sysroot}])
1248
AC_MSG_ERROR([The sysroot must be an absolute path.])
1252
AC_MSG_RESULT([${lt_sysroot:-no}])
1253
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1254
[dependent libraries, and in which our libraries should be installed.])])
1207
1256
# _LT_ENABLE_LOCK
1208
1257
# ---------------
1209
1258
m4_defun([_LT_ENABLE_LOCK],
2228
2364
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2229
2365
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2230
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2367
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2233
2370
# MinGW DLLs use traditional 'lib' prefix
2234
2371
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2236
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2237
# It is most probably a Windows format PATH printed by
2238
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2239
# path with ; separators, and with drive letters. We can handle the
2240
# drive letters (cygwin fileutils understands them), so leave them,
2241
# especially as we might pass files found there to a mingw objdump,
2242
# which wouldn't understand a cygwinified path. Ahh.
2243
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2245
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2249
2374
# pw32 DLLs use 'pw' prefix rather than 'lib'
2250
2375
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2378
dynamic_linker='Win32 ld.exe'
2383
libname_spec='$name'
2384
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2385
library_names_spec='${libname}.dll.lib'
2389
sys_lib_search_path_spec=
2395
# Let DOS variable expansion print the short 8.3 style file name.
2396
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2397
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2400
# Convert to MSYS style.
2401
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2404
# Convert to unix form, then to dos form, then back to unix form
2405
# but this time dos style (no spaces!) so that the unix form looks
2406
# like /cygdrive/c/PROGRA~1:/cygdr...
2407
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2408
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2409
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2412
sys_lib_search_path_spec="$LIB"
2413
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2414
# It is most probably a Windows format PATH.
2415
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2417
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2419
# FIXME: find the short name or the path components, as spaces are
2420
# common. (e.g. "Program Files" -> "PROGRA~1")
2424
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2425
postinstall_cmds='base_file=`basename \${file}`~
2426
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2427
dldir=$destdir/`dirname \$dlpath`~
2428
test -d \$dldir || mkdir -p \$dldir~
2429
$install_prog $dir/$dlname \$dldir/$dlname'
2430
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2431
dlpath=$dir/\$dldll~
2433
shlibpath_overrides_runpath=yes
2434
dynamic_linker='Win32 link.exe'
2438
# Assume MSVC wrapper
2256
2439
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2440
dynamic_linker='Win32 ld.exe'
2259
dynamic_linker='Win32 ld.exe'
2260
2443
# FIXME: first we should search . and the directory the executable is in
2261
2444
shlibpath_var=PATH
3240
3492
dnl AC_DEFUN([AM_PROG_NM], [])
3241
3493
dnl AC_DEFUN([AC_PROG_NM], [])
3495
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3496
# --------------------------------
3497
# how to determine the name of the shared library
3498
# associated with a specific link library.
3499
# -- PORTME fill in with the dynamic library characteristics
3500
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3501
[m4_require([_LT_DECL_EGREP])
3502
m4_require([_LT_DECL_OBJDUMP])
3503
m4_require([_LT_DECL_DLLTOOL])
3504
AC_CACHE_CHECK([how to associate runtime and link libraries],
3505
lt_cv_sharedlib_from_linklib_cmd,
3506
[lt_cv_sharedlib_from_linklib_cmd='unknown'
3509
cygwin* | mingw* | pw32* | cegcc*)
3510
# two different shell functions defined in ltmain.sh
3511
# decide which to use based on capabilities of $DLLTOOL
3512
case `$DLLTOOL --help 2>&1` in
3513
*--identify-strict*)
3514
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3517
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3522
# fallback: assume linklib IS sharedlib
3523
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3527
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3528
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3530
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3531
[Command to associate shared and link libraries])
3532
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3535
# _LT_PATH_MANIFEST_TOOL
3536
# ----------------------
3537
# locate the manifest tool
3538
m4_defun([_LT_PATH_MANIFEST_TOOL],
3539
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3540
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3541
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3542
[lt_cv_path_mainfest_tool=no
3543
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3544
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3545
cat conftest.err >&AS_MESSAGE_LOG_FD
3546
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3547
lt_cv_path_mainfest_tool=yes
3550
if test "x$lt_cv_path_mainfest_tool" != xyes; then
3553
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3554
])# _LT_PATH_MANIFEST_TOOL
3979
4375
# All Alpha code is PIC.
3980
4376
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3983
# IBM XL C 8.0/Fortran 10.1 on PPC
4378
xl* | bgxl* | bgf* | mpixl*)
4379
# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
3984
4380
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3985
4381
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3986
4382
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3989
4385
case `$CC -V 2>&1 | sed 5q` in
4386
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4387
# Sun Fortran 8.3 passes all unrecognized flags to the linker
4388
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4389
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4390
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4392
*Sun\ F* | *Sun*Fortran*)
4393
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4394
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4395
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3992
4399
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3993
4400
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3994
4401
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3997
# Sun Fortran 8.3 passes all unrecognized flags to the linker
3998
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4403
*Intel*\ [[CF]]*Compiler*)
4404
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4406
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4409
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4410
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3999
4411
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4000
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4638
5113
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4641
cygwin* | mingw* | pw32*)
5116
cygwin* | mingw* | pw32* | cegcc*)
4642
5117
# When not using gcc, we currently assume that we are using
4643
5118
# Microsoft Visual C++.
4644
5119
# hardcode_libdir_flag_spec is actually meaningless, as there is
4645
5120
# no search path for DLLs.
4646
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4647
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4648
# Tell ltmain to make .lib files, not .a files.
4650
# Tell ltmain to make .dll files, not .so files.
4652
# FIXME: Setting linknames here is a bad hack.
4653
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4654
# The linker will automatically build a .lib file if we build a DLL.
4655
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4656
# FIXME: Should let the user specify the lib program.
4657
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4658
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4659
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5121
case $cc_basename in
5124
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5125
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5126
_LT_TAGVAR(always_export_symbols, $1)=yes
5127
_LT_TAGVAR(file_list_spec, $1)='@'
5128
# Tell ltmain to make .lib files, not .a files.
5130
# Tell ltmain to make .dll files, not .so files.
5132
# FIXME: Setting linknames here is a bad hack.
5133
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5134
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5135
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5137
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5139
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5141
# The linker will not automatically build a static lib if we build a DLL.
5142
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5143
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5144
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5145
_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'
5147
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5148
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5149
lt_tool_outputfile="@TOOL_OUTPUT@"~
5150
case $lt_outputfile in
5153
lt_outputfile="$lt_outputfile.exe"
5154
lt_tool_outputfile="$lt_tool_outputfile.exe"
5157
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5158
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5159
$RM "$lt_outputfile.manifest";
5163
# Assume MSVC wrapper
5164
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5165
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5166
# Tell ltmain to make .lib files, not .a files.
5168
# Tell ltmain to make .dll files, not .so files.
5170
# FIXME: Setting linknames here is a bad hack.
5171
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5172
# The linker will automatically build a .lib file if we build a DLL.
5173
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5174
# FIXME: Should let the user specify the lib program.
5175
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5176
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4662
5181
darwin* | rhapsody*)
4786
5307
irix5* | irix6* | nonstopux*)
4787
5308
if test "$GCC" = yes; then
4788
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5309
_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'
4789
5310
# Try to use the -exported_symbol ld option, if it does not
4790
5311
# work, assume that -exports_file does not work either and
4791
5312
# implicitly export all symbols.
4792
save_LDFLAGS="$LDFLAGS"
4793
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4794
AC_LINK_IFELSE(int foo(void) {},
4795
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4797
LDFLAGS="$save_LDFLAGS"
5313
# This should be the same for all languages, so no per-tag cache variable.
5314
AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5315
[lt_cv_irix_exported_symbol],
5316
[save_LDFLAGS="$LDFLAGS"
5317
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5320
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5321
[C++], [[int foo (void) { return 0; }]],
5328
[lt_cv_irix_exported_symbol=yes],
5329
[lt_cv_irix_exported_symbol=no])
5330
LDFLAGS="$save_LDFLAGS"])
5331
if test "$lt_cv_irix_exported_symbol" = yes; then
5332
_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'
4799
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4800
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5335
_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'
5336
_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'
4802
5338
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4803
5339
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5076
5612
# Test whether the compiler implicitly links with -lc since on some
5077
5613
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5078
5614
# to ld, don't add -lc before -lgcc.
5079
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5081
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5615
AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5616
[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5618
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5083
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5086
libobjs=conftest.$ac_objext
5088
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5089
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5095
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5096
_LT_TAGVAR(allow_undefined_flag, $1)=
5097
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5099
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5101
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5103
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5105
cat conftest.err 1>&5
5108
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5620
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5623
libobjs=conftest.$ac_objext
5625
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5626
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5632
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5633
_LT_TAGVAR(allow_undefined_flag, $1)=
5634
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5636
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5638
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5640
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5642
cat conftest.err 1>&5
5646
_LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5588
cygwin* | mingw* | pw32*)
5589
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5590
# as there is no search path for DLLs.
5591
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5592
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5593
_LT_TAGVAR(always_export_symbols, $1)=no
5594
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6117
cygwin* | mingw* | pw32* | cegcc*)
6118
case $GXX,$cc_basename in
6121
# hardcode_libdir_flag_spec is actually meaningless, as there is
6122
# no search path for DLLs.
6123
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6124
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6125
_LT_TAGVAR(always_export_symbols, $1)=yes
6126
_LT_TAGVAR(file_list_spec, $1)='@'
6127
# Tell ltmain to make .lib files, not .a files.
6129
# Tell ltmain to make .dll files, not .so files.
6131
# FIXME: Setting linknames here is a bad hack.
6132
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6133
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6134
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6136
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6138
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6140
# The linker will not automatically build a static lib if we build a DLL.
6141
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6142
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6144
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6145
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6146
lt_tool_outputfile="@TOOL_OUTPUT@"~
6147
case $lt_outputfile in
6150
lt_outputfile="$lt_outputfile.exe"
6151
lt_tool_outputfile="$lt_tool_outputfile.exe"
6154
func_to_tool_file "$lt_outputfile"~
6155
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6156
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6157
$RM "$lt_outputfile.manifest";
6162
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6163
# as there is no search path for DLLs.
6164
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6165
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6166
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6167
_LT_TAGVAR(always_export_symbols, $1)=no
6168
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5596
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5597
_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'
5598
# If the export-symbols file already is a .def file (1st line
5599
# is EXPORTS), use it as is; otherwise, prepend...
5600
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5601
cp $export_symbols $output_objdir/$soname.def;
5603
echo EXPORTS > $output_objdir/$soname.def;
5604
cat $export_symbols >> $output_objdir/$soname.def;
5606
$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'
5608
_LT_TAGVAR(ld_shlibs, $1)=no
6170
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6171
_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'
6172
# If the export-symbols file already is a .def file (1st line
6173
# is EXPORTS), use it as is; otherwise, prepend...
6174
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6175
cp $export_symbols $output_objdir/$soname.def;
6177
echo EXPORTS > $output_objdir/$soname.def;
6178
cat $export_symbols >> $output_objdir/$soname.def;
6180
$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'
6182
_LT_TAGVAR(ld_shlibs, $1)=no
5611
6187
darwin* | rhapsody*)
5612
6188
_LT_DARWIN_LINKER_FEATURES($1)
7102
7821
])# _LT_CHECK_SHELL_FEATURES
7105
# _LT_PROG_XSI_SHELLFNS
7106
# ---------------------
7107
# Bourne and XSI compatible variants of some useful shell functions.
7108
m4_defun([_LT_PROG_XSI_SHELLFNS],
7111
cat << \_LT_EOF >> "$cfgfile"
7113
# func_dirname file append nondir_replacement
7114
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7115
# otherwise set result to NONDIR_REPLACEMENT.
7119
*/*) func_dirname_result="${1%/*}${2}" ;;
7120
* ) func_dirname_result="${3}" ;;
7124
# func_basename file
7127
func_basename_result="${1##*/}"
7130
# func_dirname_and_basename file append nondir_replacement
7131
# perform func_basename and func_dirname in a single function
7133
# dirname: Compute the dirname of FILE. If nonempty,
7134
# add APPEND to the result, otherwise set result
7135
# to NONDIR_REPLACEMENT.
7136
# value returned in "$func_dirname_result"
7137
# basename: Compute filename of FILE.
7138
# value retuned in "$func_basename_result"
7139
# Implementation must be kept synchronized with func_dirname
7140
# and func_basename. For efficiency, we do not delegate to
7141
# those functions but instead duplicate the functionality here.
7142
func_dirname_and_basename ()
7145
*/*) func_dirname_result="${1%/*}${2}" ;;
7146
* ) func_dirname_result="${3}" ;;
7148
func_basename_result="${1##*/}"
7151
# func_stripname prefix suffix name
7152
# strip PREFIX and SUFFIX off of NAME.
7153
# PREFIX and SUFFIX must not contain globbing or regex special
7154
# characters, hashes, percent signs, but SUFFIX may contain a leading
7155
# dot (in which case that matches only a dot).
7158
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7159
# positional parameters, so assign one to ordinary parameter first.
7160
func_stripname_result=${3}
7161
func_stripname_result=${func_stripname_result#"${1}"}
7162
func_stripname_result=${func_stripname_result%"${2}"}
7168
func_opt_split_opt=${1%%=*}
7169
func_opt_split_arg=${1#*=}
7176
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7177
*) func_lo2o_result=${1} ;;
7181
# func_xform libobj-or-source
7184
func_xform_result=${1%.*}.lo
7187
# func_arith arithmetic-term...
7190
func_arith_result=$(( $[*] ))
7194
# STRING may not start with a hyphen.
7197
func_len_result=${#1}
7202
*) # Bourne compatible functions.
7203
cat << \_LT_EOF >> "$cfgfile"
7205
# func_dirname file append nondir_replacement
7206
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7207
# otherwise set result to NONDIR_REPLACEMENT.
7210
# Extract subdirectory from the argument.
7211
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7212
if test "X$func_dirname_result" = "X${1}"; then
7213
func_dirname_result="${3}"
7215
func_dirname_result="$func_dirname_result${2}"
7219
# func_basename file
7222
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7225
dnl func_dirname_and_basename
7226
dnl A portable version of this function is already defined in general.m4sh
7227
dnl so there is no need for it here.
7229
# func_stripname prefix suffix name
7230
# strip PREFIX and SUFFIX off of NAME.
7231
# PREFIX and SUFFIX must not contain globbing or regex special
7232
# characters, hashes, percent signs, but SUFFIX may contain a leading
7233
# dot (in which case that matches only a dot).
7234
# func_strip_suffix prefix name
7238
.*) func_stripname_result=`$ECHO "X${3}" \
7239
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7240
*) func_stripname_result=`$ECHO "X${3}" \
7241
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7246
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7247
my_sed_long_arg='1s/^-[[^=]]*=//'
7252
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7253
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7259
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7262
# func_xform libobj-or-source
7265
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7268
# func_arith arithmetic-term...
7271
func_arith_result=`expr "$[@]"`
7275
# STRING may not start with a hyphen.
7278
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7284
case $lt_shell_append in
7286
cat << \_LT_EOF >> "$cfgfile"
7288
# func_append var value
7289
# Append VALUE to the end of shell variable VAR.
7297
cat << \_LT_EOF >> "$cfgfile"
7299
# func_append var value
7300
# Append VALUE to the end of shell variable VAR.
7303
eval "$[1]=\$$[1]\$[2]"
7824
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7825
# ------------------------------------------------------
7826
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7827
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7828
m4_defun([_LT_PROG_FUNCTION_REPLACE],
7830
sed -e '/^$1 ()$/,/^} # $1 /c\
7833
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7834
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7835
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7836
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7837
test 0 -eq $? || _lt_function_replace_fail=:
7841
# _LT_PROG_REPLACE_SHELLFNS
7842
# -------------------------
7843
# Replace existing portable implementations of several shell functions with
7844
# equivalent extended shell implementations where those features are available..
7845
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7846
[if test x"$xsi_shell" = xyes; then
7847
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7849
*/*) func_dirname_result="${1%/*}${2}" ;;
7850
* ) func_dirname_result="${3}" ;;
7853
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7854
func_basename_result="${1##*/}"])
7856
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7858
*/*) func_dirname_result="${1%/*}${2}" ;;
7859
* ) func_dirname_result="${3}" ;;
7861
func_basename_result="${1##*/}"])
7863
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7864
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7865
# positional parameters, so assign one to ordinary parameter first.
7866
func_stripname_result=${3}
7867
func_stripname_result=${func_stripname_result#"${1}"}
7868
func_stripname_result=${func_stripname_result%"${2}"}])
7870
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7871
func_split_long_opt_name=${1%%=*}
7872
func_split_long_opt_arg=${1#*=}])
7874
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7875
func_split_short_opt_arg=${1#??}
7876
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7878
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7880
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7881
*) func_lo2o_result=${1} ;;
7884
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7886
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7888
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7891
if test x"$lt_shell_append" = xyes; then
7892
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7894
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7895
func_quote_for_eval "${2}"
7896
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7897
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7899
# Save a `func_append' function call where possible by direct use of '+='
7900
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7901
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7902
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7903
test 0 -eq $? || _lt_function_replace_fail=:
7905
# Save a `func_append' function call even when '+=' is not available
7906
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7907
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7908
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7909
test 0 -eq $? || _lt_function_replace_fail=:
7912
if test x"$_lt_function_replace_fail" = x":"; then
7913
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7917
# _LT_PATH_CONVERSION_FUNCTIONS
7918
# -----------------------------
7919
# Determine which file name conversion functions should be used by
7920
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7921
# for certain cross-compile configurations and native mingw.
7922
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7923
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7924
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7925
AC_MSG_CHECKING([how to convert $build file names to $host format])
7926
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7930
*-*-mingw* ) # actually msys
7931
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7934
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7936
* ) # otherwise, assume *nix
7937
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7943
*-*-mingw* ) # actually msys
7944
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7947
lt_cv_to_host_file_cmd=func_convert_file_noop
7949
* ) # otherwise, assume *nix
7950
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7954
* ) # unhandled hosts (and "normal" native builds)
7955
lt_cv_to_host_file_cmd=func_convert_file_noop
7959
to_host_file_cmd=$lt_cv_to_host_file_cmd
7960
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7961
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7962
[0], [convert $build file names to $host format])dnl
7964
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7965
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7966
[#assume ordinary cross tools, or native build.
7967
lt_cv_to_tool_file_cmd=func_convert_file_noop
7971
*-*-mingw* ) # actually msys
7972
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7978
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7979
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7980
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7981
[0], [convert $build files to toolchain format])dnl
7982
])# _LT_PATH_CONVERSION_FUNCTIONS