svn commit: samba r18563 - in branches/SAMBA_4_0/source/lib:
replace socket
tridge at samba.org
tridge at samba.org
Fri Sep 15 19:14:37 GMT 2006
Author: tridge
Date: 2006-09-15 19:14:36 +0000 (Fri, 15 Sep 2006)
New Revision: 18563
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18563
Log:
- move more of the header checks into lib/replace/
- change the test for net/if.h to do a full compile, not just an
existance test. net/if.h is completely broken on hpux, and can never
compile (it uses stuff before it defines it), so by using a
AC_TRY_COMPILE() test we avoid using net/if.h on hpux, which should
fix the build
Modified:
branches/SAMBA_4_0/source/lib/replace/libreplace.m4
branches/SAMBA_4_0/source/lib/socket/config.m4
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-15 18:54:37 UTC (rev 18562)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-15 19:14:36 UTC (rev 18563)
@@ -88,6 +88,33 @@
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 @@
[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)
Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/config.m4 2006-09-15 18:54:37 UTC (rev 18562)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4 2006-09-15 19:14:36 UTC (rev 18563)
@@ -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,10 +96,7 @@
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
#
More information about the samba-cvs
mailing list