1780
# _LT_SYS_MODULE_PATH_AIX
1781
# -----------------------
1780
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1781
# ----------------------------------
1782
1782
# Links a minimal program and checks the executable
1783
1783
# for the system default hardcoded library path. In most cases,
1784
1784
# this is /usr/lib:/lib, but when the MPI compilers are used
1785
1785
# the location of the communication and MPI libs are included too.
1786
1786
# If we don't find anything, use the default library path according
1787
1787
# to the aix ld manual.
1788
# Store the results from the different compilers for each TAGNAME.
1789
# Allow to override them for all tags through lt_cv_aix_libpath.
1788
1790
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1789
1791
[m4_require([_LT_DECL_SED])dnl
1790
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1791
lt_aix_libpath_sed='
1792
/Import File Strings/,/^$/ {
1798
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1799
# Check for a 64-bit object if we didn't find anything.
1800
if test -z "$aix_libpath"; then
1801
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1803
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1792
if test "${lt_cv_aix_libpath+set}" = set; then
1793
aix_libpath=$lt_cv_aix_libpath
1795
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1796
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1797
lt_aix_libpath_sed='[
1798
/Import File Strings/,/^$/ {
1800
s/^0 *\([^ ]*\) *$/\1/
1804
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1805
# Check for a 64-bit object if we didn't find anything.
1806
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1807
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1809
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1810
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1813
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1804
1815
])# _LT_SYS_MODULE_PATH_AIX
2939
3017
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3020
dynamic_linker='Win32 ld.exe'
3025
libname_spec='$name'
3026
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3027
library_names_spec='${libname}.dll.lib'
3031
sys_lib_search_path_spec=
3037
# Let DOS variable expansion print the short 8.3 style file name.
3038
lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3039
sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3042
# Convert to MSYS style.
3043
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3046
# Convert to unix form, then to dos form, then back to unix form
3047
# but this time dos style (no spaces!) so that the unix form looks
3048
# like /cygdrive/c/PROGRA~1:/cygdr...
3049
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3050
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3051
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3054
sys_lib_search_path_spec="$LIB"
3055
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3056
# It is most probably a Windows format PATH.
3057
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3059
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3061
# FIXME: find the short name or the path components, as spaces are
3062
# common. (e.g. "Program Files" -> "PROGRA~1")
3066
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3067
postinstall_cmds='base_file=`basename \${file}`~
3068
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3069
dldir=$destdir/`dirname \$dlpath`~
3070
test -d \$dldir || mkdir -p \$dldir~
3071
$install_prog $dir/$dlname \$dldir/$dlname'
3072
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3073
dlpath=$dir/\$dldll~
3075
shlibpath_overrides_runpath=yes
3076
dynamic_linker='Win32 link.exe'
3080
# Assume MSVC wrapper
2945
3081
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3082
dynamic_linker='Win32 ld.exe'
2948
dynamic_linker='Win32 ld.exe'
2949
3085
# FIXME: first we should search . and the directory the executable is in
2950
3086
shlibpath_var=PATH
3981
4137
dnl AC_DEFUN([AM_PROG_NM], [])
3982
4138
dnl AC_DEFUN([AC_PROG_NM], [])
4140
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4141
# --------------------------------
4142
# how to determine the name of the shared library
4143
# associated with a specific link library.
4144
# -- PORTME fill in with the dynamic library characteristics
4145
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4146
[m4_require([_LT_DECL_EGREP])
4147
m4_require([_LT_DECL_OBJDUMP])
4148
m4_require([_LT_DECL_DLLTOOL])
4149
AC_CACHE_CHECK([how to associate runtime and link libraries],
4150
lt_cv_sharedlib_from_linklib_cmd,
4151
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4154
cygwin* | mingw* | pw32* | cegcc*)
4155
# two different shell functions defined in ltmain.sh
4156
# decide which to use based on capabilities of $DLLTOOL
4157
case `$DLLTOOL --help 2>&1` in
4158
*--identify-strict*)
4159
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4162
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4167
# fallback: assume linklib IS sharedlib
4168
lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4172
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4173
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4175
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4176
[Command to associate shared and link libraries])
4177
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4180
# _LT_PATH_MANIFEST_TOOL
4181
# ----------------------
4182
# locate the manifest tool
4183
m4_defun([_LT_PATH_MANIFEST_TOOL],
4184
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4185
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4186
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4187
[lt_cv_path_mainfest_tool=no
4188
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4189
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4190
cat conftest.err >&AS_MESSAGE_LOG_FD
4191
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4192
lt_cv_path_mainfest_tool=yes
4195
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4198
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4199
])# _LT_PATH_MANIFEST_TOOL
5483
5745
# Microsoft Visual C++.
5484
5746
# hardcode_libdir_flag_spec is actually meaningless, as there is
5485
5747
# no search path for DLLs.
5486
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5487
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5488
# Tell ltmain to make .lib files, not .a files.
5490
# Tell ltmain to make .dll files, not .so files.
5492
# FIXME: Setting linknames here is a bad hack.
5493
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5494
# The linker will automatically build a .lib file if we build a DLL.
5495
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5496
# FIXME: Should let the user specify the lib program.
5497
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5498
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5499
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5748
case $cc_basename in
5751
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5752
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5753
_LT_TAGVAR(always_export_symbols, $1)=yes
5754
_LT_TAGVAR(file_list_spec, $1)='@'
5755
# Tell ltmain to make .lib files, not .a files.
5757
# Tell ltmain to make .dll files, not .so files.
5759
# FIXME: Setting linknames here is a bad hack.
5760
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5761
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5762
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5764
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5766
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5768
# The linker will not automatically build a static lib if we build a DLL.
5769
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5770
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5771
_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'
5773
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5774
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5775
lt_tool_outputfile="@TOOL_OUTPUT@"~
5776
case $lt_outputfile in
5779
lt_outputfile="$lt_outputfile.exe"
5780
lt_tool_outputfile="$lt_tool_outputfile.exe"
5783
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5784
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5785
$RM "$lt_outputfile.manifest";
5789
# Assume MSVC wrapper
5790
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5791
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5792
# Tell ltmain to make .lib files, not .a files.
5794
# Tell ltmain to make .dll files, not .so files.
5796
# FIXME: Setting linknames here is a bad hack.
5797
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5798
# The linker will automatically build a .lib file if we build a DLL.
5799
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5800
# FIXME: Should let the user specify the lib program.
5801
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5802
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5502
5807
darwin* | rhapsody*)
6425
6748
cygwin* | mingw* | pw32* | cegcc*)
6426
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6427
# as there is no search path for DLLs.
6428
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6429
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6430
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6431
_LT_TAGVAR(always_export_symbols, $1)=no
6432
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6749
case $GXX,$cc_basename in
6752
# hardcode_libdir_flag_spec is actually meaningless, as there is
6753
# no search path for DLLs.
6754
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6755
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6756
_LT_TAGVAR(always_export_symbols, $1)=yes
6757
_LT_TAGVAR(file_list_spec, $1)='@'
6758
# Tell ltmain to make .lib files, not .a files.
6760
# Tell ltmain to make .dll files, not .so files.
6762
# FIXME: Setting linknames here is a bad hack.
6763
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6764
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6765
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6767
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6769
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6771
# The linker will not automatically build a static lib if we build a DLL.
6772
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6773
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6775
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6776
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6777
lt_tool_outputfile="@TOOL_OUTPUT@"~
6778
case $lt_outputfile in
6781
lt_outputfile="$lt_outputfile.exe"
6782
lt_tool_outputfile="$lt_tool_outputfile.exe"
6785
func_to_tool_file "$lt_outputfile"~
6786
if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6787
$MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6788
$RM "$lt_outputfile.manifest";
6793
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6794
# as there is no search path for DLLs.
6795
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6796
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6797
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6798
_LT_TAGVAR(always_export_symbols, $1)=no
6799
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6434
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6435
_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'
6436
# If the export-symbols file already is a .def file (1st line
6437
# is EXPORTS), use it as is; otherwise, prepend...
6438
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6439
cp $export_symbols $output_objdir/$soname.def;
6441
echo EXPORTS > $output_objdir/$soname.def;
6442
cat $export_symbols >> $output_objdir/$soname.def;
6444
$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'
6446
_LT_TAGVAR(ld_shlibs, $1)=no
6801
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6802
_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'
6803
# If the export-symbols file already is a .def file (1st line
6804
# is EXPORTS), use it as is; otherwise, prepend...
6805
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6806
cp $export_symbols $output_objdir/$soname.def;
6808
echo EXPORTS > $output_objdir/$soname.def;
6809
cat $export_symbols >> $output_objdir/$soname.def;
6811
$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'
6813
_LT_TAGVAR(ld_shlibs, $1)=no
6449
6818
darwin* | rhapsody*)
6450
6819
_LT_DARWIN_LINKER_FEATURES($1)
7930
8364
])# _LT_CHECK_SHELL_FEATURES
7933
# _LT_PROG_XSI_SHELLFNS
7934
# ---------------------
7935
# Bourne and XSI compatible variants of some useful shell functions.
7936
m4_defun([_LT_PROG_XSI_SHELLFNS],
7939
cat << \_LT_EOF >> "$cfgfile"
7941
# func_dirname file append nondir_replacement
7942
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7943
# otherwise set result to NONDIR_REPLACEMENT.
7947
*/*) func_dirname_result="${1%/*}${2}" ;;
7948
* ) func_dirname_result="${3}" ;;
7952
# func_basename file
7955
func_basename_result="${1##*/}"
7958
# func_dirname_and_basename file append nondir_replacement
7959
# perform func_basename and func_dirname in a single function
7961
# dirname: Compute the dirname of FILE. If nonempty,
7962
# add APPEND to the result, otherwise set result
7963
# to NONDIR_REPLACEMENT.
7964
# value returned in "$func_dirname_result"
7965
# basename: Compute filename of FILE.
7966
# value retuned in "$func_basename_result"
7967
# Implementation must be kept synchronized with func_dirname
7968
# and func_basename. For efficiency, we do not delegate to
7969
# those functions but instead duplicate the functionality here.
7970
func_dirname_and_basename ()
7973
*/*) func_dirname_result="${1%/*}${2}" ;;
7974
* ) func_dirname_result="${3}" ;;
7976
func_basename_result="${1##*/}"
7979
# func_stripname prefix suffix name
7980
# strip PREFIX and SUFFIX off of NAME.
7981
# PREFIX and SUFFIX must not contain globbing or regex special
7982
# characters, hashes, percent signs, but SUFFIX may contain a leading
7983
# dot (in which case that matches only a dot).
7986
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7987
# positional parameters, so assign one to ordinary parameter first.
7988
func_stripname_result=${3}
7989
func_stripname_result=${func_stripname_result#"${1}"}
7990
func_stripname_result=${func_stripname_result%"${2}"}
7996
func_opt_split_opt=${1%%=*}
7997
func_opt_split_arg=${1#*=}
8004
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8005
*) func_lo2o_result=${1} ;;
8009
# func_xform libobj-or-source
8012
func_xform_result=${1%.*}.lo
8015
# func_arith arithmetic-term...
8018
func_arith_result=$(( $[*] ))
8022
# STRING may not start with a hyphen.
8025
func_len_result=${#1}
8030
*) # Bourne compatible functions.
8031
cat << \_LT_EOF >> "$cfgfile"
8033
# func_dirname file append nondir_replacement
8034
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8035
# otherwise set result to NONDIR_REPLACEMENT.
8038
# Extract subdirectory from the argument.
8039
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8040
if test "X$func_dirname_result" = "X${1}"; then
8041
func_dirname_result="${3}"
8043
func_dirname_result="$func_dirname_result${2}"
8047
# func_basename file
8050
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8053
dnl func_dirname_and_basename
8054
dnl A portable version of this function is already defined in general.m4sh
8055
dnl so there is no need for it here.
8057
# func_stripname prefix suffix name
8058
# strip PREFIX and SUFFIX off of NAME.
8059
# PREFIX and SUFFIX must not contain globbing or regex special
8060
# characters, hashes, percent signs, but SUFFIX may contain a leading
8061
# dot (in which case that matches only a dot).
8062
# func_strip_suffix prefix name
8066
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8067
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8072
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8073
my_sed_long_arg='1s/^-[[^=]]*=//'
8078
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8079
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8085
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8088
# func_xform libobj-or-source
8091
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8094
# func_arith arithmetic-term...
8097
func_arith_result=`expr "$[@]"`
8101
# STRING may not start with a hyphen.
8104
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8110
case $lt_shell_append in
8112
cat << \_LT_EOF >> "$cfgfile"
8114
# func_append var value
8115
# Append VALUE to the end of shell variable VAR.
8123
cat << \_LT_EOF >> "$cfgfile"
8125
# func_append var value
8126
# Append VALUE to the end of shell variable VAR.
8129
eval "$[1]=\$$[1]\$[2]"
8367
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8368
# ------------------------------------------------------
8369
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8370
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8371
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8373
sed -e '/^$1 ()$/,/^} # $1 /c\
8376
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8377
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8378
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8379
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8380
test 0 -eq $? || _lt_function_replace_fail=:
8384
# _LT_PROG_REPLACE_SHELLFNS
8385
# -------------------------
8386
# Replace existing portable implementations of several shell functions with
8387
# equivalent extended shell implementations where those features are available..
8388
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8389
[if test x"$xsi_shell" = xyes; then
8390
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8392
*/*) func_dirname_result="${1%/*}${2}" ;;
8393
* ) func_dirname_result="${3}" ;;
8396
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8397
func_basename_result="${1##*/}"])
8399
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8401
*/*) func_dirname_result="${1%/*}${2}" ;;
8402
* ) func_dirname_result="${3}" ;;
8404
func_basename_result="${1##*/}"])
8406
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8407
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8408
# positional parameters, so assign one to ordinary parameter first.
8409
func_stripname_result=${3}
8410
func_stripname_result=${func_stripname_result#"${1}"}
8411
func_stripname_result=${func_stripname_result%"${2}"}])
8413
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8414
func_split_long_opt_name=${1%%=*}
8415
func_split_long_opt_arg=${1#*=}])
8417
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8418
func_split_short_opt_arg=${1#??}
8419
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8421
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8423
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8424
*) func_lo2o_result=${1} ;;
8427
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8429
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8431
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8434
if test x"$lt_shell_append" = xyes; then
8435
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8437
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8438
func_quote_for_eval "${2}"
8439
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8440
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8442
# Save a `func_append' function call where possible by direct use of '+='
8443
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8444
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8445
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8446
test 0 -eq $? || _lt_function_replace_fail=:
8448
# Save a `func_append' function call even when '+=' is not available
8449
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8450
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8451
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8452
test 0 -eq $? || _lt_function_replace_fail=:
8455
if test x"$_lt_function_replace_fail" = x":"; then
8456
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8460
# _LT_PATH_CONVERSION_FUNCTIONS
8461
# -----------------------------
8462
# Determine which file name conversion functions should be used by
8463
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8464
# for certain cross-compile configurations and native mingw.
8465
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8466
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8467
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8468
AC_MSG_CHECKING([how to convert $build file names to $host format])
8469
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8473
*-*-mingw* ) # actually msys
8474
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8477
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8479
* ) # otherwise, assume *nix
8480
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8486
*-*-mingw* ) # actually msys
8487
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8490
lt_cv_to_host_file_cmd=func_convert_file_noop
8492
* ) # otherwise, assume *nix
8493
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8497
* ) # unhandled hosts (and "normal" native builds)
8498
lt_cv_to_host_file_cmd=func_convert_file_noop
8502
to_host_file_cmd=$lt_cv_to_host_file_cmd
8503
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8504
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8505
[0], [convert $build file names to $host format])dnl
8507
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8508
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8509
[#assume ordinary cross tools, or native build.
8510
lt_cv_to_tool_file_cmd=func_convert_file_noop
8514
*-*-mingw* ) # actually msys
8515
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8521
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8522
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8523
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8524
[0], [convert $build files to toolchain format])dnl
8525
])# _LT_PATH_CONVERSION_FUNCTIONS
8137
8527
# Helper functions for option handling. -*- Autoconf -*-