mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 19:23:02 +00:00
build: beware of Clang++ not supporting POSIXLY_CORRECT
* m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New. (BISON_C_COMPILER_POSIXLY_CORRECT): Use it. For consistency with C++, also define BISON_C_WORKS. * m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New. * configure.ac: Use it. * tests/atlocal.in: Get its result. Propagate properly CXX values when used to compile C. When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS. * tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
This commit is contained in:
@@ -58,3 +58,12 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COMPILER],
|
||||
AC_SUBST([BISON_CXX_WORKS])
|
||||
AM_CONDITIONAL(BISON_CXX_WORKS, test $bison_cv_cxx_works = yes)
|
||||
])
|
||||
|
||||
# BISON_CXX_COMPILER_POSIXLY_CORRECT
|
||||
# ----------------------------------
|
||||
# Whether the C++ compiler supports -g in POSIXLY_CORRECT mode.
|
||||
AC_DEFUN([BISON_CXX_COMPILER_POSIXLY_CORRECT],
|
||||
[AC_LANG_PUSH([C++])
|
||||
BISON_LANG_COMPILER_POSIXLY_CORRECT
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user