summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/replace/libreplace.m431
-rw-r--r--source4/lib/socket/config.m45
2 files changed, 27 insertions, 9 deletions
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index 26c6caae41..d98845f3b4 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -88,6 +88,33 @@ if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
fi
+AC_CHECK_HEADERS(sys/syslog.h syslog.h)
+AC_CHECK_HEADERS(sys/time.h time.h)
+AC_CHECK_HEADERS(stdarg.h vararg.h)
+AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
+AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
+AC_CHECK_HEADERS(sys/sockio.h sys/un.h)
+
+
+dnl we need to check that net/if.h really can be used, to cope with hpux
+dnl where including it always fails
+AC_TRY_COMPILE([
+ #include <stdio.h>
+ #if STDC_HEADERS
+ # include <stdlib.h>
+ # include <stddef.h>
+ #else
+ # if HAVE_STDLIB_H
+ # include <stdlib.h>
+ # endif
+ #endif
+ #if HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif],
+ [#include <net/if.h>],
+ AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h))
+
+
AC_CACHE_CHECK([for broken inet_ntoa],samba_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
#include <stdio.h>
@@ -117,10 +144,6 @@ AC_TRY_COMPILE([
[socklen_t foo;],,
[AC_DEFINE(socklen_t, int,[Socket length type])])
-AC_CHECK_HEADERS(sys/syslog.h syslog.h)
-AC_CHECK_HEADERS(sys/time.h time.h)
-AC_CHECK_HEADERS(sys/socket.h netinet/in.h)
-AC_CHECK_HEADERS(stdarg.h vararg.h)
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup)
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index 5cb567238c..250b3001eb 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -1,5 +1,3 @@
-AC_CHECK_HEADERS(sys/socket.h sys/sockio.h sys/un.h)
-
AC_CHECK_FUNCS(writev)
AC_CHECK_FUNCS(readv)
@@ -98,9 +96,6 @@ fi
dnl don't build ipv6 by default, unless the above test enables it, or
dnl the configure uses --with-static-modules=socket_ipv6
-AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h)
-AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
-
##################
# look for a method of finding the list of network interfaces