tests: beware of compilers that do not support POSIXLY_CORRECT

Running "maintainer-release-check" on OS X with Clang 2.9 fails,
because "clang-mp-2.9 -o test -g test.c" launches "/usr/bin/dsymutil
test -o test.dSYM" which fails with "error: unable to open executable
'-o'".

* m4/c-working.m4 (BISON_CHECK_WITH_POSIXLY_CORRECT)
(BISON_C_COMPILER_POSIXLY_CORRECT): New.
* configure.ac: Use the latter.
* tests/atlocal.in (POSIXLY_CORRECT_IS_EXPORTED): New.
* tests/local.at (AT_BISON_CHECK_WARNINGS_): Use it instead of computing its
value each time.
(AT_QUELL_VALGRIND): Skip tests that cannot work because of compilers
that do not support POSIXLY_CORRECT.
This commit is contained in:
Akim Demaille
2012-11-07 17:23:06 +01:00
parent 5a000c51f7
commit 0a36880ad1
4 changed files with 60 additions and 6 deletions

View File

@@ -114,6 +114,7 @@ fi
BISON_TEST_FOR_WORKING_C_COMPILER
BISON_TEST_FOR_WORKING_CXX_COMPILER
BISON_C_COMPILER_POSIXLY_CORRECT
AC_ARG_ENABLE([yacc],
[AC_HELP_STRING([--disable-yacc],