* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Work around expr bug returning 0 instead of the empty string. * lib/autotest/general.m4 (AT_INIT): Likewise.
Signed-off-by: Ralf Wildenhues <ralf.wildenh...@gmx.de> --- * Ralf Wildenhues wrote on Tue, Jul 20, 2010 at 07:09:03AM CEST: > I don't get it, esp. I don't get why I haven't seen this anywhere > before. This is with bash 3.2.39 on Debian GNU/Linux x86. Can anyone > confirm this failure? Otherwise I guess I should go looking for weird > stuff in my setup. > > Anyway, rerunning > ./micro-suite -x 1 FROB=default FROB_ARG= > > in the test directory does not show any failures. Ah, a leftover $builddir/tests/expr from maintainer-check-posix. This patch aims to fix the both instances I found at a glance. I'm running out of time for adding tests or verifying that maintainer-check-posix already exposes the issues, or that there are no further issues; sorry. Cheers, Ralf ChangeLog | 5 +++++ lib/autoconf/general.m4 | 5 +++-- lib/autotest/general.m4 | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2a81e5a..edcb8c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-07-20 Ralf Wildenhues <ralf.wildenh...@gmx.de> + Fix parsing of empty variable settings on the command line. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Work around + expr bug returning 0 instead of the empty string. + * lib/autotest/general.m4 (AT_INIT): Likewise. + Let autoreconf pass warning flags to new-enough aclocal. * bin/autoreconf.in ($aclocal_supports_warnings) ($automake_supports_warnings): New globals. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 477c4ab..bb18845 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -613,8 +613,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 2b46705..e27d601 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -474,8 +474,8 @@ do fi case $at_option in - *=*) at_optarg=`expr "x$at_option" : 'x[[^=]]*=\(.*\)'` ;; - *) at_optarg= ;; + *=?*) at_optarg=`expr "X$at_option" : '[[^=]]*=\(.*\)'` ;; + *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. -- 1.7.2.rc3.47.g996ce