Don't check for non-POSIX extensions in suggested tests.

* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_WORKS): Remove suggestion;
we still use += if available, but should not reject shells (like
dash) that don't provide it.
(_AS_DETECT_SUGGESTED): Document a policy for m4sh.
Reported by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake 2008-10-30 09:39:57 -06:00
parent 26e664439c
commit 4f4ffdc6a6
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2008-10-30 Eric Blake <ebb9@byu.net>
Don't check for non-POSIX extensions in suggested tests.
* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_WORKS): Remove suggestion;
we still use += if available, but should not reject shells (like
dash) that don't provide it.
(_AS_DETECT_SUGGESTED): Document a policy for m4sh.
Reported by Paolo Bonzini.
2008-10-30 Paolo Bonzini <bonzini@gnu.org>
Pass CONFIG_SHELL down to generated scripts, and re-export SHELL.

View File

@ -173,6 +173,9 @@ m4_define([_AS_DETECT_EXPAND],
# -------------------------
# Refuse to execute under a shell that does not pass the given TEST.
# Does not do AS_REQUIRE for the better-shell detection code.
#
# M4sh should never require something not required by POSIX, although
# other clients are free to do so.
m4_defun([_AS_DETECT_REQUIRED],
[m4_set_add([_AS_DETECT_REQUIRED_BODY], [$1 || AS_EXIT])])
@ -181,6 +184,9 @@ m4_defun([_AS_DETECT_REQUIRED],
# --------------------------
# Prefer to execute under a shell that passes the given TEST.
# Does not do AS_REQUIRE for the better-shell detection code.
#
# M4sh should never suggest something not required by POSIX, although
# other clients are free to do so.
m4_defun([_AS_DETECT_SUGGESTED],
[m4_set_add([_AS_DETECT_SUGGESTED_BODY], [$1 || AS_EXIT])])
@ -1682,7 +1688,6 @@ m4_define([_AS_VAR_APPEND_WORKS],
# Note that unlike AS_VAR_SET, VALUE must be properly quoted to avoid
# field splitting and file name expansion.
m4_defun_init([AS_VAR_APPEND],
[_AS_DETECT_SUGGESTED([_AS_VAR_APPEND_WORKS])]dnl
[AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])],
[as_func_append $1 $2])