summaryrefslogtreecommitdiff
path: root/tests/local.at
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-10-26 16:33:20 +0200
committerAkim Demaille <akim@lrde.epita.fr>2012-10-26 16:33:20 +0200
commit71cb558dfe0f9c80e697308a5084de3b9926ee9c (patch)
treefba151ef4aeaf136997219a4564cb27f742b8301 /tests/local.at
parentead713a1767e741f7e5f79d7dc949c0ea837c173 (diff)
parentbb8674a53789875e36d2eee5aacc42b1bc0c2889 (diff)
downloadbison-71cb558dfe0f9c80e697308a5084de3b9926ee9c.tar.gz
Merge branch 'branch-2.6' into maint
* origin/branch-2.6: regen yacc.c: do not define location support when not using locations maint: be compilable with GCC 4.0 tests: address a warning from GCC 4.4 tests: don't use options that Clang does not support tests: restore the tests on -Werror regen parse-gram: update the Bison interface fix comment
Diffstat (limited to 'tests/local.at')
-rw-r--r--tests/local.at12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/local.at b/tests/local.at
index 65ff8870..f172b244 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -462,10 +462,14 @@ m4_define([AT_BISON_CHECK_WARNINGS],
[m4_null_if([$2], [AT_BISON_CHECK_WARNINGS_($@)])])])
m4_define([AT_BISON_CHECK_WARNINGS_],
-[[# Defining POSIXLY_CORRECT causes bison to complain if options
-# are added after the grammar file name, so skip these checks
-# in that case.
-if test -z "${POSIXLY_CORRECT+set}"; then
+[[# Defining POSIXLY_CORRECT causes bison to complain if options are
+# added after the grammar file name, so skip these checks in that
+# case.
+#
+# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
+# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
+# the environment variable.
+if env | grep '^POSIXLY_CORRECT=' >/dev/null; then :; else
]AT_SAVE_SPECIAL_FILES[
# To avoid expanding it repeatedly, store specified stdout.