summaryrefslogtreecommitdiffstats
path: root/gl/m4
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-18 09:03:36 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-18 09:03:36 (GMT)
commitf3dbc2ec871da22028969540424a63ff51404cfd (patch)
tree4225e3007008839ec710fcc17ed6cc9bf8db748c /gl/m4
parent5c8dd483ccc5f4cf2d86c4ae386efb86e3b259cd (diff)
downloadmonitoring-plugins-f3dbc2ec871da22028969540424a63ff51404cfd.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/fcntl-o.m48
-rw-r--r--gl/m4/fsusage.m428
-rw-r--r--gl/m4/gnulib-comp.m42
-rw-r--r--gl/m4/lib-link.m44
-rw-r--r--gl/m4/malloc.m431
-rw-r--r--gl/m4/stdlib_h.m412
6 files changed, 62 insertions, 23 deletions
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index d416a61..1adacc8 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,4 +1,4 @@
1# fcntl-o.m4 serial 1 1# fcntl-o.m4 serial 2
2dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,11 @@ dnl Written by Paul Eggert.
12AC_DEFUN([gl_FCNTL_O_FLAGS], 12AC_DEFUN([gl_FCNTL_O_FLAGS],
13[ 13[
14 dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. 14 dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
15 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 15 dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
16 dnl AC_GNU_SOURCE.
17 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
18 [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
19 [AC_REQUIRE([AC_GNU_SOURCE])])
16 AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], 20 AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
17 [AC_RUN_IFELSE( 21 [AC_RUN_IFELSE(
18 [AC_LANG_PROGRAM( 22 [AC_LANG_PROGRAM(
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4
index 216b9dd..68684c2 100644
--- a/gl/m4/fsusage.m4
+++ b/gl/m4/fsusage.m4
@@ -1,4 +1,4 @@
1# serial 25 1# serial 26
2# Obtaining file system usage information. 2# Obtaining file system usage information.
3 3
4# Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc. 4# Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc.
@@ -44,7 +44,8 @@ ac_fsusage_space=no
44# systems. That system is reported to work fine with STAT_STATFS4 which 44# systems. That system is reported to work fine with STAT_STATFS4 which
45# is what it gets when this test fails. 45# is what it gets when this test fails.
46if test $ac_fsusage_space = no; then 46if test $ac_fsusage_space = no; then
47 # SVR4 47 # glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0,
48 # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
48 AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], 49 AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs],
49 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 50 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
50#if defined __GLIBC__ && defined __linux__ 51#if defined __GLIBC__ && defined __linux__
@@ -97,8 +98,13 @@ if test $ac_fsusage_space = no; then
97fi 98fi
98 99
99if test $ac_fsusage_space = no; then 100if test $ac_fsusage_space = no; then
100# AIX 101 # glibc/Linux, MacOS X < 10.4, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
101 AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl 102 # (glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0,
103 # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)
104 # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and
105 # <sys/vfs.h>.)
106 # (On Solaris, statfs has 4 arguments.)
107 AC_MSG_CHECKING([for two-argument statfs with statfs.f_bsize dnl
102member (AIX, 4.3BSD)]) 108member (AIX, 4.3BSD)])
103 AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], 109 AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize],
104 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ 110 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -131,7 +137,8 @@ member (AIX, 4.3BSD)])
131fi 137fi
132 138
133if test $ac_fsusage_space = no; then 139if test $ac_fsusage_space = no; then
134# SVR3 140 # SVR3
141 # (Solaris already handled above.)
135 AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) 142 AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
136 AC_CACHE_VAL([fu_cv_sys_stat_statfs4], 143 AC_CACHE_VAL([fu_cv_sys_stat_statfs4],
137 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ 144 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -150,13 +157,17 @@ if test $ac_fsusage_space = no; then
150 if test $fu_cv_sys_stat_statfs4 = yes; then 157 if test $fu_cv_sys_stat_statfs4 = yes; then
151 ac_fsusage_space=yes 158 ac_fsusage_space=yes
152 AC_DEFINE([STAT_STATFS4], [1], 159 AC_DEFINE([STAT_STATFS4], [1],
153 [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) 160 [ Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, Dolphin)])
154 fi 161 fi
155fi 162fi
156 163
157if test $ac_fsusage_space = no; then 164if test $ac_fsusage_space = no; then
158# 4.4BSD and NetBSD 165 # 4.4BSD and older NetBSD
159 AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl 166 # (OSF/1 already handled above.)
167 # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.)
168 # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in
169 # <sys/mount.h>.)
170 AC_MSG_CHECKING([for two-argument statfs with statfs.f_fsize dnl
160member (4.4BSD and NetBSD)]) 171member (4.4BSD and NetBSD)])
161 AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], 172 AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize],
162 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ 173 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -223,6 +234,7 @@ fi
223 234
224if test $ac_fsusage_space = no; then 235if test $ac_fsusage_space = no; then
225 # SVR2 236 # SVR2
237 # (AIX, HP-UX, OSF/1 already handled above.)
226 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h> 238 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h>
227 ]])], 239 ]])],
228 [AC_DEFINE([STAT_READ_FILSYS], [1], 240 [AC_DEFINE([STAT_READ_FILSYS], [1],
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index fc3f353..b5e6b43 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -254,7 +254,7 @@ AC_DEFUN([gl_INIT],
254 # Code from module locale: 254 # Code from module locale:
255 gl_LOCALE_H 255 gl_LOCALE_H
256 # Code from module malloc: 256 # Code from module malloc:
257 AC_FUNC_MALLOC 257 gl_FUNC_MALLOC_GNU
258 AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.]) 258 AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
259 # Code from module malloc-posix: 259 # Code from module malloc-posix:
260 gl_FUNC_MALLOC_POSIX 260 gl_FUNC_MALLOC_POSIX
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 59b367d..9f3be3a 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,4 +1,4 @@
1# lib-link.m4 serial 23 (gettext-0.18.2) 1# lib-link.m4 serial 24 (gettext-0.18.2)
2dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -165,7 +165,7 @@ AC_DEFUN([AC_LIB_FROMPACKAGE],
165 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], 165 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
166 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 166 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
167 define([acl_libsinpackage_]PACKUP, 167 define([acl_libsinpackage_]PACKUP,
168 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) 168 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
169 popdef([PACKUP]) 169 popdef([PACKUP])
170 popdef([PACK]) 170 popdef([PACK])
171]) 171])
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 910ac92..fe5befc 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,25 +1,40 @@
1# malloc.m4 serial 9 1# malloc.m4 serial 10
2dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7# gl_FUNC_MALLOC_GNU
8# ------------------
9# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
10# it is not.
11AC_DEFUN([gl_FUNC_MALLOC_GNU],
12[
13 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
14 dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
15 _AC_FUNC_MALLOC_IF(
16 [AC_DEFINE([HAVE_MALLOC], [1],
17 [Define to 1 if your system has a GNU libc compatible 'malloc'
18 function, and to 0 otherwise.])],
19 [AC_DEFINE([HAVE_MALLOC], [0])
20 gl_REPLACE_MALLOC
21 ])
22])
23
7# gl_FUNC_MALLOC_POSIX 24# gl_FUNC_MALLOC_POSIX
8# -------------------- 25# --------------------
9# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it 26# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
10# fails), and replace malloc if it is not. 27# fails), and replace malloc if it is not.
11AC_DEFUN([gl_FUNC_MALLOC_POSIX], 28AC_DEFUN([gl_FUNC_MALLOC_POSIX],
12[ 29[
30 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
13 AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) 31 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
14 if test $gl_cv_func_malloc_posix = yes; then 32 if test $gl_cv_func_malloc_posix = yes; then
15 HAVE_MALLOC_POSIX=1
16 AC_DEFINE([HAVE_MALLOC_POSIX], [1], 33 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
17 [Define if the 'malloc' function is POSIX compliant.]) 34 [Define if the 'malloc' function is POSIX compliant.])
18 else 35 else
19 AC_LIBOBJ([malloc]) 36 gl_REPLACE_MALLOC
20 HAVE_MALLOC_POSIX=0
21 fi 37 fi
22 AC_SUBST([HAVE_MALLOC_POSIX])
23]) 38])
24 39
25# Test whether malloc, realloc, calloc are POSIX compliant, 40# Test whether malloc, realloc, calloc are POSIX compliant,
@@ -39,3 +54,9 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
39 ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) 54 ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
40 ]) 55 ])
41]) 56])
57
58AC_DEFUN([gl_REPLACE_MALLOC],
59[
60 AC_LIBOBJ([malloc])
61 REPLACE_MALLOC=1
62])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index dd84796..fc15019 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
1# stdlib_h.m4 serial 28 1# stdlib_h.m4 serial 30
2dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@ AC_DEFUN([gl_STDLIB_H],
33#if HAVE_RANDOM_H 33#if HAVE_RANDOM_H
34# include <random.h> 34# include <random.h>
35#endif 35#endif
36 ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp 36 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
37 mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r 37 mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
38 setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt 38 setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
39 unsetenv]) 39 unsetenv])
@@ -50,6 +50,7 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
50 50
51AC_DEFUN([gl_STDLIB_H_DEFAULTS], 51AC_DEFUN([gl_STDLIB_H_DEFAULTS],
52[ 52[
53 GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT])
53 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) 54 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
54 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) 55 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
55 GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) 56 GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
@@ -75,13 +76,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
75 GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) 76 GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
76 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) 77 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
77 dnl Assume proper GNU behavior unless another module says otherwise. 78 dnl Assume proper GNU behavior unless another module says otherwise.
79 HAVE__EXIT=1; AC_SUBST([HAVE__EXIT])
78 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) 80 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
79 HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
80 HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) 81 HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
81 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) 82 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
82 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) 83 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
83 HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) 84 HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
84 HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
85 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) 85 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
86 HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) 86 HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
87 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) 87 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
@@ -89,7 +89,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
89 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) 89 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
90 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) 90 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
91 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) 91 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
92 HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
93 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) 92 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
94 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) 93 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
95 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) 94 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
@@ -100,9 +99,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
100 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) 99 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
101 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) 100 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
102 HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) 101 HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
102 REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC])
103 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) 103 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
104 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
104 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) 105 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
105 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) 106 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
107 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
106 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) 108 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
107 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) 109 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
108 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) 110 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])