Enable gnulib's <arpa/inet.h> replacement also when inet_ntop or inet_pton need to...
[gnulib.git] / modules / arpa_inet
1 Description:
2 A GNU-like <arpa/inet.h>.
3
4 Files:
5 lib/arpa_inet.in.h
6 m4/arpa_inet_h.m4
7
8 Depends-on:
9 include_next
10 sys_socket
11
12 configure.ac:
13 gl_HEADER_ARPA_INET
14 AC_PROG_MKDIR_P
15
16 Makefile.am:
17 BUILT_SOURCES += $(ARPA_INET_H)
18
19 # We need the following in order to create <arpa/inet.h> when the system
20 # doesn't have one.
21 arpa/inet.h:
22         @MKDIR_P@ arpa
23         rm -f $@-t $@
24         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
25           sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
26               -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
27               -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
28               -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
29               -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
30               -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
31               -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
32               < $(srcdir)/arpa_inet.in.h; \
33         } > $@-t
34         mv $@-t $@
35 MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
36 MOSTLYCLEANDIRS += arpa
37
38 Include:
39 #include <arpa/inet.h>
40
41 License:
42 LGPLv2+
43
44 Maintainer:
45 Simon Josefsson