2010-07-08 Gary V. Vaughan <gary@gnu.org>
+ Rename _LT_PROG_XSI_REPLACE macro to _LT_PROG_FUNCTION_REPLACE.
+ * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Rename to
+ _LT_PROG_REPLACE_SHELLFNS.
+ (_LT_PROG_XSI_REPLACE): Rename to _LT_PROG_FUNCTION_REPLACE.
+ (_LT_PROG_FUNCTION_REPLACE): Change decorator comment to use
+ 'Extended shell' rather than 'XSI' on successful replacement.
+ * libltdl/config/general.m4sh (func_dirname, func_basename)
+ (func_dirname_and_basename, func_stripname): Change decorator
+ comment to use 'extended shell' rather than 'XSI' on fallback
+ implementations.
+ * libltdl/config/getopt.m4sh (func_split_short_opt)
+ (func_split_long_opt): Ditto.
+ * libltdl/config/ltmain.m4sh (func_append, func_append_quoted)
+ (func_arith, func_len, func_lo2o, func_xform): Ditto.
+ * tests/getopt-m4sh.at (_LT_AT_XSI_FUNC_EXTRACT): Rename to
+ _LT_AT_EXTENDED_SHELL_FUNC_EXTRACT.
+ (_LT_AT_EXTENDED_SHELL_FUNC_EXTRACT): Change regular expression to
+ match new replacable function decorator comments.
+
Fix a cut-n-pasto in "2010-07-07 Charles Wilson" patch.
* libltdl/config/ltmain.m4sh (func_mode_link): Remove spurious
variable dereference.
func_append ()
{
eval "${1}=\$${1}\${2}"
-} # func_append may be replaced by XSI optimised implementation
+} # func_append may be replaced by extended shell implementation
# func_append_quoted var value
# Quote VALUE and append to the end of shell variable VAR.
{
func_quote_for_eval "${2}"
eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-} # func_append_quoted may be replaced by XSI optimised implementation
+} # func_append_quoted may be replaced by extended shell implementation
# func_arith arithmetic-term...
func_arith ()
{
func_arith_result=`expr "${@}"`
-} # func_arith may be replaced by XSI optimised implementation
+} # func_arith may be replaced by extended shell implementation
# func_len string
func_len ()
{
func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-} # func_len may be replaced by XSI optimised implementation
+} # func_len may be replaced by extended shell implementation
# func_lo2o object
func_lo2o ()
{
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-} # func_lo2o may be replaced by XSI optimised implementation
+} # func_lo2o may be replaced by extended shell implementation
# func_xform libobj-or-source
func_xform ()
{
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
-} # func_xform may be replaced by XSI optimised implementation
+} # func_xform may be replaced by extended shell implementation
# func_fatal_configuration arg...
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- _LT_PROG_XSI_SHELLFNS
+ _LT_PROG_REPLACE_SHELLFNS
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
])# _LT_CHECK_SHELL_FEATURES
-# _LT_PROG_XSI_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# -------------------------------------------------
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_XSI_REPLACE],
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
[dnl {
sed -e '/^$1 ()$/,/^} # $1 /c\
$1 ()\
{\
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
-} # XSI $1 implementation' "$cfgfile" > $cfgfile.tmp \
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_xsi_replace_fail=:
+test 0 -eq $? || _lt_function_replace_fail=:
])
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
# Replace existing portable implementations of several shell functions with
-# equivalent XSI compatible implementations.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
[if test x"$xsi_shell" = xyes; then
- _LT_PROG_XSI_REPLACE([func_dirname], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
case ${1} in
*/*) func_dirname_result="${1%/*}${2}" ;;
* ) func_dirname_result="${3}" ;;
esac])
- _LT_PROG_XSI_REPLACE([func_basename], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
func_basename_result="${1##*/}"])
- _LT_PROG_XSI_REPLACE([func_dirname_and_basename], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
case ${1} in
*/*) func_dirname_result="${1%/*}${2}" ;;
* ) func_dirname_result="${3}" ;;
esac
func_basename_result="${1##*/}"])
- _LT_PROG_XSI_REPLACE([func_stripname], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
# positional parameters, so assign one to ordinary parameter first.
func_stripname_result=${3}
func_stripname_result=${func_stripname_result#"${1}"}
func_stripname_result=${func_stripname_result%"${2}"}])
- _LT_PROG_XSI_REPLACE([func_split_long_opt], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
func_split_long_opt_name=${1%%=*}
func_split_long_opt_arg=${1#*=}])
- _LT_PROG_XSI_REPLACE([func_split_short_opt], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
func_split_short_opt_arg=${1#??}
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
- _LT_PROG_XSI_REPLACE([func_lo2o], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
case ${1} in
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
*) func_lo2o_result=${1} ;;
esac])
- _LT_PROG_XSI_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
- _LT_PROG_XSI_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
- _LT_PROG_XSI_REPLACE([func_len], [ func_len_result=${#1}])
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
fi
if test x"$lt_shell_append" = xyes; then
- _LT_PROG_XSI_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
- _LT_PROG_XSI_REPLACE([func_append_quoted], [dnl
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
func_quote_for_eval "${2}"
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_xsi_replace_fail=:
+ test 0 -eq $? || _lt_function_replace_fail=:
else
# Save a `func_append' function call even when '+=' is not available
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_xsi_replace_fail=:
+ test 0 -eq $? || _lt_function_replace_fail=:
fi
-if test x"$_lt_xsi_replace_fail" = x":"; then
- AC_MSG_WARN([Unable to substitute faster XSI functions in $ofile])
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
fi
])