diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
commit | 6d139ca4680abcbda5110f2f0886aa038ff62088 (patch) | |
tree | 7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/configure.in | |
parent | 4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff) | |
parent | afa960cbbcd609123d710c301e7a9a070c1fed70 (diff) | |
download | samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2 samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
librpc/ndr.pc.in
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 231 |
1 files changed, 216 insertions, 15 deletions
diff --git a/source3/configure.in b/source3/configure.in index 321924889a..306566f26e 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -63,7 +63,7 @@ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc" -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/async_req" +SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.." SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt" @@ -414,7 +414,7 @@ AC_SUBST(DYNEXP) dnl Add modules that have to be built by default here dnl These have to be built static: -default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog2 auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template" +default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template" dnl These are preferably build shared, and static if dlopen() is not available default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer" @@ -1027,7 +1027,7 @@ fi AC_CHECK_FUNCS(getcwd fchown chmod fchmod mknod mknod64) AC_CHECK_FUNCS(strtol) -AC_CHECK_FUNCS(fstat strchr chflags) +AC_CHECK_FUNCS(strchr chflags) AC_CHECK_FUNCS(getrlimit fsync fdatasync setpgid) AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid) AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) @@ -1395,7 +1395,7 @@ if test x"$samba_cv_stat_hires" = x"yes" ; then [whether struct stat has sub-second timestamps]) fi -AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec], samba_cv_stat_hires_notimespec, +AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec suffixed nsec], samba_cv_stat_hires_notimespec, [ AC_TRY_COMPILE( [ @@ -1423,7 +1423,7 @@ AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct tim t.tv_sec = s.st_atime; t.tv_nsec = s.st_atimensec; ], - samba_cv_stat_hires=yes, samba_cv_stat_hires=no) + samba_cv_stat_hires_notimespec=yes, samba_cv_stat_hires_notimespec=no) ]) if test x"$samba_cv_stat_hires_notimespec" = x"yes" ; then @@ -1431,7 +1431,87 @@ if test x"$samba_cv_stat_hires_notimespec" = x"yes" ; then AC_DEFINE(HAVE_STAT_ST_ATIMENSEC, 1, [whether struct stat contains st_atimensec]) AC_DEFINE(HAVE_STAT_ST_CTIMENSEC, 1, [whether struct stat contains st_ctimensec]) AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, - [whether struct stat has sub-second timestamps without struct timespec]) + [whether struct stat has sub-second timestamps without struct timespec suffixed nsec]) +fi + +dnl AIX stype sub-second timestamps: +AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec suffixed _n], samba_cv_stat_hires_notimespec_n, + [ + AC_TRY_COMPILE( + [ +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + ], + [ + struct timespec t; + struct stat s = {0}; + t.tv_sec = s.st_mtime; + t.tv_nsec = s.st_mtime_n; + t.tv_sec = s.st_ctime; + t.tv_nsec = s.st_ctime_n; + t.tv_sec = s.st_atime; + t.tv_nsec = s.st_atime_n; + ], + samba_cv_stat_hires_notimespec_n=yes, samba_cv_stat_hires_notimespec_n=no) + ]) + +if test x"$samba_cv_stat_hires_notimespec_n" = x"yes" ; then + AC_DEFINE(HAVE_STAT_ST_MTIME_N, 1, [whether struct stat contains st_mtime_n]) + AC_DEFINE(HAVE_STAT_ST_ATIME_N, 1, [whether struct stat contains st_atime_n]) + AC_DEFINE(HAVE_STAT_ST_CTIME_N, 1, [whether struct stat contains st_ctime_n]) + AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, + [whether struct stat has sub-second timestamps without struct timespec suffixed _n]) +fi + +dnl Tru64 has _micro_second_ resolution: +AC_CACHE_CHECK([whether struct stat has sub-second timestamps in st_uXtime], samba_cv_stat_hires_uxtime, + [ + AC_TRY_COMPILE( + [ +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + ], + [ + struct timespec t; + struct stat s = {0}; + t.tv_sec = s.st_mtime; + t.tv_nsec = s.st_umtime * 1000; + t.tv_sec = s.st_ctime; + t.tv_nsec = s.st_uctime * 1000; + t.tv_sec = s.st_atime; + t.tv_nsec = s.st_uatime * 1000; + ], + samba_cv_stat_hires_uxtime=yes, samba_cv_stat_hires_uxtime=no) + ]) + +if test x"$samba_cv_stat_hires_uxtime" = x"yes" ; then + AC_DEFINE(HAVE_STAT_ST_UMTIME, 1, [whether struct stat contains st_umtime]) + AC_DEFINE(HAVE_STAT_ST_UATIME, 1, [whether struct stat contains st_uatime]) + AC_DEFINE(HAVE_STAT_ST_UCTIME, 1, [whether struct stat contains st_uctime]) + AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, + [whether struct stat has sub-second timestamps in st_uXtime]) fi AC_CACHE_CHECK([whether struct stat has st_birthtimespec], samba_cv_stat_st_birthtimespec, @@ -1457,7 +1537,7 @@ AC_CACHE_CHECK([whether struct stat has st_birthtimespec], samba_cv_stat_st_birt struct stat s = {0}; t = s.st_birthtimespec; ], - samba_cv_stat_st_birthtimespec=yes, samba_cv_stat_birthtimespec=no) + samba_cv_stat_st_birthtimespec=yes, samba_cv_stat_st_birthtimespec=no) ]) if test x"$samba_cv_stat_st_birthtimespec" = x"yes" ; then @@ -1487,7 +1567,7 @@ AC_CACHE_CHECK([whether struct stat has st_birthtimensec], samba_cv_stat_st_birt struct stat s = {0}; t.tv_nsec = s.st_birthtimensec; ], - samba_cv_stat_st_birthtimensec=yes, samba_cv_stat_birthtimensec=no) + samba_cv_stat_st_birthtimensec=yes, samba_cv_stat_st_birthtimensec=no) ]) if test x"$samba_cv_stat_st_birthtimensec" = x"yes" ; then @@ -1517,7 +1597,7 @@ AC_CACHE_CHECK([whether struct stat has st_birthtime], samba_cv_stat_st_birthtim struct stat s = {0}; t = s.st_birthtime; ], - samba_cv_stat_st_birthtime=yes, samba_cv_stat_birthtime=no) + samba_cv_stat_st_birthtime=yes, samba_cv_stat_st_birthtime=no) ]) if test x"$samba_cv_stat_st_birthtime" = x"yes" ; then @@ -5152,17 +5232,128 @@ AC_MSG_RESULT([$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT]) ################################################# # check for cluster extensions -AC_MSG_CHECKING(whether to include cluster support) +CTDB_CFLAGS="" +AC_SUBST(CTDB_CFLAGS) +AC_ARG_WITH(ctdb, +[AS_HELP_STRING([--with-ctdb=DIR], [Where to find ctdb sources])], +[ case "$withval" in + yes|no) + AC_MSG_WARN([--with-ctdb called without argument]) + ;; + *) + CTDB_CPPFLAGS="-I$withval/include" + ;; + esac]) + +SAVED_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS" +ctdb_broken="missing or broken headers" + +AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[ +#include "confdefs.h" +#define NO_CONFIG_H +#include "replace.h" +#include "system/wait.h" +#include "system/network.h" +#define private #error __USED_RESERVED_WORD_private__ +#include <talloc.h> +#include <tdb.h> +#include <ctdb.h> +]) + +AC_HAVE_DECL(CTDB_CONTROL_TRANS2_COMMIT_RETRY,[ +#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> +#include <ctdb_private.h> +]) +if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then + ctdb_broken=no +else + ctdb_broken="missing transaction support" +fi + +# in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client +AC_CHECK_TYPE(struct ctdb_tcp_client,[ + AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) +],,[ +#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> +#include <ctdb_private.h> +]) + +AC_CHECK_TYPE(struct ctdb_control_tcp,[ + AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support]) +],[ + ctdb_broken="missing struct ctdb_control_tcp" +],[ +#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> +#include <ctdb_private.h> +]) + +AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[ + AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support]) +],,[ +#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> +#include <ctdb_private.h> +]) +CPPFLAGS="$SAVED_CPPFLAGS" + +AC_MSG_CHECKING(cluster support) AC_ARG_WITH(cluster-support, -[AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=no)])]) -if test "x$with_cluster_support" = "xyes"; then +[AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])]) + +if test x"$with_cluster_support" = x ; then + with_cluster_support="auto" +fi + +if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then + if test "x$with_cluster_support" = "xyes"; then + AC_MSG_ERROR("ctdb_private.h is required for cluster support") + fi + with_cluster_support=no +fi + +if test x"$ctdb_broken" != x"no"; then + if test "x$with_cluster_support" = "xyes"; then + AC_MSG_ERROR(["cluster support: $ctdb_broken"]) + fi + with_cluster_support=no +fi + +if test "x$with_cluster_support" != "xno"; then AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions]) + SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CTDB_CPPFLAGS}" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi - ################################################# # check for ACL support @@ -5724,6 +5915,8 @@ fi ############################################ # See if we have the Linux splice syscall. +case "$host_os" in +*linux*) AC_CACHE_CHECK([for Linux splice], samba_cv_HAVE_LINUX_SPLICE,[ AC_TRY_LINK([ @@ -5734,6 +5927,11 @@ AC_CACHE_CHECK([for Linux splice], [long ret = splice(0,0,1,0,400,0);], samba_cv_HAVE_LINUX_SPLICE=yes, samba_cv_HAVE_LINUX_SPLICE=no)]) +;; +*) +samba_cv_HAVE_LINUX_SPLICE=no +;; +esac if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then AC_DEFINE(HAVE_LINUX_SPLICE,1, @@ -5999,7 +6197,7 @@ if test x"$enable_dnssd" != x"no"; then AC_CHECK_FUNCS(DNSServiceRegister) AC_CHECK_LIB_EXT(dns_sd, DNSSD_LIBS, DNSServiceRegister) if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \ - x"$ac_cv_lib_ext_DNSServiceRegister" != x"yes"; then + x"$ac_cv_lib_ext_dns_sd_DNSServiceRegister" != x"yes"; then have_dnssd_support=no fi @@ -6142,7 +6340,7 @@ SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RP SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC) SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc.$SHLIBEXT", RPC) SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC) -SMB_MODULE(rpc_eventlog2, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog2.$SHLIBEXT", RPC) +SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC) SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC) SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC) SMB_SUBSYSTEM(RPC,smbd/server.o) @@ -6339,7 +6537,10 @@ fi if test x$enable_merged_build = xyes; then MERGED_BUILD=1 + saved_USESHARED="$USESHARED" + USESHARED="false" m4_include(samba4.m4) + USESHARED="$saved_USESHARED" fi AC_SUBST(ZLIB_LIBS) |