summaryrefslogtreecommitdiffstats
path: root/gl/m4/extensions.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-15 04:22:57 -0500
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-15 05:19:08 -0500
commit71cdb52799220f8d9052643baf1d3e9836a9c755 (patch)
tree27aee97a35d9ab51f0d8f64a46690bd41a5f8c1b /gl/m4/extensions.m4
parentf7afa46586645e50498d8b2d0c67884f014dc3a4 (diff)
downloadmonitoring-plugins-71cdb52799220f8d9052643baf1d3e9836a9c755.tar.gz
Sync with gnulib
Diffstat (limited to 'gl/m4/extensions.m4')
-rw-r--r--gl/m4/extensions.m420
1 files changed, 16 insertions, 4 deletions
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index bcbb3cee..611fcfdb 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
1# serial 5 -*- Autoconf -*- 1# serial 6 -*- 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, 2007 Free Software Foundation, Inc. 4# Copyright (C) 2003, 2006-2008 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.
@@ -24,6 +24,8 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
24[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl 24[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
25AC_BEFORE([$0], [AC_RUN_IFELSE])dnl 25AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
26 26
27 AC_REQUIRE([AC_CANONICAL_HOST])
28
27 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) 29 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
28 if test "$MINIX" = yes; then 30 if test "$MINIX" = yes; then
29 AC_DEFINE([_POSIX_SOURCE], [1], 31 AC_DEFINE([_POSIX_SOURCE], [1],
@@ -36,6 +38,16 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
36 [Define to 1 if on MINIX.]) 38 [Define to 1 if on MINIX.])
37 fi 39 fi
38 40
41 dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
42 dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
43 dnl provided.
44 case "$host_os" in
45 hpux*)
46 AC_DEFINE([_XOPEN_SOURCE], [500],
47 [Define to 500 only on HP-UX.])
48 ;;
49 esac
50
39 AH_VERBATIM([__EXTENSIONS__], 51 AH_VERBATIM([__EXTENSIONS__],
40[/* Enable extensions on AIX 3, Interix. */ 52[/* Enable extensions on AIX 3, Interix. */
41#ifndef _ALL_SOURCE 53#ifndef _ALL_SOURCE
@@ -61,9 +73,9 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
61 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], 73 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
62 [ac_cv_safe_to_define___extensions__], 74 [ac_cv_safe_to_define___extensions__],
63 [AC_COMPILE_IFELSE( 75 [AC_COMPILE_IFELSE(
64 [AC_LANG_PROGRAM([ 76 [AC_LANG_PROGRAM([[
65# define __EXTENSIONS__ 1 77# define __EXTENSIONS__ 1
66 AC_INCLUDES_DEFAULT])], 78 ]AC_INCLUDES_DEFAULT])],
67 [ac_cv_safe_to_define___extensions__=yes], 79 [ac_cv_safe_to_define___extensions__=yes],
68 [ac_cv_safe_to_define___extensions__=no])]) 80 [ac_cv_safe_to_define___extensions__=no])])
69 test $ac_cv_safe_to_define___extensions__ = yes && 81 test $ac_cv_safe_to_define___extensions__ = yes &&