diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-05-06 14:08:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-05-07 18:34:00 +0200 |
commit | 95421552be87d17353ba5a351a096e2b4bfdfae8 (patch) | |
tree | 3719ad157309dea78ef9b268987d0636ec6223cd | |
parent | 674a78d60a7dbc4d2af1b229a6b3b2a96c2517f3 (diff) | |
download | samba-95421552be87d17353ba5a351a096e2b4bfdfae8.tar.gz samba-95421552be87d17353ba5a351a096e2b4bfdfae8.tar.bz2 samba-95421552be87d17353ba5a351a096e2b4bfdfae8.zip |
Reintroduce merged build, using waf to build smbtorture4.
-rw-r--r-- | source3/Makefile.in | 14 | ||||
-rw-r--r-- | source3/configure.in | 43 |
2 files changed, 56 insertions, 1 deletions
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=""], [ |