s3:configure: fix the build with external talloc
authorStefan Metzmacher <metze@samba.org>
Fri, 14 Aug 2009 14:41:49 +0000 (16:41 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 17 Aug 2009 18:25:24 +0000 (20:25 +0200)
Fixes bug #6532.

metze
(cherry picked from commit 7def4ab2da002e9ecc1feaed2916035c214add9f)

source3/configure.in

index dd60c7361d0b7e932635b8b688ce214eefc47a12..892b8360a2114ae8d0f482525e528704509a4e87 100644 (file)
@@ -39,17 +39,11 @@ then
                ])
 fi
 
-if test "x$enable_external_libtalloc" = xno
+if test "x$enable_external_libtalloc" != xyes
 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=""
@@ -4748,7 +4742,18 @@ LINK_LIBSMBCLIENT=STATIC
 #  TODO: for talloc and tdb (at least), these should
 #  be extracted from their respective source directories
 #
-SMB_LIBRARY(talloc, 1)
+if test "x$enable_external_libtalloc" != xyes
+then
+       SMB_LIBRARY(talloc, 1)
+       LIBTALLOC_OBJ0=""
+       for obj in ${TALLOC_OBJ}; do
+               LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}"
+       done
+       AC_SUBST(LIBTALLOC_OBJ0)
+else
+       LIBTALLOC_LIBS="${TALLOC_LIBS}"
+fi
+
 SMB_LIBRARY(tdb, 1)
 SMB_LIBRARY(netapi, 0)
 SMB_LIBRARY(smbclient, 0)