util: Add --disable-fault-handling.
[abartlet/samba.git/.git] / source3 / configure.in
index 6269b4c6d9fb5fa02da9e1eb73a0f80ec3645839..51e163dfb1cc89fd692a6e907515574ed6ae916f 100644 (file)
@@ -749,12 +749,20 @@ AC_CHECK_HEADERS(langinfo.h locale.h)
 AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
 AC_CHECK_HEADERS(linux/falloc.h)
+AC_CHECK_HEADERS(sys/uuid.h)
+AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
 
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
 #include <rpc/rpc.h>
 #endif
 ]])
+CRYPTO_MD5_OBJ=
+if test "x$ac_cv_header_CommonCrypto_CommonDigest_h" != "xyes"
+then
+       CRYPTO_MD5_OBJ="../lib/crypto/md5.o"
+fi
+AC_SUBST(CRYPTO_MD5_OBJ)
 
 ## These fail to compile on IRIX so just check for their presence
 AC_CHECK_HEADERS(sys/mode.h,,,)
@@ -766,9 +774,9 @@ AC_CHECK_HEADERS([CoreFoundation/CFStringEncodingConverter.h], [], [AC_CHECK_HEA
 CPPFLAGS="$old_CPPFLAGS"
 
 # To link lib/util/charset/charset_macosxfs.c, we need to tell the linker
-# about CoreFoundation
+# about CoreFoundation, at least on os X 10.6 and 10.7
 case "$host_os" in
-    *darwin11*)
+    *darwin11*|*darwin10*)
                LDFLAGS="$LDFLAGS -framework CoreFoundation"
        ;;
 esac
@@ -5240,6 +5248,26 @@ fi
 AC_CHECKING(how to get filesystem space usage)
 space=no
 
+# Perform only the link test since it seems there are no variants of the
+# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
+# because that got a false positive on SCO OSR5.  Adding the declaration
+# of a `struct statvfs' causes this test to fail (as it should) on such
+# systems.  That system is reported to work fine with STAT_STATFS4 which
+# is what it gets when this test fails.
+if test $space = no; then
+  # SVR4
+  AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
+                [AC_TRY_LINK([#include <sys/types.h>
+#include <sys/statvfs.h>],
+                             [struct statvfs fsd; statvfs (0, &fsd);],
+                             fu_cv_sys_stat_statvfs=yes,
+                             fu_cv_sys_stat_statvfs=no)])
+  if test $fu_cv_sys_stat_statvfs = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
+  fi
+fi
+
 # Test for statvfs64.
 if test $space = no; then
   # SVR4
@@ -5264,26 +5292,6 @@ if test $space = no; then
   fi
 fi
 
-# Perform only the link test since it seems there are no variants of the
-# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
-# because that got a false positive on SCO OSR5.  Adding the declaration
-# of a `struct statvfs' causes this test to fail (as it should) on such
-# systems.  That system is reported to work fine with STAT_STATFS4 which
-# is what it gets when this test fails.
-if test $space = no; then
-  # SVR4
-  AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
-                [AC_TRY_LINK([#include <sys/types.h>
-#include <sys/statvfs.h>],
-                             [struct statvfs fsd; statvfs (0, &fsd);],
-                             fu_cv_sys_stat_statvfs=yes,
-                             fu_cv_sys_stat_statvfs=no)])
-  if test $fu_cv_sys_stat_statvfs = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
-  fi
-fi
-
 # smbd/statvfs.c assumes that statvfs.f_fsid is an integer.
 # This is not the case on ancient Linux systems.
 
@@ -5612,6 +5620,34 @@ if test "x$have_cluster_support" = "xyes" ; then
        fi
 fi
 
+AC_ARG_ENABLE([ctdb-readonly-records],
+       AS_HELP_STRING([--enable-ctdb-readonly-records],
+               [Turn on CTDB readonly records support (default=yes)]),
+       [want_ctdb_readonly=$enableval],
+       [want_ctdb_readonly=yes])
+
+if test "x$have_cluster_support" = "xyes" -a "x$want_ctdb_readonly" = "xyes" ; then
+       AC_HAVE_DECL(CTDB_WANT_READONLY,[
+       #include "confdefs.h"
+       #define NO_CONFIG_H
+       #include "replace.h"
+       #include "system/wait.h"
+       #include "system/network.h"
+       #include <talloc.h>
+       #include <tdb.h>
+       #include <ctdb.h>
+       ])
+
+       if test "x$ac_cv_have_CTDB_WANT_READONLY_decl" != "xyes" ; then
+               if test "x$enable_old_ctdb" = "xyes" ; then
+                       AC_MSG_WARN([ignoring missing READONLY support (--enable-old-ctdb)])
+               else
+                       ctdb_broken="support for CTDB readonly records missing"
+                       have_cluster_support=no
+               fi
+       fi
+fi
+
 if test "x$have_cluster_support" = "xyes" ; then
        # In ctdb 1.0.57, ctdb_control_tcp was temporarily renamed
        # to ctdb_tcp_client.
@@ -6763,6 +6799,7 @@ if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; t
     fi
 fi
 
+
 #################################################
 # Check to see if we should use the included iniparser
 
@@ -6798,6 +6835,12 @@ AC_SUBST(BUILD_INIPARSER)
 AC_SUBST(INIPARSERLIBS)
 AC_SUBST(FLAGS1)
 
+AC_ARG_ENABLE(fault-handler,[AS_HELP_STRING([--disable-fault-handler], [Disable the default handler])])
+
+if test x"$enable_fault_handler" = x"no"; then
+       AC_DEFINE(HAVE_DISABLE_FAULT_HANDLER, 1, [Disable the default signal handler])
+fi
+
 ###################################################
 # Check for different/missing (set|get|end)netgrent prototypes
 CFLAGS_SAVE=$CFLAGS