summaryrefslogtreecommitdiff
path: root/source/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
commit3e283989ffc41d55f75f9dacbedca0cf920208fb (patch)
treef39df8c198216bba04128a625c8879dc6ca1660e /source/aclocal.m4
parent30658cd63d55f2cbaf1e7e506dec71959f9069c3 (diff)
downloadsamba-3e283989ffc41d55f75f9dacbedca0cf920208fb.tar.gz
Add selection of the modules to configure (merge from HEAD)
Diffstat (limited to 'source/aclocal.m4')
-rw-r--r--source/aclocal.m437
1 files changed, 37 insertions, 0 deletions
diff --git a/source/aclocal.m4 b/source/aclocal.m4
index 7bec88dd87c..f470e2e8b0e 100644
--- a/source/aclocal.m4
+++ b/source/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,