diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 04:57:58 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 16:31:07 +0200 |
commit | 3174de69d5520bf3ef50ab89d7dab6729a3ead38 (patch) | |
tree | aab4c301d879d07ca593e72a0b4fb64dd59f0f32 /source3 | |
parent | 223b30f59367608558a3c8d4fadff3d5761b3765 (diff) | |
download | samba-3174de69d5520bf3ef50ab89d7dab6729a3ead38.tar.gz samba-3174de69d5520bf3ef50ab89d7dab6729a3ead38.tar.bz2 samba-3174de69d5520bf3ef50ab89d7dab6729a3ead38.zip |
Fix build with external talloc.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 55 | ||||
-rw-r--r-- | source3/samba4.m4 | 4 |
2 files changed, 31 insertions, 28 deletions
diff --git a/source3/configure.in b/source3/configure.in index 5ea214b6f5..8af3da9508 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -24,32 +24,6 @@ m4_include(pkg.m4) AC_LIBREPLACE_CC_CHECKS -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 test 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 - LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}" -done -AC_SUBST(LIBTALLOC_OBJ0) - m4_include(../lib/tevent/libtevent.m4) LIBTEVENT_OBJ0="" @@ -77,7 +51,6 @@ done AC_SUBST(LIBTDB_OBJ0) SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include -I. -I${srcdir-.}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace" -SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns" @@ -4745,7 +4718,33 @@ LINK_LIBSMBCLIENT=STATIC # TODO: for talloc and tdb (at least), these should # be extracted from their respective source directories # -SMB_LIBRARY(talloc, 1) +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(LIBTALLOC, talloc >= 1.3.0, + [ enable_external_libtalloc=yes ], + [ if test 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) + SMB_LIBRARY(talloc, 1) + LIBTALLOC_OBJ0="" + for obj in ${TALLOC_OBJ}; do + LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}" + done + SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}" + AC_SUBST(LIBTALLOC_OBJ0) +fi + SMB_LIBRARY(tdb, 1) SMB_LIBRARY(netapi, 0) SMB_LIBRARY(smbclient, 0) diff --git a/source3/samba4.m4 b/source3/samba4.m4 index 6b7c140bc1..0d7834fc26 100644 --- a/source3/samba4.m4 +++ b/source3/samba4.m4 @@ -75,6 +75,10 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= TALLOC_MIN_VERSION, SMB_INCLUDE_MK(../lib/talloc/config.mk) ] ) +# Tallocdir isn't always set by the Samba3 c +tallocdir=../lib/talloc +AC_SUBST(tallocdir) +CFLAGS="$CFLAGS -I../lib/talloc" SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= TDB_MIN_VERSION, [], |