diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/Makefile.in | 10 | ||||
-rw-r--r-- | source4/aclocal.m4 | 41 | ||||
-rw-r--r-- | source4/configure.in | 48 | ||||
-rw-r--r-- | source4/ntvfs/config.m4 | 21 | ||||
-rw-r--r-- | source4/rpc_server/config.m4 | 8 |
5 files changed, 57 insertions, 71 deletions
diff --git a/source4/Makefile.in b/source4/Makefile.in index 4baa3f1078..887b9b24ea 100644 --- a/source4/Makefile.in +++ b/source4/Makefile.in @@ -201,16 +201,6 @@ AUTH_OBJ = auth/auth.o auth/auth_sam.o \ SMBD_OBJ_MAIN = smbd/server.o -NTVFS_CSM_MAIN = ntvfs/tank/vfs_tank.o -#we don't want these in main proto.h -NTVFS_CSM_OBJ = ntvfs/tank/csm_init.o ntvfs/tank/csm_unlink.o \ - ntvfs/tank/csm_util.o ntvfs/tank/csm_error.o ntvfs/tank/csm_lookup.o \ - ntvfs/tank/csm_blockmap.o ntvfs/tank/csm_dir.o \ - ntvfs/tank/csm_fcntl.o ntvfs/tank/csm_io.o ntvfs/tank/csm_mkdir.o \ - ntvfs/tank/csm_open.o ntvfs/tank/csm_rename.o \ - ntvfs/tank/csm_attr.o ntvfs/tank/csm_truncate.o \ - ntvfs/tank/csm_fd.o - NTVFS_CIFS_OBJ = ntvfs/cifs/vfs_cifs.o NTVFS_SIMPLE_OBJ = ntvfs/simple/vfs_simple.o ntvfs/simple/svfs_util.o NTVFS_IPC_OBJ = ntvfs/ipc/vfs_ipc.o diff --git a/source4/aclocal.m4 b/source4/aclocal.m4 index b80a44f50f..b40152a6ee 100644 --- a/source4/aclocal.m4 +++ b/source4/aclocal.m4 @@ -36,34 +36,55 @@ if test $ac_cv_dirent_d_off = yes; then fi ]) +dnl Specify the default build method of this module +dnl SMB_MODULE_DEFAULT(name,default_build) +AC_DEFUN(SMB_MODULE_DEFAULT, +[ + dnl Fall back to static if dlopen() is not available + eval MODULE_DEFAULT_$1=$2 + + if test x"MODULE_DEFAULT_$1" = xSHARED -a x"$ac_cv_func_dlopen" != xyes; then + eval MODULE_DEFAULT_$1=STATIC + fi +]) + dnl Mark specified module as shared -dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared) +dnl SMB_MODULE(name,default_build,static_files,shared_files,subsystem,whatif-static,whatif-shared,whatif-not) AC_DEFUN(SMB_MODULE, [ AC_MSG_CHECKING([how to build $1]) + if test -z "$[MODULE_DEFAULT_][$1]"; then + eval MODULE_DEFAULT_$1=$2 + + if test x"MODULE_DEFAULT_$1" = xSHARED -a x"$ac_cv_func_dlopen" != xyes; then + eval MODULE_DEFAULT_$1=STATIC + fi + fi + 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]) + elif test "$[MODULE_]translit([$5], [A-Z], [a-z])" -a "$[MODULE_DEFAULT_][$1]"; then + DEST=$[MODULE_]translit([$5], [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" + $5_MODULES="$$5_MODULES $4" AC_MSG_RESULT([shared]) - [$6] + [$7] string_shared_modules="$string_shared_modules $1" 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();" + [init_static_modules_]translit([$5], [A-Z], [a-z])="$[init_static_modules_]translit([$5], [A-Z], [a-z]) $1_init();" string_static_modules="$string_static_modules $1" - $4_STATIC="$$4_STATIC $2" - AC_SUBST($4_STATIC) - [$5] + $5_STATIC="$$5_STATIC $3" + AC_SUBST($5_STATIC) + [$6] AC_MSG_RESULT([static]) else - string_ignored_modules="$string_ignored_modules $1" + string_ignored_modules="$string_ignored_modules $1" + [$8] AC_MSG_RESULT([not]) fi ]) diff --git a/source4/configure.in b/source4/configure.in index 746fb9eb89..b0a8b950a4 100644 --- a/source4/configure.in +++ b/source4/configure.in @@ -229,18 +229,6 @@ AC_VALIDATE_CACHE_SYSTEM_TYPE DYNEXP= -dnl Add modules that have to be built by default here -dnl These have to be built static: -default_static_modules="ntvfs_ipc ntvfs_simple ntvfs_print ntvfs_cifs dcerpc_rpcecho dcerpc_epmapper dcerpc_remote" - -dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules="" - -if test "x$developer" = xyes; then - default_static_modules="$default_static_modules" - default_shared_modules="$default_shared_modules" -fi - # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -2791,37 +2779,33 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) sinclude(nsswitch/config.m4) sinclude(popt/config.m4) -for i in `echo $default_static_modules | sed -e's/,/ /g'` -do - eval MODULE_DEFAULT_$i=STATIC -done - -for i in `echo $default_shared_modules | sed -e's/,/ /g'` -do - dnl Fall back to static if dlopen() is not available - eval MODULE_DEFAULT_$i=STATIC - - if test x"$ac_cv_func_dlopen" = xyes; then - eval MODULE_DEFAULT_$i=SHARED - fi -done - -dnl Always built these modules static -AC_ARG_WITH(static-modules, -[ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in], +dnl exclude these modules +AC_ARG_WITH(exclude-modules, +[ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build], [ if test $withval; then for i in `echo $withval | sed -e's/,/ /g'` do - eval MODULE_$i=STATIC + eval MODULE_$i=NOT done fi ]) +dnl Always built these modules shared AC_ARG_WITH(shared-modules, [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared], [ if test $withval; then for i in `echo $withval | sed -e's/,/ /g'` do - eval MODULE_$i=SHARED + eval MODULE_$i=SHARED + done +fi ]) + +dnl Always built these modules static +AC_ARG_WITH(static-modules, +[ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in], +[ if test $withval; then + for i in `echo $withval | sed -e's/,/ /g'` + do + eval MODULE_$i=STATIC done fi ]) diff --git a/source4/ntvfs/config.m4 b/source4/ntvfs/config.m4 index 22ab6dadfa..b9d79e61de 100644 --- a/source4/ntvfs/config.m4 +++ b/source4/ntvfs/config.m4 @@ -1,18 +1,9 @@ -default_static_modules="$default_static_modules ntvfs_ipc ntvfs_simple ntvfs_print ntvfs_cifs" +dnl # NTVFS Server subsystem -SMB_MODULE(ntvfs_cifs, \$(NTVFS_CIFS_OBJ), "bin/cifs.$SHLIBEXT$", NTVFS) -SMB_MODULE(ntvfs_simple, \$(NTVFS_SIMPLE_OBJ), "bin/ntvfs_simple.$SHLIBEXT$", NTVFS) -SMB_MODULE(ntvfs_print, \$(NTVFS_PRINT_OBJ), "bin/ntvfs_print.$SHLIBEXT$", NTVFS) -SMB_MODULE(ntvfs_ipc, \$(NTVFS_IPC_OBJ), "bin/ntvfs_ipc.$SHLIBEXT$", NTVFS) -SMB_MODULE(ntvfs_posix, \$(NTVFS_POSIX_OBJ), "bin/ntvfs_posix.$SHLIBEXT$", NTVFS) - -# Tank FS -SMB_MODULE(ntvfs_csm, \$(NTVFS_CSM_OBJ), "bin/ntvfs_csm.$SHLIBEXT$", NTVFS) -STFS_ENABLED="#" -if test "$MODULE_ntvfs_csm"; then - SMBD_EXTRA_LIBS="$SMBD_EXTRA_LIBS \$\(STFS_LIBS\)" - STFS_ENABLED= -fi -AC_SUBST(STFS_ENABLED) +SMB_MODULE(ntvfs_cifs, STATIC, \$(NTVFS_CIFS_OBJ), "bin/cifs.$SHLIBEXT$", NTVFS) +SMB_MODULE(ntvfs_simple, STATIC, \$(NTVFS_SIMPLE_OBJ), "bin/ntvfs_simple.$SHLIBEXT$", NTVFS) +SMB_MODULE(ntvfs_print, STATIC, \$(NTVFS_PRINT_OBJ), "bin/ntvfs_print.$SHLIBEXT$", NTVFS) +SMB_MODULE(ntvfs_ipc, STATIC, \$(NTVFS_IPC_OBJ), "bin/ntvfs_ipc.$SHLIBEXT$", NTVFS) +SMB_MODULE(ntvfs_posix, NOT, \$(NTVFS_POSIX_OBJ), "bin/ntvfs_posix.$SHLIBEXT$", NTVFS) SMB_SUBSYSTEM(NTVFS,ntvfs/ntvfs_base.o) diff --git a/source4/rpc_server/config.m4 b/source4/rpc_server/config.m4 index cdc4f65186..570a5f7581 100644 --- a/source4/rpc_server/config.m4 +++ b/source4/rpc_server/config.m4 @@ -1,7 +1,7 @@ -default_static_modules="$default_static_modules dcerpc_rpcecho dcerpc_epmapper dcerpc_remote" +dnl # DCERPC Server subsystem -SMB_MODULE(dcerpc_rpcecho, \$(DCERPC_RPCECHO_OBJ), "bin/dcerpc_rpcecho.$SHLIBEXT$", DCERPC) -SMB_MODULE(dcerpc_epmapper, \$(DCERPC_EPMAPPER_OBJ), "bin/dcerpc_epmapper.$SHLIBEXT$", DCERPC) -SMB_MODULE(dcerpc_remote, \$(DCERPC_REMOTE_OBJ), "bin/dcerpc_remote.$SHLIBEXT$", DCERPC) +SMB_MODULE(dcerpc_rpcecho, STATIC, \$(DCERPC_RPCECHO_OBJ), "bin/dcerpc_rpcecho.$SHLIBEXT$", DCERPC) +SMB_MODULE(dcerpc_epmapper, STATIC, \$(DCERPC_EPMAPPER_OBJ), "bin/dcerpc_epmapper.$SHLIBEXT$", DCERPC) +SMB_MODULE(dcerpc_remote, STATIC, \$(DCERPC_REMOTE_OBJ), "bin/dcerpc_remote.$SHLIBEXT$", DCERPC) SMB_SUBSYSTEM(DCERPC,rpc_server/dcerpc_server.o) |