X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/2b45240d6c1b9177533aa5d83ac1c879198111c5..c6b1772473d0a26faa22464df98718d0d0ae2e2e:/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"