1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

r18563: - 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
(This used to be commit bde18f3d5c)
This commit is contained in:
Andrew Tridgell
2006-09-15 19:14:36 +00:00
committed by Gerald (Jerry) Carter
parent dce0c9e4fd
commit 6e3b94d3bc
2 changed files with 27 additions and 9 deletions

View File

@ -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)

View File

@ -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