1820
# _LT_SYS_MODULE_PATH_AIX
1821
# -----------------------
1820
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1821
# ----------------------------------
1822
1822
# Links a minimal program and checks the executable
1823
1823
# for the system default hardcoded library path. In most cases,
1824
1824
# this is /usr/lib:/lib, but when the MPI compilers are used
1825
1825
# the location of the communication and MPI libs are included too.
1826
1826
# If we don't find anything, use the default library path according
1827
1827
# to the aix ld manual.
1828
# Store the results from the different compilers for each TAGNAME.
1829
# Allow to override them for all tags through lt_cv_aix_libpath.
1828
1830
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1829
1831
[m4_require([_LT_DECL_SED])dnl
1830
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1831
lt_aix_libpath_sed='
1832
/Import File Strings/,/^$/ {
1838
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1839
# Check for a 64-bit object if we didn't find anything.
1840
if test -z "$aix_libpath"; then
1841
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1843
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1832
if test "${lt_cv_aix_libpath+set}" = set; then
1833
aix_libpath=$lt_cv_aix_libpath
1835
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1836
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1837
lt_aix_libpath_sed='[
1838
/Import File Strings/,/^$/ {
1840
s/^0 *\([^ ]*\) *$/\1/
1844
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1845
# Check for a 64-bit object if we didn't find anything.
1846
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1847
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1849
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1850
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1853
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1844
1855
])# _LT_SYS_MODULE_PATH_AIX
2979
3057
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3060
dynamic_linker='Win32 ld.exe'
3065
libname_spec='$name'
3066
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3067
library_names_spec='${libname}.dll.lib'
3071
sys_lib_search_path_spec=
3077
# Let DOS variable expansion print the short 8.3 style file name.
3078
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3079
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3082
# Convert to MSYS style.
3083
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3086
# Convert to unix form, then to dos form, then back to unix form
3087
# but this time dos style (no spaces!) so that the unix form looks
3088
# like /cygdrive/c/PROGRA~1:/cygdr...
3089
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3090
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3091
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3094
sys_lib_search_path_spec="$LIB"
3095
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3096
# It is most probably a Windows format PATH.
3097
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3099
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3101
# FIXME: find the short name or the path components, as spaces are
3102
# common. (e.g. "Program Files" -> "PROGRA~1")
3106
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3107
postinstall_cmds='base_file=`basename \${file}`~
3108
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3109
dldir=$destdir/`dirname \$dlpath`~
3110
test -d \$dldir || mkdir -p \$dldir~
3111
$install_prog $dir/$dlname \$dldir/$dlname'
3112
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3113
dlpath=$dir/\$dldll~
3115
shlibpath_overrides_runpath=yes
3116
dynamic_linker='Win32 link.exe'
3120
# Assume MSVC wrapper
2985
3121
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3122
dynamic_linker='Win32 ld.exe'
2988
dynamic_linker='Win32 ld.exe'
2989
3125
# FIXME: first we should search . and the directory the executable is in
2990
3126
shlibpath_var=PATH
4021
4181
dnl AC_DEFUN([AM_PROG_NM], [])
4022
4182
dnl AC_DEFUN([AC_PROG_NM], [])
4184
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4185
# --------------------------------
4186
# how to determine the name of the shared library
4187
# associated with a specific link library.
4188
# -- PORTME fill in with the dynamic library characteristics
4189
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4190
[m4_require([_LT_DECL_EGREP])
4191
m4_require([_LT_DECL_OBJDUMP])
4192
m4_require([_LT_DECL_DLLTOOL])
4193
AC_CACHE_CHECK([how to associate runtime and link libraries],
4194
lt_cv_sharedlib_from_linklib_cmd,
4195
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4198
cygwin* | mingw* | pw32* | cegcc*)
4199
# two different shell functions defined in ltmain.sh
4200
# decide which to use based on capabilities of $DLLTOOL
4201
case `$DLLTOOL --help 2>&1` in
4202
*--identify-strict*)
4203
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4206
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4211
# fallback: assume linklib IS sharedlib
4212
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4216
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4217
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4219
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4220
[Command to associate shared and link libraries])
4221
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4224
# _LT_PATH_MANIFEST_TOOL
4225
# ----------------------
4226
# locate the manifest tool
4227
m4_defun([_LT_PATH_MANIFEST_TOOL],
4228
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4229
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4230
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4231
[lt_cv_path_mainfest_tool=no
4232
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4233
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4234
cat conftest.err >&AS_MESSAGE_LOG_FD
4235
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4236
lt_cv_path_mainfest_tool=yes
4239
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4242
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4243
])# _LT_PATH_MANIFEST_TOOL
5523
5789
# Microsoft Visual C++.
5524
5790
# hardcode_libdir_flag_spec is actually meaningless, as there is
5525
5791
# no search path for DLLs.
5526
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5527
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5528
# Tell ltmain to make .lib files, not .a files.
5530
# Tell ltmain to make .dll files, not .so files.
5532
# FIXME: Setting linknames here is a bad hack.
5533
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5534
# The linker will automatically build a .lib file if we build a DLL.
5535
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5536
# FIXME: Should let the user specify the lib program.
5537
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5538
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5539
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5792
case $cc_basename in
5795
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5796
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5797
_LT_TAGVAR(always_export_symbols, $1)=yes
5798
_LT_TAGVAR(file_list_spec, $1)='@'
5799
# Tell ltmain to make .lib files, not .a files.
5801
# Tell ltmain to make .dll files, not .so files.
5803
# FIXME: Setting linknames here is a bad hack.
5804
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5805
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5806
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5808
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5810
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5812
# The linker will not automatically build a static lib if we build a DLL.
5813
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5814
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5815
_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'
5817
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5818
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5819
lt_tool_outputfile="@TOOL_OUTPUT@"~
5820
case $lt_outputfile in
5823
lt_outputfile="$lt_outputfile.exe"
5824
lt_tool_outputfile="$lt_tool_outputfile.exe"
5827
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5828
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5829
$RM "$lt_outputfile.manifest";
5833
# Assume MSVC wrapper
5834
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5835
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5836
# Tell ltmain to make .lib files, not .a files.
5838
# Tell ltmain to make .dll files, not .so files.
5840
# FIXME: Setting linknames here is a bad hack.
5841
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5842
# The linker will automatically build a .lib file if we build a DLL.
5843
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5844
# FIXME: Should let the user specify the lib program.
5845
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5846
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5542
5851
darwin* | rhapsody*)
6465
6792
cygwin* | mingw* | pw32* | cegcc*)
6466
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6467
# as there is no search path for DLLs.
6468
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6469
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6470
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6471
_LT_TAGVAR(always_export_symbols, $1)=no
6472
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6793
case $GXX,$cc_basename in
6796
# hardcode_libdir_flag_spec is actually meaningless, as there is
6797
# no search path for DLLs.
6798
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6799
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6800
_LT_TAGVAR(always_export_symbols, $1)=yes
6801
_LT_TAGVAR(file_list_spec, $1)='@'
6802
# Tell ltmain to make .lib files, not .a files.
6804
# Tell ltmain to make .dll files, not .so files.
6806
# FIXME: Setting linknames here is a bad hack.
6807
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6808
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6809
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6811
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6813
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6815
# The linker will not automatically build a static lib if we build a DLL.
6816
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6817
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6819
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6820
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6821
lt_tool_outputfile="@TOOL_OUTPUT@"~
6822
case $lt_outputfile in
6825
lt_outputfile="$lt_outputfile.exe"
6826
lt_tool_outputfile="$lt_tool_outputfile.exe"
6829
func_to_tool_file "$lt_outputfile"~
6830
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6831
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6832
$RM "$lt_outputfile.manifest";
6837
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6838
# as there is no search path for DLLs.
6839
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6840
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6841
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6842
_LT_TAGVAR(always_export_symbols, $1)=no
6843
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6474
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6475
_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'
6476
# If the export-symbols file already is a .def file (1st line
6477
# is EXPORTS), use it as is; otherwise, prepend...
6478
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6479
cp $export_symbols $output_objdir/$soname.def;
6481
echo EXPORTS > $output_objdir/$soname.def;
6482
cat $export_symbols >> $output_objdir/$soname.def;
6484
$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'
6486
_LT_TAGVAR(ld_shlibs, $1)=no
6845
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6846
_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'
6847
# If the export-symbols file already is a .def file (1st line
6848
# is EXPORTS), use it as is; otherwise, prepend...
6849
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6850
cp $export_symbols $output_objdir/$soname.def;
6852
echo EXPORTS > $output_objdir/$soname.def;
6853
cat $export_symbols >> $output_objdir/$soname.def;
6855
$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'
6857
_LT_TAGVAR(ld_shlibs, $1)=no
6489
6862
darwin* | rhapsody*)
6490
6863
_LT_DARWIN_LINKER_FEATURES($1)
7970
8408
])# _LT_CHECK_SHELL_FEATURES
7973
# _LT_PROG_XSI_SHELLFNS
7974
# ---------------------
7975
# Bourne and XSI compatible variants of some useful shell functions.
7976
m4_defun([_LT_PROG_XSI_SHELLFNS],
7979
cat << \_LT_EOF >> "$cfgfile"
7981
# func_dirname file append nondir_replacement
7982
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7983
# otherwise set result to NONDIR_REPLACEMENT.
7987
*/*) func_dirname_result="${1%/*}${2}" ;;
7988
* ) func_dirname_result="${3}" ;;
7992
# func_basename file
7995
func_basename_result="${1##*/}"
7998
# func_dirname_and_basename file append nondir_replacement
7999
# perform func_basename and func_dirname in a single function
8001
# dirname: Compute the dirname of FILE. If nonempty,
8002
# add APPEND to the result, otherwise set result
8003
# to NONDIR_REPLACEMENT.
8004
# value returned in "$func_dirname_result"
8005
# basename: Compute filename of FILE.
8006
# value retuned in "$func_basename_result"
8007
# Implementation must be kept synchronized with func_dirname
8008
# and func_basename. For efficiency, we do not delegate to
8009
# those functions but instead duplicate the functionality here.
8010
func_dirname_and_basename ()
8013
*/*) func_dirname_result="${1%/*}${2}" ;;
8014
* ) func_dirname_result="${3}" ;;
8016
func_basename_result="${1##*/}"
8019
# func_stripname prefix suffix name
8020
# strip PREFIX and SUFFIX off of NAME.
8021
# PREFIX and SUFFIX must not contain globbing or regex special
8022
# characters, hashes, percent signs, but SUFFIX may contain a leading
8023
# dot (in which case that matches only a dot).
8026
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8027
# positional parameters, so assign one to ordinary parameter first.
8028
func_stripname_result=${3}
8029
func_stripname_result=${func_stripname_result#"${1}"}
8030
func_stripname_result=${func_stripname_result%"${2}"}
8036
func_opt_split_opt=${1%%=*}
8037
func_opt_split_arg=${1#*=}
8044
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8045
*) func_lo2o_result=${1} ;;
8049
# func_xform libobj-or-source
8052
func_xform_result=${1%.*}.lo
8055
# func_arith arithmetic-term...
8058
func_arith_result=$(( $[*] ))
8062
# STRING may not start with a hyphen.
8065
func_len_result=${#1}
8070
*) # Bourne compatible functions.
8071
cat << \_LT_EOF >> "$cfgfile"
8073
# func_dirname file append nondir_replacement
8074
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8075
# otherwise set result to NONDIR_REPLACEMENT.
8078
# Extract subdirectory from the argument.
8079
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8080
if test "X$func_dirname_result" = "X${1}"; then
8081
func_dirname_result="${3}"
8083
func_dirname_result="$func_dirname_result${2}"
8087
# func_basename file
8090
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8093
dnl func_dirname_and_basename
8094
dnl A portable version of this function is already defined in general.m4sh
8095
dnl so there is no need for it here.
8097
# func_stripname prefix suffix name
8098
# strip PREFIX and SUFFIX off of NAME.
8099
# PREFIX and SUFFIX must not contain globbing or regex special
8100
# characters, hashes, percent signs, but SUFFIX may contain a leading
8101
# dot (in which case that matches only a dot).
8102
# func_strip_suffix prefix name
8106
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8107
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8112
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8113
my_sed_long_arg='1s/^-[[^=]]*=//'
8118
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8119
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8125
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8128
# func_xform libobj-or-source
8131
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8134
# func_arith arithmetic-term...
8137
func_arith_result=`expr "$[@]"`
8141
# STRING may not start with a hyphen.
8144
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8150
case $lt_shell_append in
8152
cat << \_LT_EOF >> "$cfgfile"
8154
# func_append var value
8155
# Append VALUE to the end of shell variable VAR.
8163
cat << \_LT_EOF >> "$cfgfile"
8165
# func_append var value
8166
# Append VALUE to the end of shell variable VAR.
8169
eval "$[1]=\$$[1]\$[2]"
8411
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8412
# ------------------------------------------------------
8413
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8414
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8415
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8417
sed -e '/^$1 ()$/,/^} # $1 /c\
8420
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8421
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8422
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8423
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8424
test 0 -eq $? || _lt_function_replace_fail=:
8428
# _LT_PROG_REPLACE_SHELLFNS
8429
# -------------------------
8430
# Replace existing portable implementations of several shell functions with
8431
# equivalent extended shell implementations where those features are available..
8432
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8433
[if test x"$xsi_shell" = xyes; then
8434
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8436
*/*) func_dirname_result="${1%/*}${2}" ;;
8437
* ) func_dirname_result="${3}" ;;
8440
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8441
func_basename_result="${1##*/}"])
8443
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8445
*/*) func_dirname_result="${1%/*}${2}" ;;
8446
* ) func_dirname_result="${3}" ;;
8448
func_basename_result="${1##*/}"])
8450
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8451
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8452
# positional parameters, so assign one to ordinary parameter first.
8453
func_stripname_result=${3}
8454
func_stripname_result=${func_stripname_result#"${1}"}
8455
func_stripname_result=${func_stripname_result%"${2}"}])
8457
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8458
func_split_long_opt_name=${1%%=*}
8459
func_split_long_opt_arg=${1#*=}])
8461
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8462
func_split_short_opt_arg=${1#??}
8463
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8465
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8467
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8468
*) func_lo2o_result=${1} ;;
8471
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8473
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8475
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8478
if test x"$lt_shell_append" = xyes; then
8479
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8481
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8482
func_quote_for_eval "${2}"
8483
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8484
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8486
# Save a `func_append' function call where possible by direct use of '+='
8487
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8488
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8489
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8490
test 0 -eq $? || _lt_function_replace_fail=:
8492
# Save a `func_append' function call even when '+=' is not available
8493
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8494
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8495
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8496
test 0 -eq $? || _lt_function_replace_fail=:
8499
if test x"$_lt_function_replace_fail" = x":"; then
8500
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8504
# _LT_PATH_CONVERSION_FUNCTIONS
8505
# -----------------------------
8506
# Determine which file name conversion functions should be used by
8507
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8508
# for certain cross-compile configurations and native mingw.
8509
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8510
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8511
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8512
AC_MSG_CHECKING([how to convert $build file names to $host format])
8513
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8517
*-*-mingw* ) # actually msys
8518
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8521
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8523
* ) # otherwise, assume *nix
8524
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8530
*-*-mingw* ) # actually msys
8531
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8534
lt_cv_to_host_file_cmd=func_convert_file_noop
8536
* ) # otherwise, assume *nix
8537
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8541
* ) # unhandled hosts (and "normal" native builds)
8542
lt_cv_to_host_file_cmd=func_convert_file_noop
8546
to_host_file_cmd=$lt_cv_to_host_file_cmd
8547
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8548
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8549
[0], [convert $build file names to $host format])dnl
8551
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8552
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8553
[#assume ordinary cross tools, or native build.
8554
lt_cv_to_tool_file_cmd=func_convert_file_noop
8558
*-*-mingw* ) # actually msys
8559
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8565
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8566
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8567
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8568
[0], [convert $build files to toolchain format])dnl
8569
])# _LT_PATH_CONVERSION_FUNCTIONS
8177
8571
# Helper functions for option handling. -*- Autoconf -*-