1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r24997: Re-enable use of system-provided tdb and/or talloc when available.

(This used to be commit 0a3b53fd2c)
This commit is contained in:
Jelmer Vernooij 2007-09-07 14:25:03 +00:00 committed by Gerald (Jerry) Carter
parent 9c7ae7ec55
commit 6c79213eb8
2 changed files with 28 additions and 33 deletions

View File

@ -68,20 +68,13 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config." echo "*** to the full path to pkg-config."
echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config." echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
SMB_EXT_LIB($1) ac_cv_$1_found=no
SMB_ENABLE($1, NO)
$4
else else
if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
AC_MSG_CHECKING(for $2) AC_MSG_CHECKING(for $2)
if test "$SMB_$1"x = "NO"x ; then if $PKG_CONFIG --exists '$2' ; then
SMB_ENABLE($1, NO) AC_MSG_RESULT(yes)
AC_MSG_RESULT(disabled)
$4
elif $PKG_CONFIG --exists '$2' ; then
AC_MSG_RESULT(yes)
$1_CFLAGS="`$PKG_CONFIG --cflags '$2'`" $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-other '$2'`],
[`$PKG_CONFIG --cflags-only-I '$2'`], [`$PKG_CONFIG --cflags-only-I '$2'`],
[`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`]) [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`])
$3 ac_cv_$1_found=yes
else else
SMB_EXT_LIB($1)
SMB_ENABLE($1, NO)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
$PKG_CONFIG --errors-to-stdout --print-errors '$2' $PKG_CONFIG --errors-to-stdout --print-errors '$2'
$4 ac_cv_$1_found=no
fi fi
else else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 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/" echo "*** See http://pkg-config.freedesktop.org/"
SMB_EXT_LIB($1) ac_cv_$1_found=no
SMB_ENABLE($1, NO)
$4
fi fi
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) dnl SMB_INCLUDE_MK(file)

View File

@ -27,23 +27,21 @@ m4_include(lib/charset/config.m4)
m4_include(lib/socket/config.m4) m4_include(lib/socket/config.m4)
m4_include(nsswitch/nsstest.m4) m4_include(nsswitch/nsstest.m4)
#SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.0, SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.0,
# [samba_cv_internal_talloc=no], [],
# [samba_cv_internal_talloc=yes]) [
samba_cv_internal_talloc=yes m4_include(lib/talloc/libtalloc.m4)
if test x"$samba_cv_internal_talloc" = x"yes"; then SMB_INCLUDE_MK(lib/talloc/config.mk)
m4_include(lib/talloc/libtalloc.m4) ]
SMB_INCLUDE_MK(lib/talloc/config.mk) )
fi
#SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0, SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0,
# [samba_cv_internal_tdb=no], [],
# [samba_cv_internal_tdb=yes]) [
samba_cv_internal_tdb=yes m4_include(lib/tdb/libtdb.m4)
if test x"$samba_cv_internal_tdb" = x"yes"; then SMB_INCLUDE_MK(lib/tdb/config.mk)
m4_include(lib/tdb/libtdb.m4) ]
SMB_INCLUDE_MK(lib/tdb/config.mk) )
fi
m4_include(lib/ldb/sqlite3.m4) m4_include(lib/ldb/sqlite3.m4)
m4_include(lib/ldb/libldb.m4) m4_include(lib/ldb/libldb.m4)