summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-14 20:56:26 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-14 20:56:26 +0100
commit61447dfbbfe275e3704ff939480f38629b52064a (patch)
treebf730bbc723d775ff32eabe6251f07b1a9e93b5d /source3
parent66a26a0ac27462361cb94e3ef1744d275bd95da1 (diff)
downloadsamba-61447dfbbfe275e3704ff939480f38629b52064a.tar.gz
samba-61447dfbbfe275e3704ff939480f38629b52064a.tar.bz2
samba-61447dfbbfe275e3704ff939480f38629b52064a.zip
Allow using external libtalloc.
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/autogen.sh2
-rw-r--r--source3/configure.in21
2 files changed, 21 insertions, 2 deletions
diff --git a/source3/autogen.sh b/source3/autogen.sh
index 1a33eb22cc..9ade370cd4 100755
--- a/source3/autogen.sh
+++ b/source3/autogen.sh
@@ -65,7 +65,7 @@ echo "$0: running script/mkversion.sh"
rm -rf autom4te*.cache
rm -f configure include/config.h*
-IPATHS="-Im4 -I../lib/replace -I../source4"
+IPATHS="-Im4 -I../m4 -I../lib/replace -I../source4"
echo "$0: running $AUTOHEADER $IPATHS"
$AUTOHEADER $IPATHS || exit 1
diff --git a/source3/configure.in b/source3/configure.in
index e48ff34554..e0fb7032ce 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -20,10 +20,29 @@ AC_SUBST(builddir)
m4_include(m4/samba_version.m4)
m4_include(m4/check_path.m4)
+m4_include(pkg.m4)
AC_LIBREPLACE_CC_CHECKS
-m4_include(../lib/talloc/libtalloc.m4)
+AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])],
+[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ])
+
+if test "x$enable_external_libtalloc" != xno
+then
+ PKG_CHECK_MODULES(TALLOC, talloc >= 1.3.0,
+ [ enable_external_libtalloc=yes ],
+ [ if x$enable_external_libtalloc = xyes; then
+ AC_MSG_ERROR([Unable to find libtalloc])
+ else
+ enable_external_libtalloc=no
+ fi
+ ])
+fi
+
+if "x$enable_external_libtalloc" = xno
+then
+ m4_include(../lib/talloc/libtalloc.m4)
+fi
LIBTALLOC_OBJ0=""
for obj in ${TALLOC_OBJ}; do