]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(AC_GNU_SOURCE): New macro.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2002 07:09:12 +0000 (07:09 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2002 07:09:12 +0000 (07:09 +0000)
lib/autoconf/specific.m4

index ddb44a744223e184553e8a62a30fdbb92f35f1c7..9ed600e67866eb535987a741d97bba09dcef36b8 100644 (file)
@@ -1,7 +1,8 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Macros that test for specific, unclassified, features.
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -340,6 +341,20 @@ AC_DEFUN([AC_SYS_POSIX_TERMIOS],
 ## ------------------------------------ ##
 
 
+# AC_GNU_SOURCE
+# --------------
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
+
 # AC_CYGWIN
 # ---------
 # Check for Cygwin.  This is a way to set the right value for