From f236700ef67d4f93ec56ec7808584552e94e0dfe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 13 May 2004 10:20:53 +0000 Subject: r665: merge over the new build system from my tmp branch to the main SAMBA_4_0 tree. NOTE: that it's not completely ready, but it's functional:-) metze (This used to be commit c78a2ddb28ec50d6570a83b1f66f18a5c3621731) --- source4/aclocal.m4 | 92 ++---------------------------------------------------- 1 file changed, 3 insertions(+), 89 deletions(-) (limited to 'source4/aclocal.m4') diff --git a/source4/aclocal.m4 b/source4/aclocal.m4 index f7828a080f..5d0d11cd58 100644 --- a/source4/aclocal.m4 +++ b/source4/aclocal.m4 @@ -36,95 +36,6 @@ if test $ac_cv_dirent_d_off = yes; then fi ]) -dnl Specify the default build method of this module -dnl SMB_MODULE_DEFAULT(1:name,2:default_build) -AC_DEFUN(SMB_MODULE_DEFAULT, -[ - dnl Fall back to static if platform does not support shared libraries - [MODULE_DEFAULT_][$1]=$2 - - if test x"$[MODULE_DEFAULT_][$1]" = xSHARED -a x"$BLDSHARED" = xfalse; then - [MODULE_DEFAULT_][$1]=STATIC - fi -]) - -dnl Mark specified module as shared -dnl SMB_MODULE(1:name,2:subsystem,3:default_build,4:object_files,5:private_proto_file,6:libs,7:whatif-static,8:whatif-shared,9:whatif-not) -AC_DEFUN(SMB_MODULE, -[ - AC_MSG_CHECKING([how to build $1]) - if test -z "$[MODULE_DEFAULT_][$1]"; then - [MODULE_DEFAULT_][$1]=$3 - - if test x"$[MODULE_DEFAULT_][$1]" = xSHARED -a x"$BLDSHARED" = xfalse; then - [MODULE_DEFAULT_][$1]=STATIC - fi - fi - - if test "$[MODULE_][$1]"; then - DEST=$[MODULE_][$1] - elif test "$[MODULE_]translit([$2], [A-Z], [a-z])" -a x"$[MODULE_DEFAULT_][$1]" != xNOT; then - DEST=$[MODULE_]translit([$2], [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]) - $2_MODULES="$$2_MODULES bin/$1.$SHLIBEXT" - [MODULE_][$1][_PROTO]="$5" - [MODULE_][$1][_LIBS]="$6" - AC_MSG_RESULT([shared]) - [$8] - string_shared_modules="$string_shared_modules $1" - elif test x"$DEST" = xSTATIC; then - [init_static_modules_]translit([$2], [A-Z], [a-z])="$[init_static_modules_]translit([$2], [A-Z], [a-z]) $1_init();" - string_static_modules="$string_static_modules $1" - [MODULE_][$1][_PROTO]="$5" - $2_STATIC="$$2_STATIC $4" - $2_LIBS="$$2_LIBS $6" - [$7] - AC_MSG_RESULT([static]) - else - string_ignored_modules="$string_ignored_modules $1" - [$9] - AC_MSG_RESULT([not]) - fi -]) - -dnl SMB_SUBSYSTEM(1:name,2:init_objectfile,3:extra_objectfiles,4:public_proto_header,5:private_proto_header,6:libs) -AC_DEFUN(SMB_SUBSYSTEM, -[ - dnl the core object files of the subsystem - $1_BASE="$2 $3" - AC_SUBST($1_BASE) - - dnl the staticly linked modules of the subsystem - AC_SUBST($1_STATIC) - - dnl all object files of the subsystem - $1_OBJS="$$1_BASE $$1_STATIC" - AC_SUBST($1_OBJS) - - dnl the libs required by the subsystem - $1_LIBS="$6 $$1_LIBS" - AC_SUBST($1_LIBS) - - dnl the shared objects modules of the subsystem - AC_SUBST($1_MODULES) - - dnl the public_prototype_header file - $1_PUBLIC_HEADER="$4" - AC_SUBST($1_PUBLIC_PROTO) - - dnl the private_prototype_header file - $1_PRIVATE_HEADER="$5" - AC_SUBST($1_PRIVATE_PROTO) - - AC_DEFINE_UNQUOTED([static_init_]translit([$1], [A-Z], [a-z]), [{$init_static_modules_]translit([$1], [A-Z], [a-z])[}], [Static init functions]) - ifelse([$2], , :, [rm -f $2]) -]) - dnl AC_PROG_CC_FLAG(flag) AC_DEFUN(AC_PROG_CC_FLAG, [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1, @@ -768,3 +679,6 @@ AC_DEFUN(PKG_CHECK_MODULES, [ ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) + +sinclude(build/smb_build/public.m4) +sinclude(build/smb_build/core.m4) -- cgit