From 6c79213eb80283bb211d2e2161c25337c0a549b7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 7 Sep 2007 14:25:03 +0000 Subject: r24997: Re-enable use of system-provided tdb and/or talloc when available. (This used to be commit 0a3b53fd2cbd15c1e5839990e721bbe4d2f7d4af) --- source4/build/m4/public.m4 | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'source4/build/m4') diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 15f53c7643..9e82e6aaf1 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -68,20 +68,13 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config." - SMB_EXT_LIB($1) - SMB_ENABLE($1, NO) - $4 - + ac_cv_$1_found=no else if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then AC_MSG_CHECKING(for $2) - if test "$SMB_$1"x = "NO"x ; then - SMB_ENABLE($1, NO) - AC_MSG_RESULT(disabled) - $4 - elif $PKG_CONFIG --exists '$2' ; then - AC_MSG_RESULT(yes) + if $PKG_CONFIG --exists '$2' ; then + AC_MSG_RESULT(yes) $1_CFLAGS="`$PKG_CONFIG --cflags '$2'`" @@ -101,23 +94,27 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], [`$PKG_CONFIG --cflags-only-other '$2'`], [`$PKG_CONFIG --cflags-only-I '$2'`], [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`]) - $3 + ac_cv_$1_found=yes else - SMB_EXT_LIB($1) - SMB_ENABLE($1, NO) AC_MSG_RESULT(no) $PKG_CONFIG --errors-to-stdout --print-errors '$2' - $4 + ac_cv_$1_found=no fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://pkg-config.freedesktop.org/" - SMB_EXT_LIB($1) - SMB_ENABLE($1, NO) - $4 + ac_cv_$1_found=no fi fi + if test x$ac_cv_$1_found = x"yes"; then + ifelse([$3], [], [echo -n ""], [$3]) + else + ifelse([$4], [], [ + SMB_EXT_LIB($1) + SMB_ENABLE($1, NO) + ], [$4]) + fi ]) dnl SMB_INCLUDE_MK(file) -- cgit