diff options
author | Lorenz Kästle <lorenz.kaestle@netways.de> | 2023-03-09 10:03:48 (GMT) |
---|---|---|
committer | Lorenz Kästle <lorenz.kaestle@netways.de> | 2023-03-09 10:03:48 (GMT) |
commit | d0edb72a0c9bc1a28197ab4566928f7ee63a6d43 (patch) | |
tree | 6d524fb16d2dd1aa9f2d98529ef1de7a39f52700 /gl/m4/strings_h.m4 | |
parent | 9fdc82f0543c6e2891c7079f70297f92e8ef4619 (diff) | |
parent | 269718094177fb8a7e3d3005d1310495009fe8c4 (diff) | |
download | monitoring-plugins-d0edb72a0c9bc1a28197ab4566928f7ee63a6d43.tar.gz |
Merge branch 'master' into RincewindsHat-patch-1
Diffstat (limited to 'gl/m4/strings_h.m4')
-rw-r--r-- | gl/m4/strings_h.m4 | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4 index 76ef242..4c41221 100644 --- a/gl/m4/strings_h.m4 +++ b/gl/m4/strings_h.m4 | |||
@@ -1,21 +1,16 @@ | |||
1 | # Configure a replacement for <strings.h>. | 1 | # Configure a replacement for <strings.h>. |
2 | # serial 6 | 2 | # serial 9 |
3 | 3 | ||
4 | # Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. | 4 | # Copyright (C) 2007, 2009-2023 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 | AC_DEFUN([gl_HEADER_STRINGS_H], | 9 | AC_DEFUN_ONCE([gl_STRINGS_H], |
10 | [ | 10 | [ |
11 | dnl Use AC_REQUIRE here, so that the default behavior below is expanded | 11 | dnl Ensure to expand the default settings once only, before all statements |
12 | dnl once only, before all statements that occur in other macros. | 12 | dnl that occur in other macros. |
13 | AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) | 13 | AC_REQUIRE([gl_STRINGS_H_DEFAULTS]) |
14 | ]) | ||
15 | |||
16 | AC_DEFUN([gl_HEADER_STRINGS_H_BODY], | ||
17 | [ | ||
18 | AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) | ||
19 | 14 | ||
20 | gl_CHECK_NEXT_HEADERS([strings.h]) | 15 | gl_CHECK_NEXT_HEADERS([strings.h]) |
21 | if test $ac_cv_header_strings_h = yes; then | 16 | if test $ac_cv_header_strings_h = yes; then |
@@ -35,16 +30,31 @@ AC_DEFUN([gl_HEADER_STRINGS_H_BODY], | |||
35 | ]], [ffs strcasecmp strncasecmp]) | 30 | ]], [ffs strcasecmp strncasecmp]) |
36 | ]) | 31 | ]) |
37 | 32 | ||
33 | # gl_STRINGS_MODULE_INDICATOR([modulename]) | ||
34 | # sets the shell variable that indicates the presence of the given module | ||
35 | # to a C preprocessor expression that will evaluate to 1. | ||
36 | # This macro invocation must not occur in macros that are AC_REQUIREd. | ||
38 | AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], | 37 | AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], |
39 | [ | 38 | [ |
40 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | 39 | dnl Ensure to expand the default settings once only. |
41 | AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) | 40 | gl_STRINGS_H_REQUIRE_DEFAULTS |
42 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) | 41 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
43 | ]) | 42 | ]) |
44 | 43 | ||
45 | AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], | 44 | # Initializes the default values for AC_SUBSTed shell variables. |
45 | # This macro must not be AC_REQUIREd. It must only be invoked, and only | ||
46 | # outside of macros or in macros that are not AC_REQUIREd. | ||
47 | AC_DEFUN([gl_STRINGS_H_REQUIRE_DEFAULTS], | ||
48 | [ | ||
49 | m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS], [ | ||
50 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFS]) | ||
51 | ]) | ||
52 | m4_require(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS]) | ||
53 | AC_REQUIRE([gl_STRINGS_H_DEFAULTS]) | ||
54 | ]) | ||
55 | |||
56 | AC_DEFUN([gl_STRINGS_H_DEFAULTS], | ||
46 | [ | 57 | [ |
47 | GNULIB_FFS=0; AC_SUBST([GNULIB_FFS]) | ||
48 | dnl Assume proper GNU behavior unless another module says otherwise. | 58 | dnl Assume proper GNU behavior unless another module says otherwise. |
49 | HAVE_FFS=1; AC_SUBST([HAVE_FFS]) | 59 | HAVE_FFS=1; AC_SUBST([HAVE_FFS]) |
50 | HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) | 60 | HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) |