1153
# _LT_SYS_MODULE_PATH_AIX
1154
# -----------------------
1153
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1154
# ----------------------------------
1155
1155
# Links a minimal program and checks the executable
1156
1156
# for the system default hardcoded library path. In most cases,
1157
1157
# this is /usr/lib:/lib, but when the MPI compilers are used
1158
1158
# the location of the communication and MPI libs are included too.
1159
1159
# If we don't find anything, use the default library path according
1160
1160
# to the aix ld manual.
1161
# Store the results from the different compilers for each TAGNAME.
1162
# Allow to override them for all tags through lt_cv_aix_libpath.
1161
1163
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1162
1164
[m4_require([_LT_DECL_SED])dnl
1163
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1164
lt_aix_libpath_sed='
1165
/Import File Strings/,/^$/ {
1171
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1172
# Check for a 64-bit object if we didn't find anything.
1173
if test -z "$aix_libpath"; then
1174
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1176
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1165
if test "${lt_cv_aix_libpath+set}" = set; then
1166
aix_libpath=$lt_cv_aix_libpath
1168
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1169
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1170
lt_aix_libpath_sed='[
1171
/Import File Strings/,/^$/ {
1173
s/^0 *\([^ ]*\) *$/\1/
1177
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1178
# Check for a 64-bit object if we didn't find anything.
1179
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1180
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1182
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1183
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1186
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1177
1188
])# _LT_SYS_MODULE_PATH_AIX
2312
2390
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2393
dynamic_linker='Win32 ld.exe'
2398
libname_spec='$name'
2399
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2400
library_names_spec='${libname}.dll.lib'
2404
sys_lib_search_path_spec=
2410
# Let DOS variable expansion print the short 8.3 style file name.
2411
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2412
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2415
# Convert to MSYS style.
2416
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2419
# Convert to unix form, then to dos form, then back to unix form
2420
# but this time dos style (no spaces!) so that the unix form looks
2421
# like /cygdrive/c/PROGRA~1:/cygdr...
2422
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2423
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2424
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2427
sys_lib_search_path_spec="$LIB"
2428
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2429
# It is most probably a Windows format PATH.
2430
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2432
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2434
# FIXME: find the short name or the path components, as spaces are
2435
# common. (e.g. "Program Files" -> "PROGRA~1")
2439
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2440
postinstall_cmds='base_file=`basename \${file}`~
2441
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2442
dldir=$destdir/`dirname \$dlpath`~
2443
test -d \$dldir || mkdir -p \$dldir~
2444
$install_prog $dir/$dlname \$dldir/$dlname'
2445
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2446
dlpath=$dir/\$dldll~
2448
shlibpath_overrides_runpath=yes
2449
dynamic_linker='Win32 link.exe'
2453
# Assume MSVC wrapper
2318
2454
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2455
dynamic_linker='Win32 ld.exe'
2321
dynamic_linker='Win32 ld.exe'
2322
2458
# FIXME: first we should search . and the directory the executable is in
2323
2459
shlibpath_var=PATH
3354
3514
dnl AC_DEFUN([AM_PROG_NM], [])
3355
3515
dnl AC_DEFUN([AC_PROG_NM], [])
3517
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3518
# --------------------------------
3519
# how to determine the name of the shared library
3520
# associated with a specific link library.
3521
# -- PORTME fill in with the dynamic library characteristics
3522
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3523
[m4_require([_LT_DECL_EGREP])
3524
m4_require([_LT_DECL_OBJDUMP])
3525
m4_require([_LT_DECL_DLLTOOL])
3526
AC_CACHE_CHECK([how to associate runtime and link libraries],
3527
lt_cv_sharedlib_from_linklib_cmd,
3528
[lt_cv_sharedlib_from_linklib_cmd='unknown'
3531
cygwin* | mingw* | pw32* | cegcc*)
3532
# two different shell functions defined in ltmain.sh
3533
# decide which to use based on capabilities of $DLLTOOL
3534
case `$DLLTOOL --help 2>&1` in
3535
*--identify-strict*)
3536
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3539
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3544
# fallback: assume linklib IS sharedlib
3545
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3549
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3550
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3552
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3553
[Command to associate shared and link libraries])
3554
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3557
# _LT_PATH_MANIFEST_TOOL
3558
# ----------------------
3559
# locate the manifest tool
3560
m4_defun([_LT_PATH_MANIFEST_TOOL],
3561
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3562
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3563
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3564
[lt_cv_path_mainfest_tool=no
3565
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3566
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3567
cat conftest.err >&AS_MESSAGE_LOG_FD
3568
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3569
lt_cv_path_mainfest_tool=yes
3572
if test "x$lt_cv_path_mainfest_tool" != xyes; then
3575
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3576
])# _LT_PATH_MANIFEST_TOOL
4856
5122
# Microsoft Visual C++.
4857
5123
# hardcode_libdir_flag_spec is actually meaningless, as there is
4858
5124
# no search path for DLLs.
4859
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4860
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4861
# Tell ltmain to make .lib files, not .a files.
4863
# Tell ltmain to make .dll files, not .so files.
4865
# FIXME: Setting linknames here is a bad hack.
4866
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
4867
# The linker will automatically build a .lib file if we build a DLL.
4868
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4869
# FIXME: Should let the user specify the lib program.
4870
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4871
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4872
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5125
case $cc_basename in
5128
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5129
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5130
_LT_TAGVAR(always_export_symbols, $1)=yes
5131
_LT_TAGVAR(file_list_spec, $1)='@'
5132
# Tell ltmain to make .lib files, not .a files.
5134
# Tell ltmain to make .dll files, not .so files.
5136
# FIXME: Setting linknames here is a bad hack.
5137
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5138
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5139
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5141
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5143
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5145
# The linker will not automatically build a static lib if we build a DLL.
5146
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5147
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5148
_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'
5150
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5151
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5152
lt_tool_outputfile="@TOOL_OUTPUT@"~
5153
case $lt_outputfile in
5156
lt_outputfile="$lt_outputfile.exe"
5157
lt_tool_outputfile="$lt_tool_outputfile.exe"
5160
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5161
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5162
$RM "$lt_outputfile.manifest";
5166
# Assume MSVC wrapper
5167
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5168
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5169
# Tell ltmain to make .lib files, not .a files.
5171
# Tell ltmain to make .dll files, not .so files.
5173
# FIXME: Setting linknames here is a bad hack.
5174
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5175
# The linker will automatically build a .lib file if we build a DLL.
5176
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5177
# FIXME: Should let the user specify the lib program.
5178
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5179
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4875
5184
darwin* | rhapsody*)
5798
6125
cygwin* | mingw* | pw32* | cegcc*)
5799
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5800
# as there is no search path for DLLs.
5801
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5802
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5803
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5804
_LT_TAGVAR(always_export_symbols, $1)=no
5805
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6126
case $GXX,$cc_basename in
6129
# hardcode_libdir_flag_spec is actually meaningless, as there is
6130
# no search path for DLLs.
6131
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6132
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6133
_LT_TAGVAR(always_export_symbols, $1)=yes
6134
_LT_TAGVAR(file_list_spec, $1)='@'
6135
# Tell ltmain to make .lib files, not .a files.
6137
# Tell ltmain to make .dll files, not .so files.
6139
# FIXME: Setting linknames here is a bad hack.
6140
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6141
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6142
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6144
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6146
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6148
# The linker will not automatically build a static lib if we build a DLL.
6149
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6150
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6152
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6153
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6154
lt_tool_outputfile="@TOOL_OUTPUT@"~
6155
case $lt_outputfile in
6158
lt_outputfile="$lt_outputfile.exe"
6159
lt_tool_outputfile="$lt_tool_outputfile.exe"
6162
func_to_tool_file "$lt_outputfile"~
6163
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6164
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6165
$RM "$lt_outputfile.manifest";
6170
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6171
# as there is no search path for DLLs.
6172
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6173
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6174
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6175
_LT_TAGVAR(always_export_symbols, $1)=no
6176
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5807
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5808
_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'
5809
# If the export-symbols file already is a .def file (1st line
5810
# is EXPORTS), use it as is; otherwise, prepend...
5811
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5812
cp $export_symbols $output_objdir/$soname.def;
5814
echo EXPORTS > $output_objdir/$soname.def;
5815
cat $export_symbols >> $output_objdir/$soname.def;
5817
$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'
5819
_LT_TAGVAR(ld_shlibs, $1)=no
6178
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6179
_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'
6180
# If the export-symbols file already is a .def file (1st line
6181
# is EXPORTS), use it as is; otherwise, prepend...
6182
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6183
cp $export_symbols $output_objdir/$soname.def;
6185
echo EXPORTS > $output_objdir/$soname.def;
6186
cat $export_symbols >> $output_objdir/$soname.def;
6188
$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'
6190
_LT_TAGVAR(ld_shlibs, $1)=no
5822
6195
darwin* | rhapsody*)
5823
6196
_LT_DARWIN_LINKER_FEATURES($1)
7303
7741
])# _LT_CHECK_SHELL_FEATURES
7306
# _LT_PROG_XSI_SHELLFNS
7307
# ---------------------
7308
# Bourne and XSI compatible variants of some useful shell functions.
7309
m4_defun([_LT_PROG_XSI_SHELLFNS],
7312
cat << \_LT_EOF >> "$cfgfile"
7314
# func_dirname file append nondir_replacement
7315
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7316
# otherwise set result to NONDIR_REPLACEMENT.
7320
*/*) func_dirname_result="${1%/*}${2}" ;;
7321
* ) func_dirname_result="${3}" ;;
7325
# func_basename file
7328
func_basename_result="${1##*/}"
7331
# func_dirname_and_basename file append nondir_replacement
7332
# perform func_basename and func_dirname in a single function
7334
# dirname: Compute the dirname of FILE. If nonempty,
7335
# add APPEND to the result, otherwise set result
7336
# to NONDIR_REPLACEMENT.
7337
# value returned in "$func_dirname_result"
7338
# basename: Compute filename of FILE.
7339
# value retuned in "$func_basename_result"
7340
# Implementation must be kept synchronized with func_dirname
7341
# and func_basename. For efficiency, we do not delegate to
7342
# those functions but instead duplicate the functionality here.
7343
func_dirname_and_basename ()
7346
*/*) func_dirname_result="${1%/*}${2}" ;;
7347
* ) func_dirname_result="${3}" ;;
7349
func_basename_result="${1##*/}"
7352
# func_stripname prefix suffix name
7353
# strip PREFIX and SUFFIX off of NAME.
7354
# PREFIX and SUFFIX must not contain globbing or regex special
7355
# characters, hashes, percent signs, but SUFFIX may contain a leading
7356
# dot (in which case that matches only a dot).
7359
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7360
# positional parameters, so assign one to ordinary parameter first.
7361
func_stripname_result=${3}
7362
func_stripname_result=${func_stripname_result#"${1}"}
7363
func_stripname_result=${func_stripname_result%"${2}"}
7369
func_opt_split_opt=${1%%=*}
7370
func_opt_split_arg=${1#*=}
7377
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7378
*) func_lo2o_result=${1} ;;
7382
# func_xform libobj-or-source
7385
func_xform_result=${1%.*}.lo
7388
# func_arith arithmetic-term...
7391
func_arith_result=$(( $[*] ))
7395
# STRING may not start with a hyphen.
7398
func_len_result=${#1}
7403
*) # Bourne compatible functions.
7404
cat << \_LT_EOF >> "$cfgfile"
7406
# func_dirname file append nondir_replacement
7407
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7408
# otherwise set result to NONDIR_REPLACEMENT.
7411
# Extract subdirectory from the argument.
7412
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
7413
if test "X$func_dirname_result" = "X${1}"; then
7414
func_dirname_result="${3}"
7416
func_dirname_result="$func_dirname_result${2}"
7420
# func_basename file
7423
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
7426
dnl func_dirname_and_basename
7427
dnl A portable version of this function is already defined in general.m4sh
7428
dnl so there is no need for it here.
7430
# func_stripname prefix suffix name
7431
# strip PREFIX and SUFFIX off of NAME.
7432
# PREFIX and SUFFIX must not contain globbing or regex special
7433
# characters, hashes, percent signs, but SUFFIX may contain a leading
7434
# dot (in which case that matches only a dot).
7435
# func_strip_suffix prefix name
7439
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7440
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7445
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7446
my_sed_long_arg='1s/^-[[^=]]*=//'
7451
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
7452
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
7458
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
7461
# func_xform libobj-or-source
7464
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
7467
# func_arith arithmetic-term...
7470
func_arith_result=`expr "$[@]"`
7474
# STRING may not start with a hyphen.
7477
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7483
case $lt_shell_append in
7485
cat << \_LT_EOF >> "$cfgfile"
7487
# func_append var value
7488
# Append VALUE to the end of shell variable VAR.
7496
cat << \_LT_EOF >> "$cfgfile"
7498
# func_append var value
7499
# Append VALUE to the end of shell variable VAR.
7502
eval "$[1]=\$$[1]\$[2]"
7744
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7745
# ------------------------------------------------------
7746
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7747
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7748
m4_defun([_LT_PROG_FUNCTION_REPLACE],
7750
sed -e '/^$1 ()$/,/^} # $1 /c\
7753
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7754
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7755
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7756
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7757
test 0 -eq $? || _lt_function_replace_fail=:
7761
# _LT_PROG_REPLACE_SHELLFNS
7762
# -------------------------
7763
# Replace existing portable implementations of several shell functions with
7764
# equivalent extended shell implementations where those features are available..
7765
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7766
[if test x"$xsi_shell" = xyes; then
7767
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7769
*/*) func_dirname_result="${1%/*}${2}" ;;
7770
* ) func_dirname_result="${3}" ;;
7773
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7774
func_basename_result="${1##*/}"])
7776
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7778
*/*) func_dirname_result="${1%/*}${2}" ;;
7779
* ) func_dirname_result="${3}" ;;
7781
func_basename_result="${1##*/}"])
7783
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7784
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7785
# positional parameters, so assign one to ordinary parameter first.
7786
func_stripname_result=${3}
7787
func_stripname_result=${func_stripname_result#"${1}"}
7788
func_stripname_result=${func_stripname_result%"${2}"}])
7790
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7791
func_split_long_opt_name=${1%%=*}
7792
func_split_long_opt_arg=${1#*=}])
7794
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7795
func_split_short_opt_arg=${1#??}
7796
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7798
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7800
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7801
*) func_lo2o_result=${1} ;;
7804
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7806
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7808
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7811
if test x"$lt_shell_append" = xyes; then
7812
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7814
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7815
func_quote_for_eval "${2}"
7816
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7817
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7819
# Save a `func_append' function call where possible by direct use of '+='
7820
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7821
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7822
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7823
test 0 -eq $? || _lt_function_replace_fail=:
7825
# Save a `func_append' function call even when '+=' is not available
7826
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7827
&& mv -f "$cfgfile.tmp" "$cfgfile" \
7828
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7829
test 0 -eq $? || _lt_function_replace_fail=:
7832
if test x"$_lt_function_replace_fail" = x":"; then
7833
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7837
# _LT_PATH_CONVERSION_FUNCTIONS
7838
# -----------------------------
7839
# Determine which file name conversion functions should be used by
7840
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7841
# for certain cross-compile configurations and native mingw.
7842
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7843
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7844
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7845
AC_MSG_CHECKING([how to convert $build file names to $host format])
7846
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7850
*-*-mingw* ) # actually msys
7851
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7854
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7856
* ) # otherwise, assume *nix
7857
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7863
*-*-mingw* ) # actually msys
7864
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7867
lt_cv_to_host_file_cmd=func_convert_file_noop
7869
* ) # otherwise, assume *nix
7870
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7874
* ) # unhandled hosts (and "normal" native builds)
7875
lt_cv_to_host_file_cmd=func_convert_file_noop
7879
to_host_file_cmd=$lt_cv_to_host_file_cmd
7880
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7881
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7882
[0], [convert $build file names to $host format])dnl
7884
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7885
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7886
[#assume ordinary cross tools, or native build.
7887
lt_cv_to_tool_file_cmd=func_convert_file_noop
7891
*-*-mingw* ) # actually msys
7892
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7898
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7899
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7900
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7901
[0], [convert $build files to toolchain format])dnl
7902
])# _LT_PATH_CONVERSION_FUNCTIONS
7510
7904
# Helper functions for option handling. -*- Autoconf -*-