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.