+2006-07-28 Simon Josefsson <jas@extundo.com>
+
+ * netinet_in_h.m4: New file.
+
2006-07-28 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
* inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
--- /dev/null
+# netinet_in_h.m4 serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson
+
+AC_DEFUN([gl_HEADER_NETINET_IN],
+[
+ AC_CHECK_HEADERS_ONCE([netinet/in.h])
+ if test $ac_cv_header_netinet_in_h = yes; then
+ NETINET_IN_H=''
+ else
+ NETINET_IN_H='netinet/in.h'
+ fi
+ AC_SUBST(NETINET_IN_H)
+])
--- /dev/null
+Description:
+A <netinet/in.h> for systems lacking it (e.g., Mingw).
+
+Files:
+m4/netinet_in_h.m4
+
+Depends-on:
+sys_socket
+
+configure.ac:
+gl_HEADER_NETINET_IN
+
+Makefile.am:
+BUILT_SOURCES += $(NETINET_IN_H)
+
+# We need the following in order to create <netinet/in.h> when the system
+# doesn't have one.
+netinet/in.h:
+ test -d netinet || mkdir netinet
+ echo '#include <sys/socket.h>' >$@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
+MOSTLYCLEANDIRS += netinet
+
+Include:
+#include <netinet/in.h>
+
+License:
+LGPL
+
+Maintainer:
+Simon Josefsson