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 From 0c72c503faa0506ed25067e623f9263da8e2c94c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 14 Mar 2009 21:06:41 +0100 Subject: Fix fallback if system doesn't provide talloc. --- source3/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index e0fb7032ce..6d9e198244 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -39,7 +39,7 @@ then ]) fi -if "x$enable_external_libtalloc" = xno +if test "x$enable_external_libtalloc" = xno then m4_include(../lib/talloc/libtalloc.m4) fi -- cgit From acb6018091cf202c70632fda69a34df11310d4ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 14 Mar 2009 21:08:09 +0100 Subject: Fix comment about shell in Makefile. --- source3/Makefile.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 6aabcf0c8d..56080841db 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -88,12 +88,11 @@ UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@ VPATH=@srcdir@ srcdir=@abs_srcdir@ builddir=@abs_builddir@ -SHELL=/bin/sh -DESTDIR=/ - # XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf # will search for a POSIX-compliant shell, and that might not be # /bin/sh on some platforms. I guess it's not a big problem -- mbp +SHELL=/bin/sh +DESTDIR=/ # See the autoconf manual "Installation Directory Variables" for a # discussion of the subtle use of these variables. -- cgit