From 61447dfbbfe275e3704ff939480f38629b52064a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 14 Mar 2009 20:56:26 +0100 Subject: Allow using external libtalloc. --- source3/autogen.sh | 2 +- source3/configure.in | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'source3') 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 -- cgit