Add inet_ntop and inet_pton declarations to arpa/inet.h, for MinGW.
[gnulib.git] / m4 / arpa_inet_h.m4
1 # arpa_inet_h.m4 serial 2
2 dnl Copyright (C) 2006, 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 dnl Written by Simon Josefsson
8
9 AC_DEFUN([gl_HEADER_ARPA_INET],
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
15   AC_CHECK_HEADERS_ONCE([arpa/inet.h])
16   if test $ac_cv_header_arpa_inet_h = yes; then
17     ARPA_INET_H=''
18   else
19     ARPA_INET_H='arpa/inet.h'
20   fi
21   AC_SUBST(ARPA_INET_H)
22 ])
23
24 AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
25 [
26   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
27   AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
28   GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
29 ])
30
31 AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
32 [
33   GNULIB_INET_NTOP=0;     AC_SUBST([GNULIB_INET_NTOP])
34   GNULIB_INET_PTON=0;     AC_SUBST([GNULIB_INET_PTON])
35 ])