summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in78
1 files changed, 34 insertions, 44 deletions
diff --git a/source3/configure.in b/source3/configure.in
index d67feccb9b..dc5850aba1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -20,10 +20,29 @@ AC_SUBST(builddir)
m4_include(m4/samba_version.m4)
m4_include(m4/check_path.m4)
+m4_include(pkg.m4)
AC_LIBREPLACE_CC_CHECKS
-m4_include(../lib/talloc/libtalloc.m4)
+AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])],
+[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ])
+
+if test "x$enable_external_libtalloc" != xno
+then
+ PKG_CHECK_MODULES(TALLOC, talloc >= 1.3.0,
+ [ enable_external_libtalloc=yes ],
+ [ if test x$enable_external_libtalloc = xyes; then
+ AC_MSG_ERROR([Unable to find libtalloc])
+ else
+ enable_external_libtalloc=no
+ fi
+ ])
+fi
+
+if test "x$enable_external_libtalloc" = xno
+then
+ m4_include(../lib/talloc/libtalloc.m4)
+fi
LIBTALLOC_OBJ0=""
for obj in ${TALLOC_OBJ}; do
@@ -266,7 +285,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
else
AC_MSG_CHECKING(GNU ld release version)
changequote(,)dnl
- ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
+ ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*[^0-9\.]\+\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
changequote([,])dnl
@@ -278,7 +297,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
fi
- if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major"=2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
+ if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
ac_cv_gnu_ld_version_script=yes
fi
fi
@@ -414,10 +433,10 @@ 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 pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss2 rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
+default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam 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_wbc 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"
+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 vfs_preopen"
if test "x$developer" = xyes; then
default_static_modules="$default_static_modules rpc_rpcecho"
@@ -1177,13 +1196,10 @@ if test x"$LIBUNWIND_PTRACE" != x"" ; then
#endif
],
[
- int main(int argc, const char ** argv)
- {
- pid_t me = (pid_t)-1;
- ptrace(PTRACE_ATTACH, me, 0, 0);
- ptrace(PTRACE_DETACH, me, 0, 0);
- return 0;
- }
+ pid_t me = (pid_t)-1;
+ ptrace(PTRACE_ATTACH, me, 0, 0);
+ ptrace(PTRACE_DETACH, me, 0, 0);
+ return 0;
],
[
AC_MSG_RESULT(yes)
@@ -3261,6 +3277,9 @@ if test x"$with_ads_support" != x"no"; then
ac_save_CPPFLAGS=$CPPFLAGS
ac_save_LDFLAGS=$LDFLAGS
+ # remove needless evil rpath stuff as early as possible:
+ LIB_REMOVE_USR_LIB(KRB5_LIBS)
+ LIB_REMOVE_USR_LIB(KRB5_LDFLAGS)
CFLAGS="$KRB5_CFLAGS $CFLAGS"
CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS"
LDFLAGS="$KRB5_LDFLAGS $LDFLAGS"
@@ -4723,35 +4742,6 @@ SMB_LIBRARY(addns, 0, no, [undefined API])
#################################################
-# check to see if we should set the protected madvise flag,
-# which will keep smbd alive in low memory conditions
-AC_MSG_CHECKING(whether to protect smbd from being killed in low memory)
-AC_ARG_WITH(madvise-protect,
-[AS_HELP_STRING([--with-madvise-protect], [Include low memory madvise protection (default=no)])],
-[ case "$withval" in
- yes)
- AC_TRY_COMPILE([
- #include <sys/mman.h>
- ],[
- int a = MADV_PROTECT;
- ],
- [samba_cv_madvise_protect=yes],
- [samba_cv_madvise_protect=no])
- if test x"$samba_cv_madvise_protect" = x"yes"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_MADVISE_PROTECTED,1,[Whether to include low memory protection support])
- else
- AC_MSG_ERROR(Low memory protection supporte requires availability of MADVISE_PROTECT flag.)
- fi
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-#################################################
# these tests are taken from the GNU fileutils package
AC_CHECKING(how to get filesystem space usage)
space=no
@@ -6100,7 +6090,7 @@ do
done
dnl Always build these modules static
-MODULE_rpc_spoolss2=STATIC
+MODULE_rpc_spoolss=STATIC
MODULE_rpc_srvsvc=STATIC
MODULE_idmap_tdb=STATIC
MODULE_idmap_passdb=STATIC
@@ -6144,7 +6134,7 @@ SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)
SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)
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_spoolss2, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss2.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$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)
@@ -6214,6 +6204,7 @@ SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS)
SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), "bin/tsmsm.$SHLIBEXT", VFS)
SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS)
SMB_MODULE(vfs_aio_fork, \$(VFS_AIO_FORK_OBJ), "bin/aio_fork.$SHLIBEXT", VFS)
+SMB_MODULE(vfs_preopen, \$(VFS_PREOPEN_OBJ), "bin/preopen.$SHLIBEXT", VFS)
SMB_MODULE(vfs_syncops, \$(VFS_SYNCOPS_OBJ), "bin/syncops.$SHLIBEXT", VFS)
SMB_MODULE(vfs_zfsacl, \$(VFS_ZFSACL_OBJ), "bin/zfsacl.$SHLIBEXT", VFS)
SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS)
@@ -6370,7 +6361,6 @@ AC_ZLIB([ZLIB_OBJS=""], [
dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
LIB_REMOVE_USR_LIB(LDFLAGS)
LIB_REMOVE_USR_LIB(LIBS)
-LIB_REMOVE_USR_LIB(KRB5_LIBS)
dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)