summaryrefslogtreecommitdiffstats
path: root/source/configure.in
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-11-16 00:45:44 +0100
committerMichael Adam <obnox@samba.org>2007-11-16 00:45:59 +0100
commit11bcdf780e164659b89a66e24edc27e89da7619a (patch)
tree582ee390d64248ba10cb707c87c6fafa6e0366d3 /source/configure.in
parent4ab3b23a630e822e3fdf1ab4d08330625b0e4fb6 (diff)
downloadsamba-11bcdf780e164659b89a66e24edc27e89da7619a.tar.gz
samba-11bcdf780e164659b89a66e24edc27e89da7619a.tar.xz
samba-11bcdf780e164659b89a66e24edc27e89da7619a.zip
Fix the build on RHEL5, when libcap-devel is installed.
The /usr/include/sys/capability.h defines _LINUX_TYPES_H which prevents /usr/include/linux/types.h from being parsed (when included afterwards). Thus certain types are undefined that are for instance needed in /usr/include/linux/dqblk_xfs.h. This breaks the build of lib/sysquotas_xfs.c. This commit adds a configure check and a workaround for this. Michael
Diffstat (limited to 'source/configure.in')
-rw-r--r--source/configure.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/configure.in b/source/configure.in
index be2b2628d9b..d37e3925aa9 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3242,6 +3242,18 @@ AC_TRY_COMPILE([
if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
fi
+
+AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
+AC_TRY_COMPILE([
+#ifdef HAVE_SYS_CAPABILITY_H
+#include <sys/capability.h>
+#endif
+#include <linux/types.h>
+],[__s8 i;],
+ samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes)])
+if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
+ AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
+fi
;;
esac