summaryrefslogtreecommitdiff
path: root/source3/aclocal.m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-03-18 12:07:43 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-03-18 12:07:43 +0000
commit85b5a5d427a47108ba6421c594ea1ccb56dc7285 (patch)
tree5688ac1b13c277d425ba3e97a729b7c0ee7c2491 /source3/aclocal.m4
parent743d429d9b425aa84d89bd65c08beb06374026c8 (diff)
downloadsamba-85b5a5d427a47108ba6421c594ea1ccb56dc7285.tar.gz
samba-85b5a5d427a47108ba6421c594ea1ccb56dc7285.tar.bz2
samba-85b5a5d427a47108ba6421c594ea1ccb56dc7285.zip
Put in some macros for the new modules system
(This used to be commit b6272a8f18c823be3056d9f03810be75e9129cce)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index 7bec88dd87..87acceb2ae 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -36,6 +36,31 @@ if test $ac_cv_dirent_d_off = yes; then
fi
])
+dnl Mark specified module as shared
+dnl SMB_MODULE(type,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_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)
+ AC_MSG_RESULT([static])
+ else
+ AC_MSG_RESULT([not])
+ fi
+])
+
+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,