diff options
Diffstat (limited to 'gl/m4/arpa_inet_h.m4')
| -rw-r--r-- | gl/m4/arpa_inet_h.m4 | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 index ea69af57..fa5fe831 100644 --- a/gl/m4/arpa_inet_h.m4 +++ b/gl/m4/arpa_inet_h.m4 | |||
| @@ -1,15 +1,15 @@ | |||
| 1 | # arpa_inet_h.m4 serial 13 | 1 | # arpa_inet_h.m4 serial 17 |
| 2 | dnl Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| 5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
| 6 | 6 | ||
| 7 | dnl Written by Simon Josefsson and Bruno Haible | 7 | dnl Written by Simon Josefsson and Bruno Haible |
| 8 | 8 | ||
| 9 | AC_DEFUN([gl_HEADER_ARPA_INET], | 9 | AC_DEFUN_ONCE([gl_ARPA_INET_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_ARPA_INET_H_DEFAULTS]) | 13 | AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) |
| 14 | 14 | ||
| 15 | AC_CHECK_HEADERS_ONCE([arpa/inet.h]) | 15 | AC_CHECK_HEADERS_ONCE([arpa/inet.h]) |
| @@ -24,6 +24,8 @@ AC_DEFUN([gl_HEADER_ARPA_INET], | |||
| 24 | 24 | ||
| 25 | AC_REQUIRE([gl_FEATURES_H]) | 25 | AC_REQUIRE([gl_FEATURES_H]) |
| 26 | 26 | ||
| 27 | gl_PREREQ_SYS_H_WS2TCPIP | ||
| 28 | |||
| 27 | dnl Check for declarations of anything we want to poison if the | 29 | dnl Check for declarations of anything we want to poison if the |
| 28 | dnl corresponding gnulib module is not in use. | 30 | dnl corresponding gnulib module is not in use. |
| 29 | gl_WARN_ON_USE_PREPARE([[ | 31 | gl_WARN_ON_USE_PREPARE([[ |
| @@ -38,17 +40,32 @@ AC_DEFUN([gl_HEADER_ARPA_INET], | |||
| 38 | ]], [inet_ntop inet_pton]) | 40 | ]], [inet_ntop inet_pton]) |
| 39 | ]) | 41 | ]) |
| 40 | 42 | ||
| 43 | # gl_ARPA_INET_MODULE_INDICATOR([modulename]) | ||
| 44 | # sets the shell variable that indicates the presence of the given module | ||
| 45 | # to a C preprocessor expression that will evaluate to 1. | ||
| 46 | # This macro invocation must not occur in macros that are AC_REQUIREd. | ||
| 41 | AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], | 47 | AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], |
| 42 | [ | 48 | [ |
| 43 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | 49 | dnl Ensure to expand the default settings once only. |
| 44 | AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) | 50 | gl_ARPA_INET_H_REQUIRE_DEFAULTS |
| 45 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) | 51 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
| 46 | ]) | 52 | ]) |
| 47 | 53 | ||
| 54 | # Initializes the default values for AC_SUBSTed shell variables. | ||
| 55 | # This macro must not be AC_REQUIREd. It must only be invoked, and only | ||
| 56 | # outside of macros or in macros that are not AC_REQUIREd. | ||
| 57 | AC_DEFUN([gl_ARPA_INET_H_REQUIRE_DEFAULTS], | ||
| 58 | [ | ||
| 59 | m4_defun(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS], [ | ||
| 60 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_NTOP]) | ||
| 61 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_PTON]) | ||
| 62 | ]) | ||
| 63 | m4_require(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS]) | ||
| 64 | AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) | ||
| 65 | ]) | ||
| 66 | |||
| 48 | AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], | 67 | AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], |
| 49 | [ | 68 | [ |
| 50 | GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) | ||
| 51 | GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON]) | ||
| 52 | dnl Assume proper GNU behavior unless another module says otherwise. | 69 | dnl Assume proper GNU behavior unless another module says otherwise. |
| 53 | HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) | 70 | HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) |
| 54 | HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) | 71 | HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) |
