X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6c05543cb03b40b9728f7073c4073ce993d796c6..f3ead217b8636f623399e66bd937b1c51774d4af:/m4/c-working.m4 diff --git a/m4/c-working.m4 b/m4/c-working.m4 index fbc6da44..ee84acf9 100644 --- a/m4/c-working.m4 +++ b/m4/c-working.m4 @@ -25,3 +25,47 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_C_COMPILER], [ [], [AC_MSG_FAILURE([cannot compile a simple C program])]) ]) + +# BISON_CHECK_WITH_POSIXLY_CORRECT(CODE) +# -------------------------------------- +# Run the Autoconf CODE with POSIXLY_CORRECT set to 1, and restored to +# its initial value afterwards. +AC_DEFUN([BISON_CHECK_WITH_POSIXLY_CORRECT], +[gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' +case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe"