summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-27 18:00:43 +0200
committerGünther Deschner <gd@samba.org>2010-04-27 18:14:09 +0200
commit8f8e7c788a12d1e0bda9183ed765cc1048e105f7 (patch)
tree21540af7a9a35e4a0ed8579fd773a6369e2d249e /source3/configure.in
parent158d41b6b4264e7ece93cf77a15e70ccbf8673b8 (diff)
downloadsamba-8f8e7c788a12d1e0bda9183ed765cc1048e105f7.tar.gz
samba-8f8e7c788a12d1e0bda9183ed765cc1048e105f7.tar.bz2
samba-8f8e7c788a12d1e0bda9183ed765cc1048e105f7.zip
Revert "s3-build: Remove --enable-merged support."
This reverts commit f8fc7fcbeb8141c5b2775e2219bae17c55ad4a3c. Was that pushed by coincidence ? merged build is really, really required over here.
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in51
1 files changed, 48 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index a30f3018e3..9a190cc872 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -195,15 +195,17 @@ AC_ARG_WITH(profiling-data,
)
dnl Checks for programs.
+merged_build_possible=yes
+
AC_PROG_INSTALL
AC_PROG_AWK
# Check for GNU make
m4_include(../m4/check_make.m4)
-AC_SAMBA_GNU_MAKE([true], [true])
+AC_SAMBA_GNU_MAKE([true], [merged_build_possible=no])
# 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)
@@ -1829,6 +1831,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])
@@ -4232,6 +4235,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"
@@ -6620,8 +6627,39 @@ 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"
+ m4_include(samba4.m4)
+ USESHARED="$saved_USESHARED"
+fi
+
AC_SUBST(ZLIB_LIBS)
AC_SUBST(ZLIB_OBJS)
AC_ZLIB([ZLIB_OBJS=""], [
@@ -6693,7 +6731,14 @@ SMBD_LIBS="$samba_dmapi_libs"
AC_SUBST(SMBD_LIBS)
CFLAGS="${CFLAGS} \$(FLAGS)"
-CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
+
+if test x$MERGED_BUILD != x1; then
+ CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
+else
+ if test x"$BLDSHARED" = x"true" ; then
+ LDFLAGS="$LDFLAGS -L./bin"
+ fi
+fi
AC_SUBST(MAKEFILE)
if test x$samba_cv_gnu_make = xyes; then