s3: require tdb 1.1.7 with tdb_check()
[ira/wip.git] / source3 / configure.in
index c7ad8e7d27f1b0933d05b0ff487876f964f2efad..c9bfaee6788e7d7ef596f83b32558be04cd55942 100644 (file)
@@ -1971,7 +1971,7 @@ AC_ARG_ENABLE(external_libtdb,
 
 if test "x$enable_external_libtdb" != xno
 then
-       PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.4,
+       PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.7,
                [ enable_external_libtdb=yes ],
                [
                if test x$enable_external_libtdb = xyes; then
@@ -2272,7 +2272,7 @@ dnl  We need to check for many of them
 dnl  But we don't need to do each and every one, because our code uses
 dnl  mostly just the utmp (not utmpx) fields.
 
-AC_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx)
+AC_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx getutxent)
 
 AC_CACHE_CHECK([for ut_name in utmp],samba_cv_HAVE_UT_UT_NAME,[
 AC_TRY_COMPILE([#include <sys/types.h>
@@ -2977,6 +2977,22 @@ exit(1);
   fi
 fi
 
+# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT.
+AC_CACHE_CHECK([for broken posix_fallocate],samba_cv_HAVE_BROKEN_POSIX_FALLOCATE,[
+AC_TRY_COMPILE([
+  #define _XOPEN_SOURCE 600
+  #include <stdlib.h>
+  #if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4))
+    probably broken posix_fallocate
+  #endif
+], [
+], 
+samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=no,samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes)])
+if test x"$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" = xyes; then
+       AC_DEFINE(HAVE_BROKEN_POSIX_FALLOCATE,, Whether we have a broken posix_fallocate)
+fi
+
+
 AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[
 AC_TRY_COMPILE([#include <sys/types.h>
 #include <sys/stat.h>