summaryrefslogtreecommitdiff
path: root/source3/aclocal.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-04-15 12:02:24 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-04-15 12:02:24 +0000
commit37dc79d2b6a29841cf4249cb6aba646fd2d1f83c (patch)
tree5ddec6f49051c281ba6a4c8c6bcebc98b29623a4 /source3/aclocal.m4
parent8284032ec58ab5429b3890cb91c762244b74ee82 (diff)
downloadsamba-37dc79d2b6a29841cf4249cb6aba646fd2d1f83c.tar.gz
samba-37dc79d2b6a29841cf4249cb6aba646fd2d1f83c.tar.bz2
samba-37dc79d2b6a29841cf4249cb6aba646fd2d1f83c.zip
Add selection of the modules to configure (merge from HEAD)
(This used to be commit 3e283989ffc41d55f75f9dacbedca0cf920208fb)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m437
1 files changed, 37 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index 7bec88dd87..f470e2e8b0 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -36,6 +36,43 @@ if test $ac_cv_dirent_d_off = yes; then
fi
])
+dnl Mark specified module as shared
+dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared)
+AC_DEFUN(SMB_MODULE,
+[
+ AC_MSG_CHECKING([how to build $1])
+ if test "$[MODULE_][$1]"; then
+ DEST=$[MODULE_][$1]
+ elif test "$[MODULE_]translit([$4], [A-Z], [a-z])" -a "$[MODULE_DEFAULT_][$1]"; 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])
+ $4_MODULES="$$4_MODULES $3"
+ AC_MSG_RESULT([shared])
+ [$6]
+ 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();"
+ string_static_modules="$string_static_modules $1"
+ $4_STATIC="$$4_STATIC $2"
+ AC_SUBST($4_STATIC)
+ [$5]
+ AC_MSG_RESULT([static])
+ else
+ AC_MSG_RESULT([not])
+ fi
+ MODULES_CLEAN="$MODULES_CLEAN $2 $3"
+])
+
+AC_DEFUN(SMB_SUBSYSTEM,
+[
+ AC_SUBST($1_STATIC)
+ AC_SUBST($1_MODULES)
+ AC_DEFINE_UNQUOTED([static_init_]translit([$1], [A-Z], [a-z]), [{$init_static_modules_]translit([$1], [A-Z], [a-z])[}], [Static init functions])
+])
dnl AC_PROG_CC_FLAG(flag)
AC_DEFUN(AC_PROG_CC_FLAG,