(jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new AH_VERBATIM
authorJim Meyering <jim@meyering.net>
Thu, 13 Apr 2000 08:15:01 +0000 (08:15 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 13 Apr 2000 08:15:01 +0000 (08:15 +0000)
to insert required #ifndef into config.h.in.
Suggestion from Akim Demaille.

m4/jm-macros.m4

index 317ea28c85f6a92c1a6e1cf5dc789e77ecb0d3a1..63319cd8466106d3455aa749e79ad83ec84820ab 100644 (file)
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
 
 dnl Misc type-related macros for fileutils, sh-utils, textutils.
 
@@ -195,9 +195,13 @@ AC_DEFUN(jm_MACROS,
 # This macro must be invoked before any tests that run the compiler.
 AC_DEFUN(jm_CHECK_ALL_TYPES,
 [
+  # Emit this code into config.h.in.
+  # The ifndef is to avoid redefinition warnings.
+  AH_VERBATIM([_GNU_SOURCE], [#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])
+
   # Enable GNU extensions.
-  # Define this here, not in acconfig's @TOP@ section, since definitions
-  # in the latter don't make it into the configure-time tests.
   AC_DEFINE([_GNU_SOURCE], 1,
     [Enable GNU extensions on systems that have them.])