summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-12 22:58:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:31 -0500
commitac90571830dfa69211792d0eced9ff1b16508b88 (patch)
tree09715c8a45e76941e188bd389fbbe309485093ac /source3
parent9a14b005a105159780b8f66afe1c339202e38ed3 (diff)
downloadsamba-ac90571830dfa69211792d0eced9ff1b16508b88.tar.gz
samba-ac90571830dfa69211792d0eced9ff1b16508b88.tar.bz2
samba-ac90571830dfa69211792d0eced9ff1b16508b88.zip
r9281: Fixes from Luke Mewburn <lukem@NetBSD.org> for misuses of
AC_CHECK_HEADERS. Jeremy. (This used to be commit 4d79070887d640150aa4427d806e7f18082a7a9c)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in41
1 files changed, 36 insertions, 5 deletions
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 <rpc/rpc.h>
+#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 <sys/types.h>
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <netinet/in.h>
+#if HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+]])
+
+AC_CHECK_HEADERS(net/if.h,,,[[
+#include <sys/types.h>
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+]])
+
+AC_CHECK_HEADERS(security/pam_modules.h,,,[[
+#if HAVE_SECURITY_PAM_APPL_H
+#include <security/pam_appl.h>
+#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 <stddef.h>
#endif
#include <time.h>
-#include <aio.h>],[struct timespec ts;],
+#if HAVE_AIO_H
+#include <aio.h>
+#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])