From 95421552be87d17353ba5a351a096e2b4bfdfae8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 May 2010 14:08:49 +0200 Subject: Reintroduce merged build, using waf to build smbtorture4. --- source3/Makefile.in | 14 ++++++++++++++ source3/configure.in | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 13cc776115..11b5e5343c 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -3213,3 +3213,17 @@ libnetapi_examples: libnetapi clean_libnetapi_examples: $(MAKE) -C lib/netapi/examples clean + +../source4/configure: ../buildtools/scripts/configure.waf + cd ../source4 && ./autogen.sh + +samba4-configure: + @test -f ../source4/.lock-wscript || ( cd ../source4 && ./configure.developer --prefix="$(prefix)") + +.PHONY: samba4-configure + +bin/smbtorture4: samba4-configure + cd ../source4 && ../buildtools/bin/waf build --targets=smbtorture + cp ../source4/bin/smbtorture bin/smbtorture4 + +.PHONY: bin/smbtorture4 diff --git a/source3/configure.in b/source3/configure.in index c42139604b..2e677d7b64 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -195,6 +195,8 @@ AC_ARG_WITH(profiling-data, ) dnl Checks for programs. +merged_build_possible=yes + AC_PROG_INSTALL AC_PROG_AWK # Check for GNU make @@ -203,7 +205,7 @@ AC_SAMBA_GNU_MAKE([true], [true]) # Check for perl m4_include(../m4/check_perl.m4) -AC_SAMBA_PERL([true], [true]) +AC_SAMBA_PERL([true], [merged_build_possible=no]) AC_CHECK_TOOL(AR, ar) @@ -1834,6 +1836,7 @@ if test x"$BLDSHARED" != x"true"; then SHLD="shared-libraries-disabled" PICFLAG="${PIE_CFLAGS}" SHLIBEXT="shared_libraries_disabled" + merged_build_possible=no fi AC_MSG_CHECKING([used PICFLAG]) @@ -4235,6 +4238,10 @@ if test x"$with_ads_support" != x"no"; then LIBS="$ac_save_LIBS" fi +if test x"$use_ads" != xyes; then + merged_build_possible=no +fi + AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache) PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS" @@ -6623,8 +6630,42 @@ MSG fi +AC_ARG_ENABLE(merged-build, +[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], +[ enable_merged_build=$enableval ], [ enable_merged_build=auto ]) + +if test x"$enable_merged_build" = x"yes" -a \ + x"$merged_build_possible" = x"no" ; then + AC_MSG_ERROR(Merged build required but not possible) +fi + m4_include(../lib/zlib/zlib.m4) +if test x$enable_merged_build = xauto; then + # Check for python + m4_include(../m4/check_python.m4) + AC_SAMBA_PYTHON_DEVEL([true], [merged_build_possible=no]) + + AC_MSG_CHECKING([whether it would be possible to do a merged build]) + AC_MSG_RESULT([$merged_build_possible]) + + # Enable merged build automatically if possible, when in developer mode + if test "x$developer" = xyes; then + enable_merged_build=$merged_build_possible + fi +fi + +if test x$enable_merged_build = xyes; then + MERGED_BUILD=1 + saved_USESHARED="$USESHARED" + USESHARED="false" + smbtorture4_path="bin/smbtorture4" + smbtorture4_option="-t bin/smbtorture4" + AC_SUBST(smbtorture4_path) + AC_SUBST(smbtorture4_option) + USESHARED="$saved_USESHARED" +fi + AC_SUBST(ZLIB_LIBS) AC_SUBST(ZLIB_OBJS) AC_ZLIB([ZLIB_OBJS=""], [ -- cgit