summaryrefslogtreecommitdiffstats
path: root/gl/m4/extensions.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 +0000
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 +0000
commitbd7029a99b0c2974265c6665638ef14a052f42ab (patch)
treef5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/m4/extensions.m4
parentf99612320d6eda67644c07be04bb21aa4d7789db (diff)
downloadmonitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/extensions.m4')
-rw-r--r--gl/m4/extensions.m452
1 files changed, 38 insertions, 14 deletions
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 143a9e54..bcbb3cee 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,14 +1,14 @@
1# serial 4 -*- Autoconf -*- 1# serial 5 -*- Autoconf -*-
2# Enable extensions on systems that normally disable them. 2# Enable extensions on systems that normally disable them.
3 3
4# Copyright (C) 2003, 2006 Free Software Foundation, Inc. 4# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
8 8
9# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS 9# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
10# Autoconf. Perhaps we can remove this once we can assume Autoconf 10# Autoconf. Perhaps we can remove this once we can assume Autoconf
11# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly 11# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
12# enough in this area it's likely we'll need to redefine 12# enough in this area it's likely we'll need to redefine
13# AC_USE_SYSTEM_EXTENSIONS for quite some time. 13# AC_USE_SYSTEM_EXTENSIONS for quite some time.
14 14
@@ -16,26 +16,48 @@
16# ------------------------ 16# ------------------------
17# Enable extensions on systems that normally disable them, 17# Enable extensions on systems that normally disable them,
18# typically due to standards-conformance issues. 18# typically due to standards-conformance issues.
19# Remember that #undef in AH_VERBATIM gets replaced with #define by
20# AC_DEFINE. The goal here is to define all known feature-enabling
21# macros, then, if reports of conflicts are made, disable macros that
22# cause problems on some platforms (such as __EXTENSIONS__).
19AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], 23AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
20[ 24[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
21 AC_BEFORE([$0], [AC_COMPILE_IFELSE]) 25AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
22 AC_BEFORE([$0], [AC_RUN_IFELSE])
23 26
24 AC_REQUIRE([AC_GNU_SOURCE]) 27 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
25 AC_REQUIRE([AC_AIX]) 28 if test "$MINIX" = yes; then
26 AC_REQUIRE([AC_MINIX]) 29 AC_DEFINE([_POSIX_SOURCE], [1],
30 [Define to 1 if you need to in order for `stat' and other
31 things to work.])
32 AC_DEFINE([_POSIX_1_SOURCE], [2],
33 [Define to 2 if the system does not provide POSIX.1 features
34 except with this defined.])
35 AC_DEFINE([_MINIX], [1],
36 [Define to 1 if on MINIX.])
37 fi
27 38
28 AH_VERBATIM([__EXTENSIONS__], 39 AH_VERBATIM([__EXTENSIONS__],
29[/* Enable extensions on Solaris. */ 40[/* Enable extensions on AIX 3, Interix. */
30#ifndef __EXTENSIONS__ 41#ifndef _ALL_SOURCE
31# undef __EXTENSIONS__ 42# undef _ALL_SOURCE
43#endif
44/* Enable GNU extensions on systems that have them. */
45#ifndef _GNU_SOURCE
46# undef _GNU_SOURCE
32#endif 47#endif
48/* Enable threading extensions on Solaris. */
33#ifndef _POSIX_PTHREAD_SEMANTICS 49#ifndef _POSIX_PTHREAD_SEMANTICS
34# undef _POSIX_PTHREAD_SEMANTICS 50# undef _POSIX_PTHREAD_SEMANTICS
35#endif 51#endif
52/* Enable extensions on HP NonStop. */
36#ifndef _TANDEM_SOURCE 53#ifndef _TANDEM_SOURCE
37# undef _TANDEM_SOURCE 54# undef _TANDEM_SOURCE
38#endif]) 55#endif
56/* Enable general extensions on Solaris. */
57#ifndef __EXTENSIONS__
58# undef __EXTENSIONS__
59#endif
60])
39 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], 61 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
40 [ac_cv_safe_to_define___extensions__], 62 [ac_cv_safe_to_define___extensions__],
41 [AC_COMPILE_IFELSE( 63 [AC_COMPILE_IFELSE(
@@ -46,9 +68,11 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
46 [ac_cv_safe_to_define___extensions__=no])]) 68 [ac_cv_safe_to_define___extensions__=no])])
47 test $ac_cv_safe_to_define___extensions__ = yes && 69 test $ac_cv_safe_to_define___extensions__ = yes &&
48 AC_DEFINE([__EXTENSIONS__]) 70 AC_DEFINE([__EXTENSIONS__])
71 AC_DEFINE([_ALL_SOURCE])
72 AC_DEFINE([_GNU_SOURCE])
49 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) 73 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
50 AC_DEFINE([_TANDEM_SOURCE]) 74 AC_DEFINE([_TANDEM_SOURCE])
51]) 75])# AC_USE_SYSTEM_EXTENSIONS
52 76
53# gl_USE_SYSTEM_EXTENSIONS 77# gl_USE_SYSTEM_EXTENSIONS
54# ------------------------ 78# ------------------------