From ac90571830dfa69211792d0eced9ff1b16508b88 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Aug 2005 22:58:47 +0000 Subject: r9281: Fixes from Luke Mewburn for misuses of AC_CHECK_HEADERS. Jeremy. (This used to be commit 4d79070887d640150aa4427d806e7f18082a7a9c) --- source3/configure.in | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index 4bd237b4fb..85cc9aecb9 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -731,8 +731,6 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h) AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h) AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h) -## These fail to compile on IRIX so just check for their presence -AC_CHECK_HEADERS(rpcsvc/yp_prot.h, sys/mode.h, [], [] -) AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h) AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) AC_CHECK_HEADERS(sys/un.h) @@ -742,6 +740,15 @@ AC_CHECK_HEADERS(sys/sysmacros.h security/_pam_macros.h dlfcn.h) AC_CHECK_HEADERS(sys/syslog.h syslog.h execinfo.h) AC_CHECK_HEADERS(langinfo.h locale.h) +AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[ +#if HAVE_RPC_RPC_H +#include +#endif +]]) + +## These fail to compile on IRIX so just check for their presence +AC_CHECK_HEADERS(sys/mode.h,,,) + # Look for Darwin headers old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-Iinclude $CPPFLAGS" @@ -784,8 +791,29 @@ AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h) AC_CHECK_HEADERS(sys/acl.h sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h) AC_CHECK_HEADERS(sys/cdefs.h glob.h) -## These faile to compile on Solaris so just check for their presence -AC_CHECK_HEADERS(security/pam_modules.h net/if.h netinet/ip.h, [], [], -) +AC_CHECK_HEADERS(netinet/ip.h,,,[[ +#include +#if HAVE_SYS_SOCKET_H +#include +#endif +#include +#if HAVE_NETINET_IN_SYSTM_H +#include +#endif +]]) + +AC_CHECK_HEADERS(net/if.h,,,[[ +#include +#if HAVE_SYS_SOCKET_H +#include +#endif +]]) + +AC_CHECK_HEADERS(security/pam_modules.h,,,[[ +#if HAVE_SECURITY_PAM_APPL_H +#include +#endif +]]) # For experimental utmp support (lastlog on some BSD-like systems) AC_CHECK_HEADERS(utmp.h utmpx.h lastlog.h) @@ -929,7 +957,10 @@ AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [ #include #endif #include -#include ],[struct timespec ts;], +#if HAVE_AIO_H +#include +#endif +],[struct timespec ts;], samba_cv_struct_timespec=yes,samba_cv_struct_timespec=no)]) if test x"$samba_cv_struct_timespec" = x"yes"; then AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec]) -- cgit