diff options
author | Eric Blake <eblake@redhat.com> | 2010-07-20 08:06:16 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-07-20 09:03:11 -0600 |
commit | 82f7cdadbbde10fa0b4ff11ce0311857258a08de (patch) | |
tree | 9ece0d54e4b4a28ebf6518ef8bcd46f06a726d22 /lib/autoconf/status.m4 | |
parent | a759826d2198c94761bc8f92847501b58253fc3a (diff) | |
download | autoconf-82f7cdadbbde10fa0b4ff11ce0311857258a08de.tar.gz |
Another empty argument through expr workaround.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Detect empty
arguments. Reject empty file argument.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Check for missing argument.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib/autoconf/status.m4')
-rw-r--r-- | lib/autoconf/status.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index b9e70264..56190a42 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -1464,11 +1464,16 @@ ac_need_defaults=: while test $[#] != 0 do case $[1] in - --*=*) + --*=?*) ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='` ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$[1] ac_optarg=$[2] @@ -1491,6 +1496,7 @@ m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl $ac_shift case $ac_optarg in *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;; + '') AC_MSG_ERROR([missing file argument]) ;; esac AS_VAR_APPEND([CONFIG_FILES], [" '$ac_optarg'"]) ac_need_defaults=false;; |