diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 12:03:58 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 12:03:58 +0000 |
commit | abbad00edd7f5f3d33ae77a9d5ac338e5bea5fb3 (patch) | |
tree | 0d55fb4d8e5ad7a9376d1bccdea31104cbecacfe /gl/m4 | |
parent | bd7029a99b0c2974265c6665638ef14a052f42ab (diff) | |
download | monitoring-plugins-abbad00edd7f5f3d33ae77a9d5ac338e5bea5fb3.tar.gz |
Import Gnulib floorf and base64 and removed our old base64 library.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1926 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/base64.m4 | 16 | ||||
-rw-r--r-- | gl/m4/floorf.m4 | 62 | ||||
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 4 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 12 | ||||
-rw-r--r-- | gl/m4/math_h.m4 | 66 |
5 files changed, 158 insertions, 2 deletions
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4 new file mode 100644 index 00000000..24801efa --- /dev/null +++ b/gl/m4/base64.m4 | |||
@@ -0,0 +1,16 @@ | |||
1 | # base64.m4 serial 3 | ||
2 | dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_FUNC_BASE64], | ||
8 | [ | ||
9 | gl_PREREQ_BASE64 | ||
10 | ]) | ||
11 | |||
12 | # Prerequisites of lib/base64.c. | ||
13 | AC_DEFUN([gl_PREREQ_BASE64], [ | ||
14 | AC_REQUIRE([AC_C_INLINE]) | ||
15 | AC_REQUIRE([AC_C_RESTRICT]) | ||
16 | ]) | ||
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4 new file mode 100644 index 00000000..8cdaa946 --- /dev/null +++ b/gl/m4/floorf.m4 | |||
@@ -0,0 +1,62 @@ | |||
1 | # floorf.m4 serial 3 | ||
2 | dnl Copyright (C) 2007 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_FUNC_FLOORF], | ||
8 | [ | ||
9 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) | ||
10 | dnl Persuade glibc <math.h> to declare floorf(). | ||
11 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
12 | dnl Test whether floorf() is declared. | ||
13 | AC_CHECK_DECLS([floorf], , , [#include <math.h>]) | ||
14 | if test "$ac_cv_have_decl_floorf" = yes; then | ||
15 | dnl Test whether floorf() can be used without libm. | ||
16 | gl_FUNC_FLOORF_LIBS | ||
17 | if test "$FLOORF_LIBM" = "?"; then | ||
18 | dnl Sun C 5.0 on Solaris declares floorf() and has it in the system-wide | ||
19 | dnl libm.so, but not in the libm.so that the compiler uses. | ||
20 | REPLACE_FLOORF=1 | ||
21 | fi | ||
22 | else | ||
23 | REPLACE_FLOORF=1 | ||
24 | fi | ||
25 | if test $REPLACE_FLOORF = 1; then | ||
26 | AC_LIBOBJ([floorf]) | ||
27 | FLOORF_LIBM= | ||
28 | fi | ||
29 | AC_SUBST([REPLACE_FLOORF]) | ||
30 | AC_SUBST([FLOORF_LIBM]) | ||
31 | ]) | ||
32 | |||
33 | # Determines the libraries needed to get the floorf() function. | ||
34 | # Sets FLOORF_LIBM. | ||
35 | AC_DEFUN([gl_FUNC_FLOORF_LIBS], | ||
36 | [ | ||
37 | AC_CACHE_VAL([gl_cv_func_floorf_libm], [ | ||
38 | gl_cv_func_floorf_libm=? | ||
39 | AC_TRY_LINK([ | ||
40 | #ifndef __NO_MATH_INLINES | ||
41 | # define __NO_MATH_INLINES 1 /* for glibc */ | ||
42 | #endif | ||
43 | #include <math.h> | ||
44 | float x;], | ||
45 | [x = floorf(x);], | ||
46 | [gl_cv_func_floorf_libm=]) | ||
47 | if test "$gl_cv_func_floorf_libm" = "?"; then | ||
48 | save_LIBS="$LIBS" | ||
49 | LIBS="$LIBS -lm" | ||
50 | AC_TRY_LINK([ | ||
51 | #ifndef __NO_MATH_INLINES | ||
52 | # define __NO_MATH_INLINES 1 /* for glibc */ | ||
53 | #endif | ||
54 | #include <math.h> | ||
55 | float x;], | ||
56 | [x = floorf(x);], | ||
57 | [gl_cv_func_floorf_libm="-lm"]) | ||
58 | LIBS="$save_LIBS" | ||
59 | fi | ||
60 | ]) | ||
61 | FLOORF_LIBM="$gl_cv_func_floorf_libm" | ||
62 | ]) | ||
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 6da4d657..302dc191 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 | |||
@@ -15,11 +15,11 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | # Specification in the form of a command-line invocation: | 17 | # Specification in the form of a command-line invocation: |
18 | # gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl dirname fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf | 18 | # gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl base64 dirname floorf fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf |
19 | 19 | ||
20 | # Specification in the form of a few gnulib-tool.m4 macro invocations: | 20 | # Specification in the form of a few gnulib-tool.m4 macro invocations: |
21 | gl_LOCAL_DIR([]) | 21 | gl_LOCAL_DIR([]) |
22 | gl_MODULES([dirname fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf]) | 22 | gl_MODULES([base64 dirname floorf fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf]) |
23 | gl_AVOID([]) | 23 | gl_AVOID([]) |
24 | gl_SOURCE_BASE([gl]) | 24 | gl_SOURCE_BASE([gl]) |
25 | gl_M4_BASE([gl/m4]) | 25 | gl_M4_BASE([gl/m4]) |
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index a17e36ad..85ad2e9d 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 | |||
@@ -44,6 +44,7 @@ AC_DEFUN([gl_INIT], | |||
44 | gl_FUNC_ALLOCA | 44 | gl_FUNC_ALLOCA |
45 | gl_HEADER_ARPA_INET | 45 | gl_HEADER_ARPA_INET |
46 | AC_PROG_MKDIR_P | 46 | AC_PROG_MKDIR_P |
47 | gl_FUNC_BASE64 | ||
47 | gl_C_STRTOD | 48 | gl_C_STRTOD |
48 | gl_CLOEXEC | 49 | gl_CLOEXEC |
49 | gl_DIRNAME | 50 | gl_DIRNAME |
@@ -56,6 +57,8 @@ AC_DEFUN([gl_INIT], | |||
56 | gl_FCNTL_SAFER | 57 | gl_FCNTL_SAFER |
57 | gl_MODULE_INDICATOR([fcntl-safer]) | 58 | gl_MODULE_INDICATOR([fcntl-safer]) |
58 | gl_FLOAT_H | 59 | gl_FLOAT_H |
60 | gl_FUNC_FLOORF | ||
61 | gl_MATH_MODULE_INDICATOR([floorf]) | ||
59 | gl_FSUSAGE | 62 | gl_FSUSAGE |
60 | gl_GETADDRINFO | 63 | gl_GETADDRINFO |
61 | gl_FUNC_GETHOSTNAME | 64 | gl_FUNC_GETHOSTNAME |
@@ -74,6 +77,7 @@ AC_DEFUN([gl_INIT], | |||
74 | AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.]) | 77 | AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.]) |
75 | gl_FUNC_MALLOC_POSIX | 78 | gl_FUNC_MALLOC_POSIX |
76 | gl_STDLIB_MODULE_INDICATOR([malloc-posix]) | 79 | gl_STDLIB_MODULE_INDICATOR([malloc-posix]) |
80 | gl_MATH_H | ||
77 | gl_MOUNTLIST | 81 | gl_MOUNTLIST |
78 | gl_HEADER_NETINET_IN | 82 | gl_HEADER_NETINET_IN |
79 | AC_PROG_MKDIR_P | 83 | AC_PROG_MKDIR_P |
@@ -240,6 +244,8 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
240 | lib/alloca.in.h | 244 | lib/alloca.in.h |
241 | lib/asnprintf.c | 245 | lib/asnprintf.c |
242 | lib/asprintf.c | 246 | lib/asprintf.c |
247 | lib/base64.c | ||
248 | lib/base64.h | ||
243 | lib/basename.c | 249 | lib/basename.c |
244 | lib/c-strtod.c | 250 | lib/c-strtod.c |
245 | lib/c-strtod.h | 251 | lib/c-strtod.h |
@@ -259,6 +265,8 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
259 | lib/fd-safer.c | 265 | lib/fd-safer.c |
260 | lib/float+.h | 266 | lib/float+.h |
261 | lib/float.in.h | 267 | lib/float.in.h |
268 | lib/floor.c | ||
269 | lib/floorf.c | ||
262 | lib/fsusage.c | 270 | lib/fsusage.c |
263 | lib/fsusage.h | 271 | lib/fsusage.h |
264 | lib/full-read.c | 272 | lib/full-read.c |
@@ -281,6 +289,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
281 | lib/localcharset.c | 289 | lib/localcharset.c |
282 | lib/localcharset.h | 290 | lib/localcharset.h |
283 | lib/malloc.c | 291 | lib/malloc.c |
292 | lib/math.in.h | ||
284 | lib/mountlist.c | 293 | lib/mountlist.c |
285 | lib/mountlist.h | 294 | lib/mountlist.h |
286 | lib/netinet_in.in.h | 295 | lib/netinet_in.in.h |
@@ -333,6 +342,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
333 | m4/absolute-header.m4 | 342 | m4/absolute-header.m4 |
334 | m4/alloca.m4 | 343 | m4/alloca.m4 |
335 | m4/arpa_inet_h.m4 | 344 | m4/arpa_inet_h.m4 |
345 | m4/base64.m4 | ||
336 | m4/c-strtod.m4 | 346 | m4/c-strtod.m4 |
337 | m4/cloexec.m4 | 347 | m4/cloexec.m4 |
338 | m4/codeset.m4 | 348 | m4/codeset.m4 |
@@ -345,6 +355,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
345 | m4/extensions.m4 | 355 | m4/extensions.m4 |
346 | m4/fcntl-safer.m4 | 356 | m4/fcntl-safer.m4 |
347 | m4/float_h.m4 | 357 | m4/float_h.m4 |
358 | m4/floorf.m4 | ||
348 | m4/fstypename.m4 | 359 | m4/fstypename.m4 |
349 | m4/fsusage.m4 | 360 | m4/fsusage.m4 |
350 | m4/getaddrinfo.m4 | 361 | m4/getaddrinfo.m4 |
@@ -376,6 +387,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
376 | m4/longlong.m4 | 387 | m4/longlong.m4 |
377 | m4/ls-mntd-fs.m4 | 388 | m4/ls-mntd-fs.m4 |
378 | m4/malloc.m4 | 389 | m4/malloc.m4 |
390 | m4/math_h.m4 | ||
379 | m4/mountlist.m4 | 391 | m4/mountlist.m4 |
380 | m4/netinet_in_h.m4 | 392 | m4/netinet_in_h.m4 |
381 | m4/nls.m4 | 393 | m4/nls.m4 |
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 new file mode 100644 index 00000000..dd99e7f2 --- /dev/null +++ b/gl/m4/math_h.m4 | |||
@@ -0,0 +1,66 @@ | |||
1 | # math_h.m4 serial 9 | ||
2 | dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_MATH_H], | ||
8 | [ | ||
9 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) | ||
10 | gl_CHECK_NEXT_HEADERS([math.h]) | ||
11 | ]) | ||
12 | |||
13 | AC_DEFUN([gl_MATH_MODULE_INDICATOR], | ||
14 | [ | ||
15 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | ||
16 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) | ||
17 | GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | ||
18 | ]) | ||
19 | |||
20 | AC_DEFUN([gl_MATH_H_DEFAULTS], | ||
21 | [ | ||
22 | GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) | ||
23 | GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) | ||
24 | GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) | ||
25 | GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) | ||
26 | GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) | ||
27 | GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) | ||
28 | GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) | ||
29 | GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) | ||
30 | GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL]) | ||
31 | GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) | ||
32 | GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) | ||
33 | GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) | ||
34 | GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) | ||
35 | GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) | ||
36 | GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) | ||
37 | GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) | ||
38 | dnl Assume proper GNU behavior unless another module says otherwise. | ||
39 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) | ||
40 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) | ||
41 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) | ||
42 | HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) | ||
43 | HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) | ||
44 | HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) | ||
45 | HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) | ||
46 | HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) | ||
47 | HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) | ||
48 | HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) | ||
49 | HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) | ||
50 | HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) | ||
51 | HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) | ||
52 | HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) | ||
53 | REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) | ||
54 | REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) | ||
55 | REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) | ||
56 | REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) | ||
57 | REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) | ||
58 | REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) | ||
59 | REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) | ||
60 | REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) | ||
61 | REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) | ||
62 | REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) | ||
63 | REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) | ||
64 | REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) | ||
65 | REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) | ||
66 | ]) | ||