summaryrefslogtreecommitdiffstats
path: root/gl/m4/arpa_inet_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/arpa_inet_h.m4')
-rw-r--r--gl/m4/arpa_inet_h.m442
1 files changed, 37 insertions, 5 deletions
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index d01d098..a6e63df 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,18 +1,50 @@
1# arpa_inet_h.m4 serial 1 1# arpa_inet_h.m4 serial 5
2dnl Copyright (C) 2006 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2008 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
7dnl Written by Simon Josefsson 7dnl Written by Simon Josefsson and Bruno Haible
8 8
9AC_DEFUN([gl_HEADER_ARPA_INET], 9AC_DEFUN([gl_HEADER_ARPA_INET],
10[ 10[
11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
12 dnl once only, before all statements that occur in other macros.
13 AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
14
11 AC_CHECK_HEADERS_ONCE([arpa/inet.h]) 15 AC_CHECK_HEADERS_ONCE([arpa/inet.h])
12 if test $ac_cv_header_arpa_inet_h = yes; then 16 if test $ac_cv_header_arpa_inet_h = yes; then
13 ARPA_INET_H='' 17 HAVE_ARPA_INET_H=1
14 else 18 else
15 ARPA_INET_H='arpa/inet.h' 19 ARPA_INET_H='arpa/inet.h'
20 HAVE_ARPA_INET_H=0
16 fi 21 fi
17 AC_SUBST(ARPA_INET_H) 22 AC_SUBST([HAVE_ARPA_INET_H])
23 dnl Execute this unconditionally, because ARPA_INET_H may be set by other
24 dnl modules, after this code is executed.
25 gl_CHECK_NEXT_HEADERS([arpa/inet.h])
26])
27
28dnl Unconditionally enables the replacement of <arpa/inet.h>.
29AC_DEFUN([gl_REPLACE_ARPA_INET_H],
30[
31 AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
32 ARPA_INET_H='arpa/inet.h'
33])
34
35AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
36[
37 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
38 AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
39 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
40])
41
42AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
43[
44 GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP])
45 GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON])
46 dnl Assume proper GNU behavior unless another module says otherwise.
47 HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
48 HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
49 ARPA_INET_H=''; AC_SUBST([ARPA_INET_H])
18]) 50])