X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/321d3e35d52c3a118e4fd574ec63e667c330a40e..505ece51710209eb4aba50166f8f7ddc57d0562b:/tests/atlocal.in diff --git a/tests/atlocal.in b/tests/atlocal.in index 2f682592..5e3cb723 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -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