]> git.saurik.com Git - bison.git/blobdiff - tests/atlocal.in
tests: enhance existing tests with carets
[bison.git] / tests / atlocal.in
index 2f68259288179815590bdc989037ad8a06bc902e..5e3cb723a48837d92e3782cc56616ab3b4b82587 100644 (file)
@@ -79,3 +79,13 @@ LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
 : ${XSLTPROC='@XSLTPROC@'}
 
 : ${PERL='@PERL@'}
+
+# 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.
+: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
+if env | grep '^POSIXLY_CORRECT=' >/dev/null; then
+  POSIXLY_CORRECT_IS_EXPORTED=true
+else
+  POSIXLY_CORRECT_IS_EXPORTED=false
+fi