2124
# _LT_SYS_MODULE_PATH_AIX
2125
# -----------------------
2113
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2114
# ----------------------------------
2126
2115
# Links a minimal program and checks the executable
2127
2116
# for the system default hardcoded library path. In most cases,
2128
2117
# this is /usr/lib:/lib, but when the MPI compilers are used
2129
2118
# the location of the communication and MPI libs are included too.
2130
2119
# If we don't find anything, use the default library path according
2131
2120
# to the aix ld manual.
2121
# Store the results from the different compilers for each TAGNAME.
2122
# Allow to override them for all tags through lt_cv_aix_libpath.
2132
2123
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2133
2124
[m4_require([_LT_DECL_SED])dnl
2134
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2135
lt_aix_libpath_sed='
2136
/Import File Strings/,/^$/ {
2142
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2143
# Check for a 64-bit object if we didn't find anything.
2144
if test -z "$aix_libpath"; then
2145
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2147
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2125
if test "${lt_cv_aix_libpath+set}" = set; then
2126
aix_libpath=$lt_cv_aix_libpath
2128
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2129
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2130
lt_aix_libpath_sed='[
2131
/Import File Strings/,/^$/ {
2133
s/^0 *\([^ ]*\) *$/\1/
2137
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2138
# Check for a 64-bit object if we didn't find anything.
2139
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2140
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2142
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2143
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2146
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2148
2148
])# _LT_SYS_MODULE_PATH_AIX
3283
3350
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3353
dynamic_linker='Win32 ld.exe'
3358
libname_spec='$name'
3359
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3360
library_names_spec='${libname}.dll.lib'
3364
sys_lib_search_path_spec=
3370
# Let DOS variable expansion print the short 8.3 style file name.
3371
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3372
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3375
# Convert to MSYS style.
3376
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3379
# Convert to unix form, then to dos form, then back to unix form
3380
# but this time dos style (no spaces!) so that the unix form looks
3381
# like /cygdrive/c/PROGRA~1:/cygdr...
3382
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3383
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3384
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3387
sys_lib_search_path_spec="$LIB"
3388
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3389
# It is most probably a Windows format PATH.
3390
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3392
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3394
# FIXME: find the short name or the path components, as spaces are
3395
# common. (e.g. "Program Files" -> "PROGRA~1")
3399
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3400
postinstall_cmds='base_file=`basename \${file}`~
3401
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3402
dldir=$destdir/`dirname \$dlpath`~
3403
test -d \$dldir || mkdir -p \$dldir~
3404
$install_prog $dir/$dlname \$dldir/$dlname'
3405
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3406
dlpath=$dir/\$dldll~
3408
shlibpath_overrides_runpath=yes
3409
dynamic_linker='Win32 link.exe'
3413
# Assume MSVC wrapper
3289
3414
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3415
dynamic_linker='Win32 ld.exe'
3292
dynamic_linker='Win32 ld.exe'
3293
3418
# FIXME: first we should search . and the directory the executable is in
3294
3419
shlibpath_var=PATH
4325
4470
dnl AC_DEFUN([AM_PROG_NM], [])
4326
4471
dnl AC_DEFUN([AC_PROG_NM], [])
4473
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4474
# --------------------------------
4475
# how to determine the name of the shared library
4476
# associated with a specific link library.
4477
# -- PORTME fill in with the dynamic library characteristics
4478
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4479
[m4_require([_LT_DECL_EGREP])
4480
m4_require([_LT_DECL_OBJDUMP])
4481
m4_require([_LT_DECL_DLLTOOL])
4482
AC_CACHE_CHECK([how to associate runtime and link libraries],
4483
lt_cv_sharedlib_from_linklib_cmd,
4484
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4487
cygwin* | mingw* | pw32* | cegcc*)
4488
# two different shell functions defined in ltmain.sh
4489
# decide which to use based on capabilities of $DLLTOOL
4490
case `$DLLTOOL --help 2>&1` in
4491
*--identify-strict*)
4492
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4495
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4500
# fallback: assume linklib IS sharedlib
4501
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4505
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4506
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4508
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4509
[Command to associate shared and link libraries])
4510
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4513
# _LT_PATH_MANIFEST_TOOL
4514
# ----------------------
4515
# locate the manifest tool
4516
m4_defun([_LT_PATH_MANIFEST_TOOL],
4517
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4518
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4519
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4520
[lt_cv_path_mainfest_tool=no
4521
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4522
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4523
cat conftest.err >&AS_MESSAGE_LOG_FD
4524
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4525
lt_cv_path_mainfest_tool=yes
4528
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4531
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4532
])# _LT_PATH_MANIFEST_TOOL
5827
6078
# Microsoft Visual C++.
5828
6079
# hardcode_libdir_flag_spec is actually meaningless, as there is
5829
6080
# no search path for DLLs.
5830
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5831
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5832
# Tell ltmain to make .lib files, not .a files.
5834
# Tell ltmain to make .dll files, not .so files.
5836
# FIXME: Setting linknames here is a bad hack.
5837
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5838
# The linker will automatically build a .lib file if we build a DLL.
5839
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5840
# FIXME: Should let the user specify the lib program.
5841
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5842
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5843
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6081
case $cc_basename in
6084
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6085
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6086
_LT_TAGVAR(always_export_symbols, $1)=yes
6087
_LT_TAGVAR(file_list_spec, $1)='@'
6088
# Tell ltmain to make .lib files, not .a files.
6090
# Tell ltmain to make .dll files, not .so files.
6092
# FIXME: Setting linknames here is a bad hack.
6093
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6094
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6095
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6097
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6099
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6101
# The linker will not automatically build a static lib if we build a DLL.
6102
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6103
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6104
_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'
6106
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6107
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6108
lt_tool_outputfile="@TOOL_OUTPUT@"~
6109
case $lt_outputfile in
6112
lt_outputfile="$lt_outputfile.exe"
6113
lt_tool_outputfile="$lt_tool_outputfile.exe"
6116
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6117
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6118
$RM "$lt_outputfile.manifest";
6122
# Assume MSVC wrapper
6123
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6124
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6125
# Tell ltmain to make .lib files, not .a files.
6127
# Tell ltmain to make .dll files, not .so files.
6129
# FIXME: Setting linknames here is a bad hack.
6130
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6131
# The linker will automatically build a .lib file if we build a DLL.
6132
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6133
# FIXME: Should let the user specify the lib program.
6134
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6135
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5846
6140
darwin* | rhapsody*)
6769
7081
cygwin* | mingw* | pw32* | cegcc*)
6770
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6771
# as there is no search path for DLLs.
6772
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6773
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6774
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6775
_LT_TAGVAR(always_export_symbols, $1)=no
6776
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7082
case $GXX,$cc_basename in
7085
# hardcode_libdir_flag_spec is actually meaningless, as there is
7086
# no search path for DLLs.
7087
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7088
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7089
_LT_TAGVAR(always_export_symbols, $1)=yes
7090
_LT_TAGVAR(file_list_spec, $1)='@'
7091
# Tell ltmain to make .lib files, not .a files.
7093
# Tell ltmain to make .dll files, not .so files.
7095
# FIXME: Setting linknames here is a bad hack.
7096
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7097
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7098
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7100
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7102
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7104
# The linker will not automatically build a static lib if we build a DLL.
7105
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7106
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7108
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7109
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7110
lt_tool_outputfile="@TOOL_OUTPUT@"~
7111
case $lt_outputfile in
7114
lt_outputfile="$lt_outputfile.exe"
7115
lt_tool_outputfile="$lt_tool_outputfile.exe"
7118
func_to_tool_file "$lt_outputfile"~
7119
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7120
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7121
$RM "$lt_outputfile.manifest";
7126
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7127
# as there is no search path for DLLs.
7128
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7129
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7130
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7131
_LT_TAGVAR(always_export_symbols, $1)=no
7132
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6778
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6779
_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'
6780
# If the export-symbols file already is a .def file (1st line
6781
# is EXPORTS), use it as is; otherwise, prepend...
6782
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6783
cp $export_symbols $output_objdir/$soname.def;
6785
echo EXPORTS > $output_objdir/$soname.def;
6786
cat $export_symbols >> $output_objdir/$soname.def;
6788
$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'
6790
_LT_TAGVAR(ld_shlibs, $1)=no
7134
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7135
_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'
7136
# If the export-symbols file already is a .def file (1st line
7137
# is EXPORTS), use it as is; otherwise, prepend...
7138
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7139
cp $export_symbols $output_objdir/$soname.def;
7141
echo EXPORTS > $output_objdir/$soname.def;
7142
cat $export_symbols >> $output_objdir/$soname.def;
7144
$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'
7146
_LT_TAGVAR(ld_shlibs, $1)=no
6793
7151
darwin* | rhapsody*)
6794
7152
_LT_DARWIN_LINKER_FEATURES($1)
8274
8697
])# _LT_CHECK_SHELL_FEATURES
8277
# _LT_PROG_XSI_SHELLFNS
8278
# ---------------------
8279
# Bourne and XSI compatible variants of some useful shell functions.
8280
m4_defun([_LT_PROG_XSI_SHELLFNS],
8283
cat << \_LT_EOF >> "$cfgfile"
8285
# func_dirname file append nondir_replacement
8286
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8287
# otherwise set result to NONDIR_REPLACEMENT.
8291
*/*) func_dirname_result="${1%/*}${2}" ;;
8292
* ) func_dirname_result="${3}" ;;
8296
# func_basename file
8299
func_basename_result="${1##*/}"
8302
# func_dirname_and_basename file append nondir_replacement
8303
# perform func_basename and func_dirname in a single function
8305
# dirname: Compute the dirname of FILE. If nonempty,
8306
# add APPEND to the result, otherwise set result
8307
# to NONDIR_REPLACEMENT.
8308
# value returned in "$func_dirname_result"
8309
# basename: Compute filename of FILE.
8310
# value retuned in "$func_basename_result"
8311
# Implementation must be kept synchronized with func_dirname
8312
# and func_basename. For efficiency, we do not delegate to
8313
# those functions but instead duplicate the functionality here.
8314
func_dirname_and_basename ()
8317
*/*) func_dirname_result="${1%/*}${2}" ;;
8318
* ) func_dirname_result="${3}" ;;
8320
func_basename_result="${1##*/}"
8323
# func_stripname prefix suffix name
8324
# strip PREFIX and SUFFIX off of NAME.
8325
# PREFIX and SUFFIX must not contain globbing or regex special
8326
# characters, hashes, percent signs, but SUFFIX may contain a leading
8327
# dot (in which case that matches only a dot).
8330
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8331
# positional parameters, so assign one to ordinary parameter first.
8332
func_stripname_result=${3}
8333
func_stripname_result=${func_stripname_result#"${1}"}
8334
func_stripname_result=${func_stripname_result%"${2}"}
8340
func_opt_split_opt=${1%%=*}
8341
func_opt_split_arg=${1#*=}
8348
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8349
*) func_lo2o_result=${1} ;;
8353
# func_xform libobj-or-source
8356
func_xform_result=${1%.*}.lo
8359
# func_arith arithmetic-term...
8362
func_arith_result=$(( $[*] ))
8366
# STRING may not start with a hyphen.
8369
func_len_result=${#1}
8374
*) # Bourne compatible functions.
8375
cat << \_LT_EOF >> "$cfgfile"
8377
# func_dirname file append nondir_replacement
8378
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8379
# otherwise set result to NONDIR_REPLACEMENT.
8382
# Extract subdirectory from the argument.
8383
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8384
if test "X$func_dirname_result" = "X${1}"; then
8385
func_dirname_result="${3}"
8387
func_dirname_result="$func_dirname_result${2}"
8391
# func_basename file
8394
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8397
dnl func_dirname_and_basename
8398
dnl A portable version of this function is already defined in general.m4sh
8399
dnl so there is no need for it here.
8401
# func_stripname prefix suffix name
8402
# strip PREFIX and SUFFIX off of NAME.
8403
# PREFIX and SUFFIX must not contain globbing or regex special
8404
# characters, hashes, percent signs, but SUFFIX may contain a leading
8405
# dot (in which case that matches only a dot).
8406
# func_strip_suffix prefix name
8410
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8411
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8416
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8417
my_sed_long_arg='1s/^-[[^=]]*=//'
8422
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8423
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8429
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8432
# func_xform libobj-or-source
8435
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8438
# func_arith arithmetic-term...
8441
func_arith_result=`expr "$[@]"`
8445
# STRING may not start with a hyphen.
8448
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8454
case $lt_shell_append in
8456
cat << \_LT_EOF >> "$cfgfile"
8458
# func_append var value
8459
# Append VALUE to the end of shell variable VAR.
8467
cat << \_LT_EOF >> "$cfgfile"
8469
# func_append var value
8470
# Append VALUE to the end of shell variable VAR.
8473
eval "$[1]=\$$[1]\$[2]"
8700
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8701
# ------------------------------------------------------
8702
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8703
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8704
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8706
sed -e '/^$1 ()$/,/^} # $1 /c\
8709
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8710
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8711
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8712
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8713
test 0 -eq $? || _lt_function_replace_fail=:
8717
# _LT_PROG_REPLACE_SHELLFNS
8718
# -------------------------
8719
# Replace existing portable implementations of several shell functions with
8720
# equivalent extended shell implementations where those features are available..
8721
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8722
[if test x"$xsi_shell" = xyes; then
8723
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8725
*/*) func_dirname_result="${1%/*}${2}" ;;
8726
* ) func_dirname_result="${3}" ;;
8729
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8730
func_basename_result="${1##*/}"])
8732
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8734
*/*) func_dirname_result="${1%/*}${2}" ;;
8735
* ) func_dirname_result="${3}" ;;
8737
func_basename_result="${1##*/}"])
8739
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8740
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8741
# positional parameters, so assign one to ordinary parameter first.
8742
func_stripname_result=${3}
8743
func_stripname_result=${func_stripname_result#"${1}"}
8744
func_stripname_result=${func_stripname_result%"${2}"}])
8746
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8747
func_split_long_opt_name=${1%%=*}
8748
func_split_long_opt_arg=${1#*=}])
8750
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8751
func_split_short_opt_arg=${1#??}
8752
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8754
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8756
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8757
*) func_lo2o_result=${1} ;;
8760
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8762
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8764
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8767
if test x"$lt_shell_append" = xyes; then
8768
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8770
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8771
func_quote_for_eval "${2}"
8772
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8773
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8775
# Save a `func_append' function call where possible by direct use of '+='
8776
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8777
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8778
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8779
test 0 -eq $? || _lt_function_replace_fail=:
8781
# Save a `func_append' function call even when '+=' is not available
8782
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8783
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8784
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8785
test 0 -eq $? || _lt_function_replace_fail=:
8788
if test x"$_lt_function_replace_fail" = x":"; then
8789
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8793
# _LT_PATH_CONVERSION_FUNCTIONS
8794
# -----------------------------
8795
# Determine which file name conversion functions should be used by
8796
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8797
# for certain cross-compile configurations and native mingw.
8798
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8799
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8800
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8801
AC_MSG_CHECKING([how to convert $build file names to $host format])
8802
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8806
*-*-mingw* ) # actually msys
8807
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8810
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8812
* ) # otherwise, assume *nix
8813
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8819
*-*-mingw* ) # actually msys
8820
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8823
lt_cv_to_host_file_cmd=func_convert_file_noop
8825
* ) # otherwise, assume *nix
8826
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8830
* ) # unhandled hosts (and "normal" native builds)
8831
lt_cv_to_host_file_cmd=func_convert_file_noop
8835
to_host_file_cmd=$lt_cv_to_host_file_cmd
8836
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8837
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8838
[0], [convert $build file names to $host format])dnl
8840
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8841
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8842
[#assume ordinary cross tools, or native build.
8843
lt_cv_to_tool_file_cmd=func_convert_file_noop
8847
*-*-mingw* ) # actually msys
8848
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8854
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8855
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8856
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8857
[0], [convert $build files to toolchain format])dnl
8858
])# _LT_PATH_CONVERSION_FUNCTIONS
8481
8860
# Helper functions for option handling. -*- Autoconf -*-