summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in143
1 files changed, 50 insertions, 93 deletions
diff --git a/source3/configure.in b/source3/configure.in
index e038654f7e..ee6a88ee6d 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -158,41 +158,6 @@ 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}"
@@ -223,60 +188,6 @@ 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
@@ -323,6 +234,9 @@ AC_VALIDATE_CACHE_SYSTEM_TYPE
DYNEXP=
+dnl Add modules that have to be built by default here
+default_modules="pdb_smbpasswd pdb_tdb pdb_unix rpc_lsa rpc_samr rpc_reg rpc_wks rpc_netlog rpc_dfs rpc_srv rpc_spoolss"
+
#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests.
@@ -2329,6 +2243,7 @@ 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])])
+ default_modules="$default_modules pdb_ldap"
########################################################
# If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
@@ -2344,15 +2259,15 @@ fi
########################################################
# Compile with MySQL support?
-AM_PATH_MYSQL([0.11.0],[MODULE_MYSQL=bin/mysql.so],[MODULE_MYSQL=])
+AM_PATH_MYSQL([0.11.0],[default_modules="$default_modules pdb_mysql"],[])
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
-AC_SUBST(MODULE_MYSQL)
+LIBS="$LIBS $MYSQL_LIBS"
########################################################
# Compile with XML support?
-AM_PATH_XML2([2.0.0],[MODULE_XML=bin/xml.so],[MODULE_XML=])
+AM_PATH_XML2([2.0.0],[default_modules="$default_modules pdb_xml"],[])
CFLAGS="$CFLAGS $XML_CFLAGS"
-AC_SUBST(MODULE_XML)
+LIBS="$LIBS $XML_LIBS"
#################################################
# check for automount support
@@ -3434,6 +3349,48 @@ AC_ARG_WITH(python,
esac ])
AC_SUBST(PYTHON)
+for i in `echo $default_modules | sed -e's/,/ /g'`
+do
+ dnl Set to shared instead of static when dlopen() is available?
+ eval MODULE_$i=STATIC
+done
+
+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($MODULE_pdb_xml, pdb_xml, modules/xml.o, bin/xml.so PDB)
+SMB_MODULE($MODULE_pdb_mysql, pdb_mysql, modules/mysql.o, bin/mysql.so, PDB)
+SMB_MODULE($MODULE_pdb_ldap, pdb_ldap, passdb/pdb_ldap.o, bin/pdb_ldap.so, PDB)
+SMB_MODULE($MODULE_pdb_smbpasswd, pdb_smbpasswd, passdb/pdb_smbpasswd.o, bin/smbpasswd.so, PDB)
+SMB_MODULE($MODULE_pdb_tdb, pdb_tdbsam, passdb/pdb_tdb.o, bin/tdb.so, PDB)
+SMB_MODULE($MODULE_pdb_nisplussam, pdb_nisplussam, passdb/pdb_nisplus.o, bin/nisplus.so, PDB)
+SMB_MODULE(STATIC, pdb_guest, passdb/pdb_guest.o, bin/pdb_guest.so, PDB)
+SMB_SUBSYSTEM(PDB)
+
+SMB_MODULE($MODULE_rpc_lsa, rpc_lsa, \$(RPC_LSA_OBJ), bin/librpc_lsa.so, RPC)
+SMB_MODULE($MODULE_rpc_reg, rpc_reg, \$(RPC_REG_OBJ), bin/librpc_reg.so, RPC)
+SMB_MODULE($MODULE_rpc_wks, rpc_wks, \$(RPC_WKS_OBJ), bin/librpc_wks.so, RPC)
+SMB_MODULE($MODULE_rpc_netlog, rpc_net, \$(RPC_NETLOG_OBJ), bin/librpc_netlog.so, RPC)
+SMB_MODULE($MODULE_rpc_dfs, rpc_dfs, \$(RPC_DFS_OBJ), bin/librpc_dfs.so, RPC)
+SMB_MODULE($MODULE_rpc_srv, rpc_srv, \$(RPC_SVC_OBJ), bin/librpc_srvsvc.so, RPC)
+SMB_MODULE($MODULE_rpc_spoolss, rpc_spoolss, \$(RPC_SPOOLSS_OBJ), bin/librpc_spoolss.so, RPC)
+SMB_SUBSYSTEM(RPC)
+
#################################################
# do extra things if we are running insure