diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 273 |
1 files changed, 138 insertions, 135 deletions
diff --git a/source3/configure.in b/source3/configure.in index 98e01f5bd5..67cd4cbab8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -158,6 +158,44 @@ AC_SUBST(SMBWRAPPER) AC_SUBST(EXTRA_BIN_PROGS) AC_SUBST(EXTRA_SBIN_PROGS) AC_SUBST(EXTRA_ALL_TARGETS) +dnl For the DYNAMIC RPC stuff +dnl The complicated _YES and _NO stuff allows us to avoid a dependency +dnl on GNU Make. +AC_SUBST(LSA_DYNAMIC_YES) +AC_SUBST(LSA_DYNAMIC_NO) +LSA_DYNAMIC_YES="#" +LSA_DYNAMIC_NO= +AC_SUBST(NETLOG_DYNAMIC_YES) +AC_SUBST(NETLOG_DYNAMIC_NO) +NETLOG_DYNAMIC_YES="#" +NETLOG_DYNAMIC_NO= +AC_SUBST(SAMR_DYNAMIC_YES) +AC_SUBST(SAMR_DYNAMIC_NO) +SAMR_DYNAMIC_YES="#" +SAMR_DYNAMIC_NO= +AC_SUBST(SVC_DYNAMIC_YES) +AC_SUBST(SVC_DYNAMIC_NO) +SVC_DYNAMIC_YES="#" +SVC_DYNAMIC_NO= +AC_SUBST(WKS_DYNAMIC_YES) +AC_SUBST(WKS_DYNAMIC_NO) +WKS_DYNAMIC_YES="#" +WKS_DYNAMIC_NO= +AC_SUBST(REG_DYNAMIC_YES) +AC_SUBST(REG_DYNAMIC_NO) +REG_DYNAMIC_YES="#" +REG_DYNAMIC_NO= +AC_SUBST(SPOOLSS_DYNAMIC_YES) +AC_SUBST(SPOOLSS_DYNAMIC_NO) +SPOOLSS_DYNAMIC_YES="#" +SPOOLSS_DYNAMIC_NO= +AC_SUBST(DFS_DYNAMIC_YES) +AC_SUBST(DFS_DYNAMIC_NO) +DFS_DYNAMIC_YES="#" +DFS_DYNAMIC_NO= + +# compile with optimization and without debugging by default +CFLAGS="-O ${CFLAGS}" AC_ARG_ENABLE(debug, [ --enable-debug Turn on compiler debugging information (default=no)], @@ -185,19 +223,66 @@ then LIBS="$LIBS -ldmalloc" fi +AC_ARG_ENABLE(dynrpc, [ --enable-dynrpc Enable dynamic RPC modules [default=no]]) + +if test x$enable_dynrpc = xyes +then + enable_dynrpc=lsa,samr,reg,wks,netlog,dfs +fi + +if test x$enable_dynrpc != xno +then + for i in `echo $enable_dynrpc | sed -e's/,/ /g'` + do case $i in lsa) + LSA_DYNAMIC_YES= + LSA_DYNAMIC_NO="#" + AC_DEFINE(RPC_LSA_DYNAMIC, 1, + [Define to make the LSA pipe dynamic]) + ;; samr) + SAMR_DYNAMIC_YES= + SAMR_DYNAMIC_NO="#" + AC_DEFINE(RPC_SAMR_DYNAMIC, 1, + [Define to make the SAMR pipe dynamic]) + ;; svc) + SVC_DYNAMIC_YES= + SVC_DYNAMIC_NO="#" + AC_DEFINE(RPC_SVC_DYNAMIC, 1, + [Define to make the SRVSVC pipe dynamic]) + ;; wks) + WKS_DYNAMIC_YES= + WKS_DYNAMIC_NO="#" + AC_DEFINE(RPC_WKS_DYNAMIC, 1, + [Define to make the WKSSVC pipe dynamic]) + ;; netlog) + NETLOG_DYNAMIC_YES= + NETLOG_DYNAMIC_NO="#" + AC_DEFINE(RPC_NETLOG_DYNAMIC, 1, + [Define to make the NETLOGON pipe dynamic]) + ;; reg) + REG_DYNAMIC_YES= + REG_DYNAMIC_NO="#" + AC_DEFINE(RPC_REG_DYNAMIC, 1, + [Define to make the WINREG pipe dynamic]) + ;; spoolss) + SPOOLSS_DYNAMIC_YES= + SPOOLSS_DYNAMIC_NO="#" + AC_DEFINE(RPC_SPOOLSS_DYNAMIC, 1, + [Define to make the SPOOLSS pipe dynamic]) + ;; dfs) + DFS_DYNAMIC_YES= + DFS_DYNAMIC_NO="#" + AC_DEFINE(RPC_DFS_DYNAMIC, 1, + [Define to make the NETDFS pipe dynamic]) + ;; esac + done +fi + dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_AWK AC_PATH_PROG(PERL, perl) -# compile with optimization and without debugging by default, but -# allow people to set their own preference. -if test "x$CFLAGS" = x -then - CFLAGS="-O ${CFLAGS}" -fi - dnl Check if we use GNU ld LD=ld AC_PROG_LD_GNU @@ -238,13 +323,6 @@ AC_VALIDATE_CACHE_SYSTEM_TYPE 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_unix rpc_lsa rpc_samr rpc_reg rpc_wks rpc_net rpc_dfs rpc_srv rpc_spoolss auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin" - -dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_fake_perms vfs_netatalk" - # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -476,8 +554,8 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) -AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h) -AC_CHECK_HEADERS(sys/syslog.h syslog.h execinfo.h) +AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h) +AC_CHECK_HEADERS(sys/syslog.h syslog.h) # In valgrind 1.0.x, it's just valgrind.h. In 1.9.x+ there's a # subdirectory of headers. @@ -800,7 +878,7 @@ AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf) AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink) AC_CHECK_FUNCS(syslog vsyslog getgrouplist timegm) # setbuffer, shmget, shm_open are needed for smbtorture -AC_CHECK_FUNCS(setbuffer shmget shm_open backtrace_symbols) +AC_CHECK_FUNCS(setbuffer shmget shm_open) # syscall() is needed for smbwrapper. AC_CHECK_FUNCS(syscall) @@ -2259,7 +2337,6 @@ if test x"$with_ldap_support" = x"yes"; then if test x$have_ldap != xyes; then AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap"; AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])]) - AC_CHECK_HEADERS([ldap.h lber.h], [default_static_modules="$default_static_modules pdb_ldap"]) ######################################################## # If we have LDAP, does it's rebind procedure take 2 or 3 arguments? @@ -2271,16 +2348,19 @@ if test x"$with_ldap_support" = x"yes"; then #include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ]) AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc]) fi - fi ######################################################## # Compile with MySQL support? -AM_PATH_MYSQL([0.11.0],[default_shared_modules="$default_shared_modules pdb_mysql"],[]) +AM_PATH_MYSQL([0.11.0],[MODULE_MYSQL=bin/pdb_mysql.so],[MODULE_MYSQL=]) +CFLAGS="$CFLAGS $MYSQL_CFLAGS" +AC_SUBST(MODULE_MYSQL) ######################################################## # Compile with XML support? -AM_PATH_XML2([2.0.0],[default_shared_modules="$default_shared_modules pdb_xml"],[]) +AM_PATH_XML2([2.0.0],[MODULE_XML=bin/pdb_xml.so],[MODULE_XML=]) +CFLAGS="$CFLAGS $XML_CFLAGS" +AC_SUBST(MODULE_XML) ################################################# # check for automount support @@ -2399,15 +2479,21 @@ if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then fi fi -# New experimental SAM system +######################################################################################## +## +## TESTS FOR SAM BACKENDS. KEEP THESE GROUPED TOGETHER +## +######################################################################################## -AC_MSG_CHECKING([whether to build the new (experimental) SAM database]) -AC_ARG_WITH(sam, -[ --with-sam Build new (experimental) SAM database (default=no)], +################################################# +# check for a LDAP password database configuration backwards compatibility +AC_MSG_CHECKING(whether to use LDAP SAM 2.2 compatible configuration) +AC_ARG_WITH(ldapsam, +[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SAM,1,[Whether to build the new (experimental) SAM database]) + AC_DEFINE(WITH_LDAP_SAMCONFIG,1,[Whether to include 2.2 compatibel LDAP SAM configuration]) ;; *) AC_MSG_RESULT(no) @@ -2416,22 +2502,32 @@ AC_ARG_WITH(sam, AC_MSG_RESULT(no) ) - -######################################################################################## -## -## TESTS FOR SAM BACKENDS. KEEP THESE GROUPED TOGETHER -## -######################################################################################## +################################################# +# check for a TDB password database +AC_MSG_CHECKING(whether to use TDB SAM database) +AC_ARG_WITH(tdbsam, +[ --with-tdbsam Include experimental TDB SAM support (default=no)], +[ case "$withval" in + yes) + AC_MSG_RESULT(yes) + AC_DEFINE(WITH_TDB_SAM,1,[Whether to include experimental TDB SAM support]) + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) ################################################# -# check for a LDAP password database configuration backwards compatibility -AC_MSG_CHECKING(whether to use LDAP SAM 2.2 compatible configuration) -AC_ARG_WITH(ldapsam, -[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)], +# check for a NISPLUS password database +AC_MSG_CHECKING(whether to use NISPLUS SAM database) +AC_ARG_WITH(nisplussam, +[ --with-nisplussam Include NISPLUS SAM support (default=no)], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LDAP_SAMCONFIG,1,[Whether to include 2.2 compatibel LDAP SAM configuration]) + AC_DEFINE(WITH_NISPLUS_SAM,1,[Whether to include nisplus SAM support]) ;; *) AC_MSG_RESULT(no) @@ -3169,28 +3265,19 @@ AC_MSG_CHECKING(whether to build winbind) # Initially, the value of $host_os decides whether winbind is supported -HAVE_WINBIND=yes - case "$host_os" in - *linux*) - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o" - ;; - *irix*) - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_irix.o" + *linux*|*irix*) + HAVE_WINBIND=yes ;; *solaris*) - # Solaris winbind client is implemented as a wrapper around - # the Linux version. - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \ - nsswitch/winbind_nss_linux.o" + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" WINBIND_NSS_EXTRA_LIBS="-lsocket" ;; *hpux11*) + HAVE_WINBIND=yes WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" ;; - *aix*) - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_aix.o" - ;; *) HAVE_WINBIND=no winbind_no_reason=", unsupported on $host_os" @@ -3337,90 +3424,6 @@ AC_ARG_WITH(python, esac ]) AC_SUBST(PYTHON) -for i in `echo $default_static_modules | sed -e's/,/ /g'` -do - eval MODULE_DEFAULT_$i=STATIC -done - -for i in `echo $default_shared_modules | sed -e's/,/ /g'` -do - dnl Fall back to static if dlopen() is not available - eval MODULE_DEFAULT_$i=STATIC - - if test x"$ac_cv_func_dlopen" = xyes; then - eval MODULE_DEFAULT_$i=SHARED - fi -done - -dnl Always built these modules static -MODULE_pdb_guest=STATIC -MODULE_rpc_spoolss=STATIC -MODULE_rpc_srv=STATIC - -AC_ARG_WITH(static-modules, -[ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in], -[ if test $withval; then - for i in `echo $withval | sed -e's/,/ /g'` - do - eval MODULE_$i=STATIC - done -fi ]) - -AC_ARG_WITH(shared-modules, -[ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared], -[ if test $withval; then - for i in `echo $withval | sed -e's/,/ /g'` - do - eval MODULE_$i=SHARED - done -fi ]) - -SMB_MODULE(pdb_xml, modules/xml.o, bin/xml.so, PDB, - [ CFLAGS="$CFLAGS $XML_CFLAGS"; LIBS="$LIBS $XML_LIBS" ] ) -SMB_MODULE(pdb_mysql, modules/mysql.o, bin/mysql.so, PDB, - [ CFLAGS="$CFLAGS $MYSQL_CFLAGS"; LIBS="$LIBS $MYSQL_LIBS" ] ) -SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o, bin/ldapsam.so, PDB, - [ LIBS="$LIBS $LDAP_LIBS" ] ) -SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, bin/smbpasswd.so, PDB) -SMB_MODULE(pdb_tdbsam, passdb/pdb_tdb.o, bin/tdbsam.so, PDB) -SMB_MODULE(pdb_nisplussam, passdb/pdb_nisplus.o, bin/nisplussam.so, PDB) -SMB_MODULE(pdb_unix, passdb/pdb_unix.o, bin/unixsam.so, PDB) -SMB_MODULE(pdb_guest, passdb/pdb_guest.o, bin/guest.so, PDB) -SMB_SUBSYSTEM(PDB) - -SMB_MODULE(rpc_lsa, \$(RPC_LSA_OBJ), bin/librpc_lsarpc.so, RPC) -SMB_MODULE(rpc_reg, \$(RPC_REG_OBJ), bin/librpc_winreg.so, RPC) -SMB_MODULE(rpc_wks, \$(RPC_WKS_OBJ), bin/librpc_wkssvc.so, RPC) -SMB_MODULE(rpc_net, \$(RPC_NETLOG_OBJ), bin/librpc_NETLOGON.so, RPC) -SMB_MODULE(rpc_dfs, \$(RPC_DFS_OBJ), bin/librpc_netdfs.so, RPC) -SMB_MODULE(rpc_srv, \$(RPC_SVC_OBJ), bin/librpc_srvsvc.so, RPC) -SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), bin/librpc_spoolss.so, RPC) -SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), bin/librpc_samr.so, RPC) -SMB_SUBSYSTEM(RPC) - -SMB_MODULE(charset_weird, modules/developer.o, bin/developer.so, CHARSET) -SMB_SUBSYSTEM(CHARSET) - -SMB_MODULE(auth_rhosts, \$(AUTH_RHOSTS_OBJ), bin/rhosts.so, AUTH) -SMB_MODULE(auth_sam, \$(AUTH_SAM_OBJ), bin/sam.so, AUTH) -SMB_MODULE(auth_unix, \$(AUTH_UNIX_OBJ), bin/unix.so, AUTH) -SMB_MODULE(auth_winbind, \$(AUTH_WINBIND_OBJ), bin/winbind.so, AUTH) -SMB_MODULE(auth_server, \$(AUTH_SERVER_OBJ), bin/server.so, AUTH) -SMB_MODULE(auth_domain, \$(AUTH_DOMAIN_OBJ), bin/domain.so, AUTH) -SMB_MODULE(auth_builtin, \$(AUTH_BUILTIN_OBJ), bin/builtin.so, AUTH) -SMB_SUBSYSTEM(AUTH) - -SMB_MODULE(vfs_recycle, \$(VFS_RECYCLE_OBJ), bin/recycle.so, VFS) -SMB_MODULE(vfs_audit, \$(VFS_AUDIT_OBJ), bin/audit.so, VFS) -SMB_MODULE(vfs_extd_audit, \$(VFS_EXTD_AUDIT_OBJ), bin/extd_audit.so, VFS) -SMB_MODULE(vfs_fake_perms, \$(VFS_FAKE_PERMS_OBJ), bin/fake_perms.so, VFS) -SMB_MODULE(vfs_netatalk, \$(VFS_NETATALK_OBJ), bin/netatalk.so, VFS) -SMB_SUBSYSTEM(VFS) - -AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules]) - -AC_SUBST(MODULES_CLEAN) - ################################################# # do extra things if we are running insure |