diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-15 20:51:47 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-15 20:51:47 +0000 |
commit | 6fff4bcdcf97412a6d1422991ea9fe5e8a203e75 (patch) | |
tree | 6494851815282f4b27829a7f10b8ca522aa7668e /m4/onceonly.m4 | |
parent | 82d1989d3245791c9fac22ca848f5497f261c10b (diff) | |
download | monitoring-plugins-6fff4bcdcf97412a6d1422991ea9fe5e8a203e75.tar.gz |
Moving m4 files from lib/
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1028 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'm4/onceonly.m4')
-rw-r--r-- | m4/onceonly.m4 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/m4/onceonly.m4 b/m4/onceonly.m4 new file mode 100644 index 00000000..50b33f48 --- /dev/null +++ b/m4/onceonly.m4 | |||
@@ -0,0 +1,63 @@ | |||
1 | # onceonly.m4 serial 3 (gettext-0.12) | ||
2 | dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
3 | dnl This file is free software, distributed under the terms of the GNU | ||
4 | dnl General Public License. As a special exception to the GNU General | ||
5 | dnl Public License, this file may be distributed as part of a program | ||
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
8 | |||
9 | dnl This file defines some "once only" variants of standard autoconf macros. | ||
10 | dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS | ||
11 | dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS | ||
12 | dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS | ||
13 | dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC | ||
14 | dnl The advantage is that the check for each of the headers/functions/decls | ||
15 | dnl will be put only once into the 'configure' file. It keeps the size of | ||
16 | dnl the 'configure' file down, and avoids redundant output when 'configure' | ||
17 | dnl is run. | ||
18 | dnl The drawback is that the checks cannot be conditionalized. If you write | ||
19 | dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi | ||
20 | dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to | ||
21 | dnl empty, and the check will be inserted before the body of the AC_DEFUNed | ||
22 | dnl function. | ||
23 | |||
24 | dnl Autoconf version 2.57 or newer is recommended. | ||
25 | AC_PREREQ(2.54) | ||
26 | |||
27 | # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of | ||
28 | # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). | ||
29 | AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ | ||
30 | : | ||
31 | AC_FOREACH([gl_HEADER_NAME], [$1], [ | ||
32 | AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]), | ||
33 | [-./], [___])), [ | ||
34 | AC_CHECK_HEADERS(gl_HEADER_NAME) | ||
35 | ]) | ||
36 | AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, | ||
37 | [-./], [___]))) | ||
38 | ]) | ||
39 | ]) | ||
40 | |||
41 | # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of | ||
42 | # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). | ||
43 | AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ | ||
44 | : | ||
45 | AC_FOREACH([gl_FUNC_NAME], [$1], [ | ||
46 | AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ | ||
47 | AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME])) | ||
48 | ]) | ||
49 | AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) | ||
50 | ]) | ||
51 | ]) | ||
52 | |||
53 | # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of | ||
54 | # AC_CHECK_DECLS(DECL1, DECL2, ...). | ||
55 | AC_DEFUN([AC_CHECK_DECLS_ONCE], [ | ||
56 | : | ||
57 | AC_FOREACH([gl_DECL_NAME], [$1], [ | ||
58 | AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ | ||
59 | AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) | ||
60 | ]) | ||
61 | AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) | ||
62 | ]) | ||
63 | ]) | ||