+2010-06-29 Gary V. Vaughan <gary@gnu.org>
+
+ Use a real XSI compliant func_split_short_opt substitution.
+ * libtool/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Remove
+ test ${foo:n:m} substrings, instead adding a ${foo%??} check
+ to the existing XSI tests.
+ (_LT_PROG_XSI_SHELLFNS): Remove the ${foo:n:m} based
+ func_split_short_opt substitution in favour of a properly
+ XSI compliant substitution.
+ Suggested by Paolo Bonzini.
+
2010-06-28 Gary V. Vaughan <gary@gnu.org>
Add func_append_quoted and do inline func_append substitutions.
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
AC_MSG_RESULT([$lt_shell_append])
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-AC_MSG_CHECKING([whether the shell understands variable substring :-syntax])
-lt_shell_substring=no
-( _lt_dummy="-bar"
- test "${_lt_dummy:0:2},${_lt_dummy:2}" = -b,ar ) >/dev/null 2>&1 \
-&& lt_shell_substring=yes
-AC_MSG_RESULT([$lt_shell_substring])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_substring='$lt_shell_substring'])
-
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
func_split_long_opt_name=${1%%=*}
func_split_long_opt_arg=${1#*=}])
+ _LT_PROG_XSI_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
case ${1} in
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
test 0 -eq $? || _lt_xsi_replace_fail=:
fi
-if test x"$lt_shell_substring" = xyes; then
- _LT_PROG_XSI_REPLACE([func_split_short_opt], [dnl
- func_split_short_opt_name=${1:0:2}
- func_split_short_opt_arg=${1:2}])
-fi
-
if test x"$_lt_xsi_replace_fail" = x":"; then
AC_MSG_WARN([Unable to substitute faster XSI functions in $ofile])
fi