From: Gary V. Vaughan Date: Tue, 29 Jun 2010 09:29:30 +0000 (+0700) Subject: Use a real XSI compliant func_split_short_opt substitution. X-Git-Tag: v2.4~128 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6639fdbe2fe01d54f4bd21414c9bf6b7ec99f18b;p=thirdparty%2Flibtool.git 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. Signed-off-by: Gary V. Vaughan --- diff --git a/ChangeLog b/ChangeLog index e939f4358..0a09fae2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-06-29 Gary V. Vaughan + + 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 Add func_append_quoted and do inline func_append substitutions. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 01a9c41c7..714062795 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -7211,8 +7211,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], # 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 @@ -7227,14 +7227,6 @@ lt_shell_append=no 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 @@ -7309,6 +7301,10 @@ m4_defun([_LT_PROG_XSI_SHELLFNS], 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} ;; @@ -7343,12 +7339,6 @@ else 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