diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in index ab5e81fb3c..98f41d61e5 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 test "x$enable_external_libtalloc" = xno +then + m4_include(../lib/talloc/libtalloc.m4) +fi LIBTALLOC_OBJ0="" for obj in ${TALLOC_OBJ}; do |