1076
# _LT_SYS_MODULE_PATH_AIX
1077
# -----------------------
1076
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1077
# ----------------------------------
1078
1078
# Links a minimal program and checks the executable
1079
1079
# for the system default hardcoded library path. In most cases,
1080
1080
# this is /usr/lib:/lib, but when the MPI compilers are used
1081
1081
# the location of the communication and MPI libs are included too.
1082
1082
# If we don't find anything, use the default library path according
1083
1083
# to the aix ld manual.
1084
# Store the results from the different compilers for each TAGNAME.
1085
# Allow to override them for all tags through lt_cv_aix_libpath.
1084
1086
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1085
1087
[m4_require([_LT_DECL_SED])dnl
1086
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1087
lt_aix_libpath_sed='
1088
/Import File Strings/,/^$/ {
1094
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1095
# Check for a 64-bit object if we didn't find anything.
1096
if test -z "$aix_libpath"; then
1097
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1099
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1088
if test "${lt_cv_aix_libpath+set}" = set; then
1089
aix_libpath=$lt_cv_aix_libpath
1091
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1092
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1093
lt_aix_libpath_sed='[
1094
/Import File Strings/,/^$/ {
1096
s/^0 *\([^ ]*\) *$/\1/
1100
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1101
# Check for a 64-bit object if we didn't find anything.
1102
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1103
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1105
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1106
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1109
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1100
1111
])# _LT_SYS_MODULE_PATH_AIX
2235
2313
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2316
dynamic_linker='Win32 ld.exe'
2321
libname_spec='$name'
2322
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2323
library_names_spec='${libname}.dll.lib'
2327
sys_lib_search_path_spec=
2333
# Let DOS variable expansion print the short 8.3 style file name.
2334
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2335
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2338
# Convert to MSYS style.
2339
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2342
# Convert to unix form, then to dos form, then back to unix form
2343
# but this time dos style (no spaces!) so that the unix form looks
2344
# like /cygdrive/c/PROGRA~1:/cygdr...
2345
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2346
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2347
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2350
sys_lib_search_path_spec="$LIB"
2351
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2352
# It is most probably a Windows format PATH.
2353
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2355
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2357
# FIXME: find the short name or the path components, as spaces are
2358
# common. (e.g. "Program Files" -> "PROGRA~1")
2362
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2363
postinstall_cmds='base_file=`basename \${file}`~
2364
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2365
dldir=$destdir/`dirname \$dlpath`~
2366
test -d \$dldir || mkdir -p \$dldir~
2367
$install_prog $dir/$dlname \$dldir/$dlname'
2368
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2369
dlpath=$dir/\$dldll~
2371
shlibpath_overrides_runpath=yes
2372
dynamic_linker='Win32 link.exe'
2376
# Assume MSVC wrapper
2241
2377
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2378
dynamic_linker='Win32 ld.exe'
2244
dynamic_linker='Win32 ld.exe'
2245
2381
# FIXME: first we should search . and the directory the executable is in
2246
2382
shlibpath_var=PATH
3277
3437
dnl AC_DEFUN([AM_PROG_NM], [])
3278
3438
dnl AC_DEFUN([AC_PROG_NM], [])
3440
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3441
# --------------------------------
3442
# how to determine the name of the shared library
3443
# associated with a specific link library.
3444
# -- PORTME fill in with the dynamic library characteristics
3445
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3446
[m4_require([_LT_DECL_EGREP])
3447
m4_require([_LT_DECL_OBJDUMP])
3448
m4_require([_LT_DECL_DLLTOOL])
3449
AC_CACHE_CHECK([how to associate runtime and link libraries],
3450
lt_cv_sharedlib_from_linklib_cmd,
3451
[lt_cv_sharedlib_from_linklib_cmd='unknown'
3454
cygwin* | mingw* | pw32* | cegcc*)
3455
# two different shell functions defined in ltmain.sh
3456
# decide which to use based on capabilities of $DLLTOOL
3457
case `$DLLTOOL --help 2>&1` in
3458
*--identify-strict*)
3459
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3462
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3467
# fallback: assume linklib IS sharedlib
3468
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3472
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3473
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3475
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3476
[Command to associate shared and link libraries])
3477
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3480
# _LT_PATH_MANIFEST_TOOL
3481
# ----------------------
3482
# locate the manifest tool
3483
m4_defun([_LT_PATH_MANIFEST_TOOL],
3484
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3485
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3486
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3487
[lt_cv_path_mainfest_tool=no
3488
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3489
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3490
cat conftest.err >&AS_MESSAGE_LOG_FD
3491
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3492
lt_cv_path_mainfest_tool=yes
3495
if test "x$lt_cv_path_mainfest_tool" != xyes; then
3498
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3499
])# _LT_PATH_MANIFEST_TOOL
4779
5045
# Microsoft Visual C++.
4780
5046
# hardcode_libdir_flag_spec is actually meaningless, as there is
4781
5047
# no search path for DLLs.
4782
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4783
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4784
# Tell ltmain to make .lib files, not .a files.
4786
# Tell ltmain to make .dll files, not .so files.
4788
# FIXME: Setting linknames here is a bad hack.
4789
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
4790
# The linker will automatically build a .lib file if we build a DLL.
4791
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4792
# FIXME: Should let the user specify the lib program.
4793
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4794
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4795
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5048
case $cc_basename in
5051
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5052
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5053
_LT_TAGVAR(always_export_symbols, $1)=yes
5054
_LT_TAGVAR(file_list_spec, $1)='@'
5055
# Tell ltmain to make .lib files, not .a files.
5057
# Tell ltmain to make .dll files, not .so files.
5059
# FIXME: Setting linknames here is a bad hack.
5060
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5061
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5062
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5064
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5066
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5068
# The linker will not automatically build a static lib if we build a DLL.
5069
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5070
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5071
_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'
5073
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5074
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5075
lt_tool_outputfile="@TOOL_OUTPUT@"~
5076
case $lt_outputfile in
5079
lt_outputfile="$lt_outputfile.exe"
5080
lt_tool_outputfile="$lt_tool_outputfile.exe"
5083
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5084
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5085
$RM "$lt_outputfile.manifest";
5089
# Assume MSVC wrapper
5090
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5091
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5092
# Tell ltmain to make .lib files, not .a files.
5094
# Tell ltmain to make .dll files, not .so files.
5096
# FIXME: Setting linknames here is a bad hack.
5097
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5098
# The linker will automatically build a .lib file if we build a DLL.
5099
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5100
# FIXME: Should let the user specify the lib program.
5101
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5102
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4798
5107
darwin* | rhapsody*)
5725
6052
cygwin* | mingw* | pw32* | cegcc*)
5726
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5727
# as there is no search path for DLLs.
5728
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5729
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5730
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5731
_LT_TAGVAR(always_export_symbols, $1)=no
5732
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6053
case $GXX,$cc_basename in
6056
# hardcode_libdir_flag_spec is actually meaningless, as there is
6057
# no search path for DLLs.
6058
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6059
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6060
_LT_TAGVAR(always_export_symbols, $1)=yes
6061
_LT_TAGVAR(file_list_spec, $1)='@'
6062
# Tell ltmain to make .lib files, not .a files.
6064
# Tell ltmain to make .dll files, not .so files.
6066
# FIXME: Setting linknames here is a bad hack.
6067
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6068
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6069
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6071
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6073
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6075
# The linker will not automatically build a static lib if we build a DLL.
6076
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6077
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6079
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6080
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6081
lt_tool_outputfile="@TOOL_OUTPUT@"~
6082
case $lt_outputfile in
6085
lt_outputfile="$lt_outputfile.exe"
6086
lt_tool_outputfile="$lt_tool_outputfile.exe"
6089
func_to_tool_file "$lt_outputfile"~
6090
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6091
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6092
$RM "$lt_outputfile.manifest";
6097
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6098
# as there is no search path for DLLs.
6099
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6100
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6101
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6102
_LT_TAGVAR(always_export_symbols, $1)=no
6103
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5734
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5735
_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'
5736
# If the export-symbols file already is a .def file (1st line
5737
# is EXPORTS), use it as is; otherwise, prepend...
5738
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5739
cp $export_symbols $output_objdir/$soname.def;
5741
echo EXPORTS > $output_objdir/$soname.def;
5742
cat $export_symbols >> $output_objdir/$soname.def;
5744
$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'
5746
_LT_TAGVAR(ld_shlibs, $1)=no
6105
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6106
_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'
6107
# If the export-symbols file already is a .def file (1st line
6108
# is EXPORTS), use it as is; otherwise, prepend...
6109
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6110
cp $export_symbols $output_objdir/$soname.def;
6112
echo EXPORTS > $output_objdir/$soname.def;
6113
cat $export_symbols >> $output_objdir/$soname.def;
6115
$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'
6117
_LT_TAGVAR(ld_shlibs, $1)=no
5749
6122
darwin* | rhapsody*)
5750
6123
_LT_DARWIN_LINKER_FEATURES($1)
7236
7674
])# _LT_CHECK_SHELL_FEATURES
7239
# _LT_PROG_XSI_SHELLFNS
7240
# ---------------------
7241
# Bourne and XSI compatible variants of some useful shell functions.
7242
m4_defun([_LT_PROG_XSI_SHELLFNS],
7245
cat << \_LT_EOF >> "$cfgfile"
7247
# func_dirname file append nondir_replacement
7248
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7249
# otherwise set result to NONDIR_REPLACEMENT.
7253
*/*) func_dirname_result="${1%/*}${2}" ;;
7254
* ) func_dirname_result="${3}" ;;
7258
# func_basename file
7261
func_basename_result="${1##*/}"
7264
# func_dirname_and_basename file append nondir_replacement
7265
# perform func_basename and func_dirname in a single function
7267
# dirname: Compute the dirname of FILE. If nonempty,
7268
# add APPEND to the result, otherwise set result
7269
# to NONDIR_REPLACEMENT.
7270
# value returned in "$func_dirname_result"
7271
# basename: Compute filename of FILE.
7272
# value retuned in "$func_basename_result"
7273
# Implementation must be kept synchronized with func_dirname
7274
# and func_basename. For efficiency, we do not delegate to
7275
# those functions but instead duplicate the functionality here.
7276
func_dirname_and_basename ()
7279
*/*) func_dirname_result="${1%/*}${2}" ;;
7280
* ) func_dirname_result="${3}" ;;
7282
func_basename_result="${1##*/}"
7285
# func_stripname prefix suffix name
7286
# strip PREFIX and SUFFIX off of NAME.
7287
# PREFIX and SUFFIX must not contain globbing or regex special
7288
# characters, hashes, percent signs, but SUFFIX may contain a leading
7289
# dot (in which case that matches only a dot).
7292
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7293
# positional parameters, so assign one to ordinary parameter first.
7294
func_stripname_result=${3}
7295
func_stripname_result=${func_stripname_result#"${1}"}
7296
func_stripname_result=${func_stripname_result%"${2}"}
7302
func_opt_split_opt=${1%%=*}
7303
func_opt_split_arg=${1#*=}
7310
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7311
*) func_lo2o_result=${1} ;;
7315
# func_xform libobj-or-source
7318
func_xform_result=${1%.*}.lo
7321
# func_arith arithmetic-term...
7324
func_arith_result=$(( $[*] ))
7328
# STRING may not start with a hyphen.
7331
func_len_result=${#1}
7336
*) # Bourne compatible functions.
7337
cat << \_LT_EOF >> "$cfgfile"
7339
# func_dirname file append nondir_replacement
7340
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7341
# otherwise set result to NONDIR_REPLACEMENT.
7344
# Extract subdirectory from the argument.
7345
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
7346
if test "X$func_dirname_result" = "X${1}"; then
7347
func_dirname_result="${3}"
7349
func_dirname_result="$func_dirname_result${2}"
7353
# func_basename file
7356
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
7359
dnl func_dirname_and_basename
7360
dnl A portable version of this function is already defined in general.m4sh
7361
dnl so there is no need for it here.
7363
# func_stripname prefix suffix name
7364
# strip PREFIX and SUFFIX off of NAME.
7365
# PREFIX and SUFFIX must not contain globbing or regex special
7366
# characters, hashes, percent signs, but SUFFIX may contain a leading
7367
# dot (in which case that matches only a dot).
7368
# func_strip_suffix prefix name
7372
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7373
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7378
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7379
my_sed_long_arg='1s/^-[[^=]]*=//'
7384
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
7385
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
7391
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
7394
# func_xform libobj-or-source
7397
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
7400
# func_arith arithmetic-term...
7403
func_arith_result=`expr "$[@]"`
7407
# STRING may not start with a hyphen.
7410
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7416
case $lt_shell_append in
7418
cat << \_LT_EOF >> "$cfgfile"
7420
# func_append var value
7421
# Append VALUE to the end of shell variable VAR.
7429
cat << \_LT_EOF >> "$cfgfile"
7431
# func_append var value
7432
# Append VALUE to the end of shell variable VAR.
7435
eval "$[1]=\$$[1]\$[2]"
7677
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7678
# ------------------------------------------------------
7679
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7680
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7681
m4_defun([_LT_PROG_FUNCTION_REPLACE],
7683
sed -e '/^$1 ()$/,/^} # $1 /c\
7686
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7687
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7688
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7689
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7690
test 0 -eq $? || _lt_function_replace_fail=:
7694
# _LT_PROG_REPLACE_SHELLFNS
7695
# -------------------------
7696
# Replace existing portable implementations of several shell functions with
7697
# equivalent extended shell implementations where those features are available..
7698
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7699
[if test x"$xsi_shell" = xyes; then
7700
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7702
*/*) func_dirname_result="${1%/*}${2}" ;;
7703
* ) func_dirname_result="${3}" ;;
7706
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7707
func_basename_result="${1##*/}"])
7709
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7711
*/*) func_dirname_result="${1%/*}${2}" ;;
7712
* ) func_dirname_result="${3}" ;;
7714
func_basename_result="${1##*/}"])
7716
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7717
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7718
# positional parameters, so assign one to ordinary parameter first.
7719
func_stripname_result=${3}
7720
func_stripname_result=${func_stripname_result#"${1}"}
7721
func_stripname_result=${func_stripname_result%"${2}"}])
7723
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7724
func_split_long_opt_name=${1%%=*}
7725
func_split_long_opt_arg=${1#*=}])
7727
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7728
func_split_short_opt_arg=${1#??}
7729
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7731
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7733
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7734
*) func_lo2o_result=${1} ;;
7737
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7739
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7741
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7744
if test x"$lt_shell_append" = xyes; then
7745
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7747
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7748
func_quote_for_eval "${2}"
7749
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7750
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7752
# Save a `func_append' function call where possible by direct use of '+='
7753
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7754
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7755
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7756
test 0 -eq $? || _lt_function_replace_fail=:
7758
# Save a `func_append' function call even when '+=' is not available
7759
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7760
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7761
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7762
test 0 -eq $? || _lt_function_replace_fail=:
7765
if test x"$_lt_function_replace_fail" = x":"; then
7766
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7770
# _LT_PATH_CONVERSION_FUNCTIONS
7771
# -----------------------------
7772
# Determine which file name conversion functions should be used by
7773
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7774
# for certain cross-compile configurations and native mingw.
7775
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7776
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7777
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7778
AC_MSG_CHECKING([how to convert $build file names to $host format])
7779
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7783
*-*-mingw* ) # actually msys
7784
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7787
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7789
* ) # otherwise, assume *nix
7790
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7796
*-*-mingw* ) # actually msys
7797
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7800
lt_cv_to_host_file_cmd=func_convert_file_noop
7802
* ) # otherwise, assume *nix
7803
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7807
* ) # unhandled hosts (and "normal" native builds)
7808
lt_cv_to_host_file_cmd=func_convert_file_noop
7812
to_host_file_cmd=$lt_cv_to_host_file_cmd
7813
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7814
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7815
[0], [convert $build file names to $host format])dnl
7817
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7818
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7819
[#assume ordinary cross tools, or native build.
7820
lt_cv_to_tool_file_cmd=func_convert_file_noop
7824
*-*-mingw* ) # actually msys
7825
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7831
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7832
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7833
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7834
[0], [convert $build files to toolchain format])dnl
7835
])# _LT_PATH_CONVERSION_FUNCTIONS