tdb: raise version to 1.2.1
[ira/wip.git] / source3 / configure.in
index 2766d07d18b719d6947882d2a52d810f93c2a109..14b57b688a19e9fa2483086055a67a25b510e72d 100644 (file)
@@ -1398,7 +1398,7 @@ AC_LIBTESTFUNC(sec, getprpwnam)
 AC_CHECK_FUNCS(strsignal)
 
 ############################################
-# Check if we have libattr
+# Check for EA implementations
 case "$host_os" in
   *osf*)
        AC_SEARCH_LIBS(getproplist, [proplist])
@@ -1406,24 +1406,27 @@ case "$host_os" in
        AC_CHECK_FUNCS(delproplist fdelproplist add_proplist_entry get_proplist_entry)
        AC_CHECK_FUNCS(sizeof_proplist_entry)
   ;;
-  *)
-       AC_SEARCH_LIBS(getxattr, [attr])
-       AC_CHECK_FUNCS(getxattr lgetxattr fgetxattr listxattr llistxattr)
-       AC_CHECK_FUNCS(getea fgetea lgetea listea flistea llistea)
-       AC_CHECK_FUNCS(removeea fremoveea lremoveea setea fsetea lsetea)
-       AC_CHECK_FUNCS(flistxattr removexattr lremovexattr fremovexattr)
-       AC_CHECK_FUNCS(setxattr lsetxattr fsetxattr)
-       AC_CHECK_FUNCS(attr_get attr_list attr_set attr_remove)
-       AC_CHECK_FUNCS(attr_getf attr_listf attr_setf attr_removef)
+  *freebsd4* | *dragonfly* )
+       AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
   ;;
-esac
-
-########################################################
-# Check if attropen() is present if this is Solaris
-case "$host_os" in
   *solaris*)
        AC_CHECK_FUNCS(attropen)
   ;;
+  *)
+       AC_SEARCH_LIBS(getxattr, [attr])
+       AC_CHECK_FUNCS(getxattr,[
+               AC_CHECK_FUNCS(lgetxattr fgetxattr listxattr llistxattr flistxattr removexattr lremovexattr fremovexattr setxattr lsetxattr fsetxattr)
+               ])
+       AC_CHECK_FUNCS(getea,[
+               AC_CHECK_FUNCS(fgetea lgetea listea flistea llistea removeea fremoveea lremoveea setea fsetea lsetea)
+               ])
+       AC_CHECK_FUNCS(attr_get,[
+               AC_CHECK_FUNCS(attr_list attr_set attr_remove attr_getf attr_listf attr_setf attr_removef)
+               ])
+       AC_CHECK_FUNCS(extattr_delete_file,[
+               AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_link extattr_get_fd extattr_get_file extattr_get_link extattr_list_fd extattr_list_file extattr_list_link extattr_set_fd extattr_set_file extattr_set_link)
+               ])
+  ;;
 esac
 
 ########################################################
@@ -1450,19 +1453,6 @@ if test x"$ac_cv_func_getxattr" = x"yes" ; then
        fi
 fi
 
-# Check if we have extattr
-case "$host_os" in
-  *freebsd4* | *dragonfly* )
-    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
-    ;;
-  *)
-    AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_file extattr_delete_link)
-    AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_get_link)
-    AC_CHECK_FUNCS(extattr_list_fd extattr_list_file extattr_list_link)
-    AC_CHECK_FUNCS(extattr_set_fd extattr_set_file extattr_set_link)
-    ;;
-esac
-
 AC_DISABLE_STATIC
 AC_ENABLE_SHARED
 
@@ -1975,7 +1965,7 @@ AC_ARG_ENABLE(external_libtdb,
 
 if test "x$enable_external_libtdb" != xno
 then
-       PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.7,
+       PKG_CHECK_MODULES(LIBTDB, tdb >= 1.2.1,
                [ enable_external_libtdb=yes ],
                [
                if test x$enable_external_libtdb = xyes; then
@@ -3660,6 +3650,9 @@ if test x"$with_ads_support" != x"no"; then
   AC_CHECK_FUNC_EXT(krb5_get_creds_opt_set_impersonate, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_get_creds, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_get_credentials_for_user, $KRB5_LIBS)
+  AC_CHECK_FUNC_EXT(krb5_get_host_realm, $KRB5_LIBS)
+  AC_CHECK_FUNC_EXT(krb5_free_host_realm, $KRB5_LIBS)
+
   # MIT krb5 1.8 does not expose this call (yet)
   AC_CHECK_DECLS(krb5_get_credentials_for_user, [], [], [#include <krb5.h>])
 
@@ -4002,6 +3995,18 @@ if test x"$with_ads_support" != x"no"; then
                [Whether the WRFILE:-keytab is supported])
   fi
 
+  AC_CACHE_CHECK([for krb5_realm type],
+                samba_cv_HAVE_KRB5_REALM_TYPE,[
+    AC_TRY_COMPILE([#include <krb5.h>],
+      [krb5_realm realm;],
+      samba_cv_HAVE_KRB5_REALM_TYPE=yes,
+      samba_cv_HAVE_KRB5_REALM_TYPE=no)])
+
+  if test x"$samba_cv_HAVE_KRB5_REALM_TYPE" = x"yes"; then
+    AC_DEFINE(HAVE_KRB5_REALM_TYPE,1,
+               [Whether the type krb5_realm exists])
+  fi
+
   AC_CACHE_CHECK([for krb5_princ_realm returns krb5_realm or krb5_data],
                samba_cv_KRB5_PRINC_REALM_RETURNS_REALM,[
     AC_TRY_COMPILE([#include <krb5.h>],
@@ -6365,7 +6370,7 @@ fi
 # pthread_attr_init. On pthread_mutex_lock it works there...
 if test "x$PTHREAD_LDFLAGS" = xerror; then
    AC_CHECK_LIB(pthread, pthread_mutex_lock, [
-               PTHREAD_CFLAGS=="-D_REENTRANT"
+               PTHREAD_CFLAGS="-D_REENTRANT"
                PTHREAD_LDFLAGS="-lpthread" ])
 fi
 
@@ -6388,14 +6393,14 @@ fi
 #################################################
 # Check if user wants pthreadpool support
 
+AC_ARG_ENABLE(pthreadpool,
+[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=no)])])
+
 if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then
-       AC_MSG_ERROR([pthread support cannot be enabled when pthread header file not found])
+       AC_MSG_ERROR([pthreadpool support cannot be enabled when pthread support was found])
 fi
 
-AC_ARG_ENABLE(pthreadpool,
-[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=auto)])])
-
-if test x"$enable_pthreadpool" != x"no" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
+if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
     LIBS="$LIBS $PTHREAD_LDFLAGS"
     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
     AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])