From f3c508423fb6c5ef8bc45c613b05dedf76a1f24e Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 20 Jul 2010 07:58:14 +0200 Subject: [PATCH] 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. Signed-off-by: Ralf Wildenhues --- 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 14feb764..76e77c35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-07-20 Ralf Wildenhues + 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. + Fix typo in the manual. * doc/autoconf.texi (AC_ACT_IFELSE vs AC_TRY_ACT): Fix typo. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 477c4ab8..bb188459 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 2b46705f..e27d6011 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.