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 /source3/aclocal.m4 | |
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)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r-- | source3/aclocal.m4 | 26 |
1 files changed, 17 insertions, 9 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]) |