summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7f99fe62..60f6ad85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,9 +158,12 @@ if test "$gl_gcc_warnings" = yes; then
AC_SUBST([WARN_CFLAGS])
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
- AC_DEFINE([_FORTIFY_SOURCE], [2],
- [enable compile-time and run-time bounds-checking, and some warnings])
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
+ AH_VERBATIM([FORTIFY_SOURCE],
+ [/* Enable compile-time and run-time bounds-checking, and some warnings. */
+#if __OPTIMIZE__
+# define _FORTIFY_SOURCE 2
+#endif])
fi
AC_C_PROTOTYPES