diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-07-31 11:54:12 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-07-31 12:00:28 -0700 |
commit | d95df5028d37b6d347e3afcdb349c182b0a6ce4c (patch) | |
tree | 1b5b77de99bd4ceddae9c205dcd6e7e5f6d6bc4f | |
parent | 4e89da6e5d1d67e5a6652ada21f97ead079702f3 (diff) | |
download | bison-d95df5028d37b6d347e3afcdb349c182b0a6ce4c.tar.gz |
maint: improve Gnulib checking
* configure.ac: With --enable-gcc-warnings, #define lint,
_FORTIFY_SOURCE, and GNULIB_PORT_CHECK, to better check Gnulib.
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 08ea7cdf..442874d6 100644 --- a/configure.ac +++ b/configure.ac @@ -226,6 +226,16 @@ if test "$enable_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-deprecated], [WNO_DEPRECATED_CXXFLAGS]) CXXFLAGS=$save_CXXFLAGS AC_LANG_POP([C++]) + + AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting glibc 2.15+. */ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + ]) + AC_DEFINE([GNULIB_PORTCHECK], [1], [Enable some gnulib portability checks.]) fi |