diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-03-24 18:25:31 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-03-24 18:25:31 +0000 |
commit | acffe03f936268357b61c48631a8842c4c2e623e (patch) | |
tree | 08d8e83ab929eb76c94fec3416255aa5c0902ef3 | |
parent | 75b3445d04fc5c24f39fb18157ac79b1b82c6ce6 (diff) | |
download | samba-acffe03f936268357b61c48631a8842c4c2e623e.tar.gz samba-acffe03f936268357b61c48631a8842c4c2e623e.tar.bz2 samba-acffe03f936268357b61c48631a8842c4c2e623e.zip |
Simplify modules interface and make it easier to build
complete subsystems as modules (--with-shared-modules=rpc,pdb_xml,pdb_ldap
works now, for example)
(This used to be commit f622bdc691fabed218598fb0546b9e933aed63ed)
-rw-r--r-- | source3/aclocal.m4 | 26 | ||||
-rw-r--r-- | source3/configure.in | 58 |
2 files changed, 39 insertions, 45 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 15508206c3..4814a86a96 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -37,18 +37,26 @@ fi ]) dnl Mark specified module as shared -dnl SMB_MODULE(type,name,static_files,shared_files,subsystem) +dnl SMB_MODULE(name,static_files,shared_files,subsystem) AC_DEFUN(SMB_MODULE, [ - AC_MSG_CHECKING([how to build $2]) - if test x"$1" = xSHARED; then - AC_DEFINE([$2][_init], [init_module], [Whether to build $2 as shared module]) - $5_MODULES="$$5_MODULES $4" + AC_MSG_CHECKING([how to build $1]) + if test "$[MODULE_][$1]"; then + DEST=$[MODULE_][$1] + elif test "$[MODULE_]translit([$4], [A-Z], [a-z])"; then + DEST=$[MODULE_]translit([$4], [A-Z], [a-z]) + else + DEST=$[MODULE_DEFAULT_][$1] + fi + + if test x"$DEST" = xSHARED; then + AC_DEFINE([$1][_init], [init_module], [Whether to build $1 as shared module]) + $5_MODULES="$$4_MODULES $3" AC_MSG_RESULT([shared]) - elif test x"$1" = xSTATIC; then - [init_static_modules_]translit([$5], [A-Z], [a-z])="$[init_static_modules_]translit([$5], [A-Z], [a-z]) $2_init();" - $5_STATIC="$$5_STATIC $3" - AC_SUBST($5_STATIC) + elif test x"$DEST" = xSTATIC; then + [init_static_modules_]translit([$4], [A-Z], [a-z])="$[init_static_modules_]translit([$4], [A-Z], [a-z]) $1_init();" + $5_STATIC="$$4_STATIC $2" + AC_SUBST($4_STATIC) AC_MSG_RESULT([static]) else AC_MSG_RESULT([not]) diff --git a/source3/configure.in b/source3/configure.in index 9ccbe08fa3..cbd1eec710 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -239,7 +239,7 @@ 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" +default_modules="pdb_smbpasswd pdb_tdbsam pdb_unix rpc_lsa rpc_samr rpc_reg rpc_wks rpc_net rpc_dfs rpc_srv rpc_spoolss" # # Config CPPFLAG settings for strange OS's that must be set @@ -2449,23 +2449,6 @@ AC_ARG_WITH(tdbsam, AC_MSG_RESULT(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_NISPLUS_SAM,1,[Whether to include nisplus SAM support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - ######################################################################################## ## ## END OF TESTS FOR SAM BACKENDS. @@ -3357,7 +3340,7 @@ 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 + eval MODULE_DEFAULT_$i=STATIC done AC_ARG_WITH(static-modules, @@ -3378,27 +3361,30 @@ AC_ARG_WITH(shared-modules, 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/ldapsam.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/tdbsam.so, PDB) -SMB_MODULE($MODULE_pdb_nisplus, pdb_nisplussam, passdb/pdb_nisplus.o, bin/nisplussam.so, PDB) -SMB_MODULE($MODULE_pdb_unix, pdb_unix, passdb/pdb_unix.o, bin/unixsam.so, PDB) -SMB_MODULE(STATIC, pdb_guest, passdb/pdb_guest.o, bin/guest.so, PDB) +# Always built these modules static +MODULE_pdb_guest=STATIC + +SMB_MODULE(pdb_xml, modules/xml.o, bin/xml.so, PDB) +SMB_MODULE(pdb_mysql, modules/mysql.o, bin/mysql.so, PDB) +SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o, bin/ldapsam.so, PDB) +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($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_MODULE($MODULE_rpc_samr, rpc_samr, \$(RPC_SAMR_OBJ), bin/librpc_samr.so, RPC) +SMB_MODULE(rpc_lsa, \$(RPC_LSA_OBJ), bin/librpc_lsarpc.so, RPC) +SMB_MODULE(rpc_reg, \$(RPC_REG_OBJ), bin/librpc_reg.so, RPC) +SMB_MODULE(rpc_wks, \$(RPC_WKS_OBJ), bin/librpc_wks.so, RPC) +SMB_MODULE(rpc_net, \$(RPC_NETLOG_OBJ), bin/librpc_netlog.so, RPC) +SMB_MODULE(rpc_dfs, \$(RPC_DFS_OBJ), bin/librpc_dfs.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($MODULE_charset_weird, charset_weird, modules/developer.o, bin/developer.so, CHARSET) +SMB_MODULE(charset_weird, modules/developer.o, bin/developer.so, CHARSET) SMB_SUBSYSTEM(CHARSET) ################################################# |