2459
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2460
# ----------------------------------
2354
# _LT_SYS_MODULE_PATH_AIX
2355
# -----------------------
2461
2356
# Links a minimal program and checks the executable
2462
2357
# for the system default hardcoded library path. In most cases,
2463
2358
# this is /usr/lib:/lib, but when the MPI compilers are used
2464
2359
# the location of the communication and MPI libs are included too.
2465
2360
# If we don't find anything, use the default library path according
2466
2361
# to the aix ld manual.
2467
# Store the results from the different compilers for each TAGNAME.
2468
# Allow to override them for all tags through lt_cv_aix_libpath.
2469
2362
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2470
2363
[m4_require([_LT_DECL_SED])dnl
2471
if test "${lt_cv_aix_libpath+set}" = set; then
2472
aix_libpath=$lt_cv_aix_libpath
2474
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2475
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2476
lt_aix_libpath_sed='[
2477
/Import File Strings/,/^$/ {
2479
s/^0 *\([^ ]*\) *$/\1/
2483
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2484
# Check for a 64-bit object if we didn't find anything.
2485
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2486
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2488
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2489
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2492
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2364
AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2365
lt_aix_libpath_sed='
2366
/Import File Strings/,/^$/ {
2372
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2373
# Check for a 64-bit object if we didn't find anything.
2374
if test -z "$aix_libpath"; then
2375
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2377
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2494
2378
])# _LT_SYS_MODULE_PATH_AIX
2497
2381
# _LT_SHELL_INIT(ARG)
2498
2382
# -------------------
2499
2383
m4_define([_LT_SHELL_INIT],
2500
[m4_divert_text([M4SH-INIT], [$1
2501
])])# _LT_SHELL_INIT
2384
[ifdef([AC_DIVERSION_NOTICE],
2385
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2386
[AC_DIVERT_PUSH(NOTICE)])
2505
2392
# _LT_PROG_ECHO_BACKSLASH
2506
2393
# -----------------------
2507
# Find how we can fake an echo command that does not interpret backslash.
2508
# In particular, with Autoconf 2.60 or later we add some code to the start
2509
# of the generated configure script which will find a shell with a builtin
2510
# printf (which we can use as an echo command).
2394
# Add some code to the start of the generated configure script which
2395
# will find an echo command which doesn't interpret backslashes.
2511
2396
m4_defun([_LT_PROG_ECHO_BACKSLASH],
2512
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2513
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2514
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2516
AC_MSG_CHECKING([how to print strings])
2517
# Test print first, because it will be a builtin if present.
2518
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2519
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2521
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2398
# Check that we are running under the correct shell.
2399
SHELL=${CONFIG_SHELL-/bin/sh}
2403
# Remove one level of quotation (which was required for Make).
2404
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2408
ECHO=${lt_ECHO-echo}
2409
if test "X[$]1" = X--no-reexec; then
2410
# Discard the --no-reexec flag, and continue.
2412
elif test "X[$]1" = X--fallback-echo; then
2413
# Avoid inline document here, it may be left over
2415
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2416
# Yippee, $ECHO works!
2524
# Use this function as a fallback that always works.
2525
func_fallback_echo ()
2527
eval 'cat <<_LTECHO_EOF
2531
ECHO='func_fallback_echo'
2534
# func_echo_all arg...
2535
# Invoke $ECHO with all args, space-separated.
2542
printf*) AC_MSG_RESULT([printf]) ;;
2543
print*) AC_MSG_RESULT([print -r]) ;;
2544
*) AC_MSG_RESULT([cat]) ;;
2547
m4_ifdef([_AS_DETECT_SUGGESTED],
2548
[_AS_DETECT_SUGGESTED([
2549
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2550
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2551
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2552
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2553
PATH=/empty FPATH=/empty; export PATH FPATH
2554
test "X`printf %s $ECHO`" = "X$ECHO" \
2555
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2419
# Restart under the correct shell.
2420
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2423
if test "X[$]1" = X--fallback-echo; then
2424
# used as fallback echo
2432
# The HP-UX ksh and POSIX shell print the target directory to stdout
2434
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2436
if test -z "$lt_ECHO"; then
2437
if test "X${echo_test_string+set}" != Xset; then
2438
# find a string as large as possible, as long as the shell can cope with it
2439
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2440
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2441
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2442
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2449
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2450
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2451
test "X$echo_testing_string" = "X$echo_test_string"; then
2454
# The Solaris, AIX, and Digital Unix default echo programs unquote
2455
# backslashes. This makes it impossible to quote backslashes using
2456
# echo "$something" | sed 's/\\/\\\\/g'
2458
# So, first we look for a working echo in the user's PATH.
2460
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2461
for dir in $PATH /usr/ucb; do
2463
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2464
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2465
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2466
test "X$echo_testing_string" = "X$echo_test_string"; then
2473
if test "X$ECHO" = Xecho; then
2474
# We didn't find a better echo, so look for alternatives.
2475
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2476
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2477
test "X$echo_testing_string" = "X$echo_test_string"; then
2478
# This shell has a builtin print -r that does the trick.
2480
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2481
test "X$CONFIG_SHELL" != X/bin/ksh; then
2482
# If we have ksh, try running configure again with it.
2483
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2484
export ORIGINAL_CONFIG_SHELL
2485
CONFIG_SHELL=/bin/ksh
2487
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2491
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2492
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2493
test "X$echo_testing_string" = "X$echo_test_string"; then
2494
# Cool, printf works
2496
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2497
test "X$echo_testing_string" = 'X\t' &&
2498
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2499
test "X$echo_testing_string" = "X$echo_test_string"; then
2500
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2502
SHELL="$CONFIG_SHELL"
2504
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2505
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2506
test "X$echo_testing_string" = 'X\t' &&
2507
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2508
test "X$echo_testing_string" = "X$echo_test_string"; then
2509
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2511
# maybe with a smaller string...
2514
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2515
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2522
if test "$prev" != 'sed 50q "[$]0"'; then
2523
echo_test_string=`eval $prev`
2524
export echo_test_string
2525
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2527
# Oops. We lost completely, so just stick with echo.
2536
# Copy echo and quote the copy suitably for passing to libtool from
2537
# the Makefile, instead of quoting the original, which is used later.
2539
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2540
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2557
2545
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2558
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2546
_LT_DECL([], [ECHO], [1],
2547
[An echo program that does not interpret backslashes])
2559
2548
])# _LT_PROG_ECHO_BACKSLASH
2564
AC_DEFUN([_LT_WITH_SYSROOT],
2565
[AC_MSG_CHECKING([for sysroot])
2566
AC_ARG_WITH([sysroot],
2567
[ --with-sysroot[=DIR] Search for dependent libraries within DIR
2568
(or the compiler's sysroot if not specified).],
2569
[], [with_sysroot=no])
2571
dnl lt_sysroot will always be passed unquoted. We quote it here
2572
dnl in case the user passed a directory name.
2574
case ${with_sysroot} in #(
2576
if test "$GCC" = yes; then
2577
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2581
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2586
AC_MSG_RESULT([${with_sysroot}])
2587
AC_MSG_ERROR([The sysroot must be an absolute path.])
2591
AC_MSG_RESULT([${lt_sysroot:-no}])
2592
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2593
[dependent libraries, and in which our libraries should be installed.])])
2595
2551
# _LT_ENABLE_LOCK
2596
2552
# ---------------
2597
2553
m4_defun([_LT_ENABLE_LOCK],
3703
3569
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
3704
3570
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3706
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3571
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3708
3573
mingw* | cegcc*)
3709
3574
# MinGW DLLs use traditional 'lib' prefix
3710
3575
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3576
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3577
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3578
# It is most probably a Windows format PATH printed by
3579
# mingw gcc, but we are running on Cygwin. Gcc prints its search
3580
# path with ; separators, and with drive letters. We can handle the
3581
# drive letters (cygwin fileutils understands them), so leave them,
3582
# especially as we might pass files found there to a mingw objdump,
3583
# which wouldn't understand a cygwinified path. Ahh.
3584
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3586
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3713
3590
# pw32 DLLs use 'pw' prefix rather than 'lib'
3714
3591
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3717
dynamic_linker='Win32 ld.exe'
3722
libname_spec='$name'
3723
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3724
library_names_spec='${libname}.dll.lib'
3728
sys_lib_search_path_spec=
3734
# Let DOS variable expansion print the short 8.3 style file name.
3735
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3736
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3739
# Convert to MSYS style.
3740
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3743
# Convert to unix form, then to dos form, then back to unix form
3744
# but this time dos style (no spaces!) so that the unix form looks
3745
# like /cygdrive/c/PROGRA~1:/cygdr...
3746
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3747
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3748
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3751
sys_lib_search_path_spec="$LIB"
3752
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3753
# It is most probably a Windows format PATH.
3754
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3756
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3758
# FIXME: find the short name or the path components, as spaces are
3759
# common. (e.g. "Program Files" -> "PROGRA~1")
3763
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3764
postinstall_cmds='base_file=`basename \${file}`~
3765
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3766
dldir=$destdir/`dirname \$dlpath`~
3767
test -d \$dldir || mkdir -p \$dldir~
3768
$install_prog $dir/$dlname \$dldir/$dlname'
3769
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3770
dlpath=$dir/\$dldll~
3772
shlibpath_overrides_runpath=yes
3773
dynamic_linker='Win32 link.exe'
3777
# Assume MSVC wrapper
3778
3597
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3779
dynamic_linker='Win32 ld.exe'
3600
dynamic_linker='Win32 ld.exe'
3782
3601
# FIXME: first we should search . and the directory the executable is in
3783
3602
shlibpath_var=PATH
4843
4588
dnl AC_DEFUN([AM_PROG_NM], [])
4844
4589
dnl AC_DEFUN([AC_PROG_NM], [])
4846
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4847
# --------------------------------
4848
# how to determine the name of the shared library
4849
# associated with a specific link library.
4850
# -- PORTME fill in with the dynamic library characteristics
4851
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4852
[m4_require([_LT_DECL_EGREP])
4853
m4_require([_LT_DECL_OBJDUMP])
4854
m4_require([_LT_DECL_DLLTOOL])
4855
AC_CACHE_CHECK([how to associate runtime and link libraries],
4856
lt_cv_sharedlib_from_linklib_cmd,
4857
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4860
cygwin* | mingw* | pw32* | cegcc*)
4861
# two different shell functions defined in ltmain.sh
4862
# decide which to use based on capabilities of $DLLTOOL
4863
case `$DLLTOOL --help 2>&1` in
4864
*--identify-strict*)
4865
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4868
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4873
# fallback: assume linklib IS sharedlib
4874
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4878
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4879
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4881
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4882
[Command to associate shared and link libraries])
4883
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4886
# _LT_PATH_MANIFEST_TOOL
4887
# ----------------------
4888
# locate the manifest tool
4889
m4_defun([_LT_PATH_MANIFEST_TOOL],
4890
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4891
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4892
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4893
[lt_cv_path_mainfest_tool=no
4894
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4895
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4896
cat conftest.err >&AS_MESSAGE_LOG_FD
4897
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4898
lt_cv_path_mainfest_tool=yes
4901
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4904
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4905
])# _LT_PATH_MANIFEST_TOOL
5726
5350
# All Alpha code is PIC.
5727
5351
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5729
xl* | bgxl* | bgf* | mpixl*)
5730
# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5354
# IBM XL C 8.0/Fortran 10.1 on PPC
5731
5355
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5732
5356
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5733
5357
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5736
5360
case `$CC -V 2>&1 | sed 5q` in
5737
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5363
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5364
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5365
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5738
5368
# Sun Fortran 8.3 passes all unrecognized flags to the linker
5739
5369
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5740
5370
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5741
5371
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5743
*Sun\ F* | *Sun*Fortran*)
5744
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5745
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5746
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5750
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5751
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5752
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5754
*Intel*\ [[CF]]*Compiler*)
5755
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5756
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5757
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5760
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5761
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5762
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6476
6018
# Microsoft Visual C++.
6477
6019
# hardcode_libdir_flag_spec is actually meaningless, as there is
6478
6020
# no search path for DLLs.
6479
case $cc_basename in
6482
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6483
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6484
_LT_TAGVAR(always_export_symbols, $1)=yes
6485
_LT_TAGVAR(file_list_spec, $1)='@'
6486
# Tell ltmain to make .lib files, not .a files.
6488
# Tell ltmain to make .dll files, not .so files.
6490
# FIXME: Setting linknames here is a bad hack.
6491
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6492
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6493
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6495
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6497
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6499
# The linker will not automatically build a static lib if we build a DLL.
6500
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6501
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6502
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6503
_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'
6505
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6506
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6507
lt_tool_outputfile="@TOOL_OUTPUT@"~
6508
case $lt_outputfile in
6511
lt_outputfile="$lt_outputfile.exe"
6512
lt_tool_outputfile="$lt_tool_outputfile.exe"
6515
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6516
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6517
$RM "$lt_outputfile.manifest";
6521
# Assume MSVC wrapper
6522
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6523
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6524
# Tell ltmain to make .lib files, not .a files.
6526
# Tell ltmain to make .dll files, not .so files.
6528
# FIXME: Setting linknames here is a bad hack.
6529
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6530
# The linker will automatically build a .lib file if we build a DLL.
6531
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6532
# FIXME: Should let the user specify the lib program.
6533
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6534
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6021
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6022
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6023
# Tell ltmain to make .lib files, not .a files.
6025
# Tell ltmain to make .dll files, not .so files.
6027
# FIXME: Setting linknames here is a bad hack.
6028
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6029
# The linker will automatically build a .lib file if we build a DLL.
6030
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6031
# FIXME: Should let the user specify the lib program.
6032
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6033
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6034
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6539
6037
darwin* | rhapsody*)
6665
6161
irix5* | irix6* | nonstopux*)
6666
6162
if test "$GCC" = yes; then
6667
_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'
6163
_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'
6668
6164
# Try to use the -exported_symbol ld option, if it does not
6669
6165
# work, assume that -exports_file does not work either and
6670
6166
# implicitly export all symbols.
6671
# This should be the same for all languages, so no per-tag cache variable.
6672
AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6673
[lt_cv_irix_exported_symbol],
6674
[save_LDFLAGS="$LDFLAGS"
6675
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6678
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6679
[C++], [[int foo (void) { return 0; }]],
6686
[lt_cv_irix_exported_symbol=yes],
6687
[lt_cv_irix_exported_symbol=no])
6688
LDFLAGS="$save_LDFLAGS"])
6689
if test "$lt_cv_irix_exported_symbol" = yes; then
6690
_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'
6167
save_LDFLAGS="$LDFLAGS"
6168
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6171
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6172
[C++], [[int foo (void) { return 0; }]],
6179
_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'
6181
LDFLAGS="$save_LDFLAGS"
6693
_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'
6694
_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'
6183
_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'
6184
_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'
6696
6186
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6697
6187
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6970
6460
# Test whether the compiler implicitly links with -lc since on some
6971
6461
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6972
6462
# to ld, don't add -lc before -lgcc.
6973
AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6974
[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6976
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6463
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6465
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6978
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6981
libobjs=conftest.$ac_objext
6983
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6984
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6990
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6991
_LT_TAGVAR(allow_undefined_flag, $1)=
6992
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6994
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6996
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6998
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7000
cat conftest.err 1>&5
7004
_LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6467
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6470
libobjs=conftest.$ac_objext
6472
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6473
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6479
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6480
_LT_TAGVAR(allow_undefined_flag, $1)=
6481
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6483
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6485
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6487
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6489
cat conftest.err 1>&5
6492
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7471
6969
cygwin* | mingw* | pw32* | cegcc*)
7472
case $GXX,$cc_basename in
7475
# hardcode_libdir_flag_spec is actually meaningless, as there is
7476
# no search path for DLLs.
7477
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7478
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7479
_LT_TAGVAR(always_export_symbols, $1)=yes
7480
_LT_TAGVAR(file_list_spec, $1)='@'
7481
# Tell ltmain to make .lib files, not .a files.
7483
# Tell ltmain to make .dll files, not .so files.
7485
# FIXME: Setting linknames here is a bad hack.
7486
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7487
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7488
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7490
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7492
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7494
# The linker will not automatically build a static lib if we build a DLL.
7495
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7496
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7498
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7499
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7500
lt_tool_outputfile="@TOOL_OUTPUT@"~
7501
case $lt_outputfile in
7504
lt_outputfile="$lt_outputfile.exe"
7505
lt_tool_outputfile="$lt_tool_outputfile.exe"
7508
func_to_tool_file "$lt_outputfile"~
7509
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7510
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7511
$RM "$lt_outputfile.manifest";
7516
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7517
# as there is no search path for DLLs.
7518
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7519
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7520
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7521
_LT_TAGVAR(always_export_symbols, $1)=no
7522
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6970
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6971
# as there is no search path for DLLs.
6972
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6973
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6974
_LT_TAGVAR(always_export_symbols, $1)=no
6975
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7524
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7525
_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'
7526
# If the export-symbols file already is a .def file (1st line
7527
# is EXPORTS), use it as is; otherwise, prepend...
7528
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7529
cp $export_symbols $output_objdir/$soname.def;
7531
echo EXPORTS > $output_objdir/$soname.def;
7532
cat $export_symbols >> $output_objdir/$soname.def;
7534
$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'
7536
_LT_TAGVAR(ld_shlibs, $1)=no
6977
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6978
_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'
6979
# If the export-symbols file already is a .def file (1st line
6980
# is EXPORTS), use it as is; otherwise, prepend...
6981
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6982
cp $export_symbols $output_objdir/$soname.def;
6984
echo EXPORTS > $output_objdir/$soname.def;
6985
cat $export_symbols >> $output_objdir/$soname.def;
6987
$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'
6989
_LT_TAGVAR(ld_shlibs, $1)=no
7541
6992
darwin* | rhapsody*)
7542
6993
_LT_DARWIN_LINKER_FEATURES($1)
9165
8489
])# _LT_CHECK_SHELL_FEATURES
9168
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9169
# ------------------------------------------------------
9170
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9171
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9172
m4_defun([_LT_PROG_FUNCTION_REPLACE],
9174
sed -e '/^$1 ()$/,/^} # $1 /c\
9177
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
9178
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9179
&& mv -f "$cfgfile.tmp" "$cfgfile" \
9180
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9181
test 0 -eq $? || _lt_function_replace_fail=:
9185
# _LT_PROG_REPLACE_SHELLFNS
9186
# -------------------------
9187
# Replace existing portable implementations of several shell functions with
9188
# equivalent extended shell implementations where those features are available..
9189
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9190
[if test x"$xsi_shell" = xyes; then
9191
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9193
*/*) func_dirname_result="${1%/*}${2}" ;;
9194
* ) func_dirname_result="${3}" ;;
9197
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9198
func_basename_result="${1##*/}"])
9200
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9202
*/*) func_dirname_result="${1%/*}${2}" ;;
9203
* ) func_dirname_result="${3}" ;;
9205
func_basename_result="${1##*/}"])
9207
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9208
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9209
# positional parameters, so assign one to ordinary parameter first.
9210
func_stripname_result=${3}
9211
func_stripname_result=${func_stripname_result#"${1}"}
9212
func_stripname_result=${func_stripname_result%"${2}"}])
9214
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9215
func_split_long_opt_name=${1%%=*}
9216
func_split_long_opt_arg=${1#*=}])
9218
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9219
func_split_short_opt_arg=${1#??}
9220
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9222
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9224
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9225
*) func_lo2o_result=${1} ;;
9228
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
9230
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
9232
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
9235
if test x"$lt_shell_append" = xyes; then
9236
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
9238
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9239
func_quote_for_eval "${2}"
9240
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9241
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9243
# Save a `func_append' function call where possible by direct use of '+='
9244
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9245
&& mv -f "$cfgfile.tmp" "$cfgfile" \
9246
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9247
test 0 -eq $? || _lt_function_replace_fail=:
9249
# Save a `func_append' function call even when '+=' is not available
9250
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9251
&& mv -f "$cfgfile.tmp" "$cfgfile" \
9252
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9253
test 0 -eq $? || _lt_function_replace_fail=:
9256
if test x"$_lt_function_replace_fail" = x":"; then
9257
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9261
# _LT_PATH_CONVERSION_FUNCTIONS
9262
# -----------------------------
9263
# Determine which file name conversion functions should be used by
9264
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
9265
# for certain cross-compile configurations and native mingw.
9266
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9267
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9268
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9269
AC_MSG_CHECKING([how to convert $build file names to $host format])
9270
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9274
*-*-mingw* ) # actually msys
9275
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9278
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9280
* ) # otherwise, assume *nix
9281
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9287
*-*-mingw* ) # actually msys
9288
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9291
lt_cv_to_host_file_cmd=func_convert_file_noop
9293
* ) # otherwise, assume *nix
9294
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9298
* ) # unhandled hosts (and "normal" native builds)
9299
lt_cv_to_host_file_cmd=func_convert_file_noop
9303
to_host_file_cmd=$lt_cv_to_host_file_cmd
9304
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9305
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9306
[0], [convert $build file names to $host format])dnl
9308
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9309
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9310
[#assume ordinary cross tools, or native build.
9311
lt_cv_to_tool_file_cmd=func_convert_file_noop
9315
*-*-mingw* ) # actually msys
9316
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9322
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9323
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9324
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9325
[0], [convert $build files to toolchain format])dnl
9326
])# _LT_PATH_CONVERSION_FUNCTIONS
8492
# _LT_PROG_XSI_SHELLFNS
8493
# ---------------------
8494
# Bourne and XSI compatible variants of some useful shell functions.
8495
m4_defun([_LT_PROG_XSI_SHELLFNS],
8498
cat << \_LT_EOF >> "$cfgfile"
8500
# func_dirname file append nondir_replacement
8501
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8502
# otherwise set result to NONDIR_REPLACEMENT.
8506
*/*) func_dirname_result="${1%/*}${2}" ;;
8507
* ) func_dirname_result="${3}" ;;
8511
# func_basename file
8514
func_basename_result="${1##*/}"
8517
# func_dirname_and_basename file append nondir_replacement
8518
# perform func_basename and func_dirname in a single function
8520
# dirname: Compute the dirname of FILE. If nonempty,
8521
# add APPEND to the result, otherwise set result
8522
# to NONDIR_REPLACEMENT.
8523
# value returned in "$func_dirname_result"
8524
# basename: Compute filename of FILE.
8525
# value retuned in "$func_basename_result"
8526
# Implementation must be kept synchronized with func_dirname
8527
# and func_basename. For efficiency, we do not delegate to
8528
# those functions but instead duplicate the functionality here.
8529
func_dirname_and_basename ()
8532
*/*) func_dirname_result="${1%/*}${2}" ;;
8533
* ) func_dirname_result="${3}" ;;
8535
func_basename_result="${1##*/}"
8538
# func_stripname prefix suffix name
8539
# strip PREFIX and SUFFIX off of NAME.
8540
# PREFIX and SUFFIX must not contain globbing or regex special
8541
# characters, hashes, percent signs, but SUFFIX may contain a leading
8542
# dot (in which case that matches only a dot).
8545
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8546
# positional parameters, so assign one to ordinary parameter first.
8547
func_stripname_result=${3}
8548
func_stripname_result=${func_stripname_result#"${1}"}
8549
func_stripname_result=${func_stripname_result%"${2}"}
8555
func_opt_split_opt=${1%%=*}
8556
func_opt_split_arg=${1#*=}
8563
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8564
*) func_lo2o_result=${1} ;;
8568
# func_xform libobj-or-source
8571
func_xform_result=${1%.*}.lo
8574
# func_arith arithmetic-term...
8577
func_arith_result=$(( $[*] ))
8581
# STRING may not start with a hyphen.
8584
func_len_result=${#1}
8589
*) # Bourne compatible functions.
8590
cat << \_LT_EOF >> "$cfgfile"
8592
# func_dirname file append nondir_replacement
8593
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8594
# otherwise set result to NONDIR_REPLACEMENT.
8597
# Extract subdirectory from the argument.
8598
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8599
if test "X$func_dirname_result" = "X${1}"; then
8600
func_dirname_result="${3}"
8602
func_dirname_result="$func_dirname_result${2}"
8606
# func_basename file
8609
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8612
dnl func_dirname_and_basename
8613
dnl A portable version of this function is already defined in general.m4sh
8614
dnl so there is no need for it here.
8616
# func_stripname prefix suffix name
8617
# strip PREFIX and SUFFIX off of NAME.
8618
# PREFIX and SUFFIX must not contain globbing or regex special
8619
# characters, hashes, percent signs, but SUFFIX may contain a leading
8620
# dot (in which case that matches only a dot).
8621
# func_strip_suffix prefix name
8625
.*) func_stripname_result=`$ECHO "X${3}" \
8626
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8627
*) func_stripname_result=`$ECHO "X${3}" \
8628
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8633
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8634
my_sed_long_arg='1s/^-[[^=]]*=//'
8639
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8640
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8646
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8649
# func_xform libobj-or-source
8652
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8655
# func_arith arithmetic-term...
8658
func_arith_result=`expr "$[@]"`
8662
# STRING may not start with a hyphen.
8665
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8671
case $lt_shell_append in
8673
cat << \_LT_EOF >> "$cfgfile"
8675
# func_append var value
8676
# Append VALUE to the end of shell variable VAR.
8684
cat << \_LT_EOF >> "$cfgfile"
8686
# func_append var value
8687
# Append VALUE to the end of shell variable VAR.
8690
eval "$[1]=\$$[1]\$[2]"
9328
8698
# Helper functions for option handling. -*- Autoconf -*-
9330
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8700
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9332
8701
# Written by Gary V. Vaughan, 2004
9334
8703
# This file is free software; the Free Software Foundation gives
9335
8704
# unlimited permission to copy and/or distribute it, with or without
9336
8705
# modifications, as long as this notice is preserved.
9338
# serial 7 ltoptions.m4
8707
# serial 6 ltoptions.m4
9340
8709
# This is to help aclocal find these macros, as it can't see m4_define.
9341
8710
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])