summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-19 12:43:17 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-19 07:31:06 +0200
commit7e80b89d48a3c9c048be4d75bae11f12a6d37f2c (patch)
treea652e49dd2b6f6611ea95432fab676a17efd5ef5 /source3
parent1fe797aada0f546e8d557625a78843274b7e5fc5 (diff)
downloadsamba-7e80b89d48a3c9c048be4d75bae11f12a6d37f2c.tar.gz
samba-7e80b89d48a3c9c048be4d75bae11f12a6d37f2c.tar.bz2
samba-7e80b89d48a3c9c048be4d75bae11f12a6d37f2c.zip
ntdb: add autoconf support.
This is copied from tdb; we build the utilities, but as nothing else links against it, we shouldn't be adding anything to the normal samba binary sizes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Tue Jun 19 07:31:06 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in8
-rw-r--r--source3/configure.in47
2 files changed, 55 insertions, 0 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 56c81d9aef..f4b00a7ff0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -115,6 +115,9 @@ LIBREPLACE_LIBS=@LIBREPLACE_LIBS@
LIBTDB=@LIBTDB_STATIC@
LIBTDB_LIBS=@LIBTDB_LIBS@
TDB_DEPS=@TDB_DEPS@
+LIBNTDB=@LIBNTDB_STATIC@
+LIBNTDB_LIBS=@LIBNTDB_LIBS@
+NTDB_DEPS=@NTDB_DEPS@
LIBNETAPI=@LIBNETAPI_STATIC@ @LIBNETAPI_SHARED@
LIBNETAPI_LIBS=@LIBNETAPI_LIBS@
LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@
@@ -127,6 +130,11 @@ TDBTOOL = @TDBTOOL@
TDBDUMP = @TDBDUMP@
TDBRESTORE = @TDBRESTORE@
TDBTORTURE = @TDBTORTURE@
+NTDBBACKUP = @NTDBBACKUP@
+NTDBTOOL = @NTDBTOOL@
+NTDBDUMP = @NTDBDUMP@
+NTDBRESTORE = @NTDBRESTORE@
+NTDBTORTURE = @NTDBTORTURE@
PTHREADPOOLTEST = @PTHREADPOOLTEST@
INSTALLCMD=@INSTALL@
diff --git a/source3/configure.in b/source3/configure.in
index 6705a2716b..c5775f810c 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1913,6 +1913,53 @@ then
AC_SUBST(TDBTORTURE)
fi
+AC_ARG_ENABLE(external_libntdb,
+ [AS_HELP_STRING([--enable-external-libntdb],
+ [Enable external ntdb [default=auto]])],
+ [ enable_external_libntdb=$enableval ],
+ [ enable_external_libntdb=auto ])
+
+if test "x$enable_external_libntdb" != xno
+then
+ PKG_CHECK_MODULES(LIBNTDB, ntdb >= 1.0,
+ [ enable_external_libntdb=yes ],
+ [
+ if test x$enable_external_libntdb = xyes; then
+ AC_MSG_ERROR([Unable to find libntdb])
+ else
+ enable_external_libntdb=no
+ fi
+ ])
+fi
+
+AC_SUBST(LIBNTDB_OBJ0)
+if test "x$enable_external_libntdb" = xno
+then
+ m4_include(../lib/ntdb/libntdb.m4)
+ LINK_LIBNTDB=STATIC
+ LIBNTDBVERSION=`grep ^VERSION ${ntdbdir}/wscript | sed -e "s/'//g" -e 's/.* //'`
+ SMB_LIBRARY(ntdb, 1, ${LIBNTDBVERSION})
+ LIBNTDB_OBJ0=""
+ LIBNTDB_LIBS="$LIBNTDB_LIBS $NTDB_DEPS"
+ for obj in ${NTDB_OBJ}; do
+ LIBNTDB_OBJ0="${LIBNTDB_OBJ0} ${ntdbdir}/${obj}"
+ done
+ AC_SUBST(LIBNTDB_OBJ0)
+ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${NTDB_CFLAGS}"
+ SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CONFIGURE_CPPFLAGS} ${NTDB_CFLAGS}"
+
+ NTDBBACKUP="bin/ntdbbackup"
+ AC_SUBST(NTDBBACKUP)
+ NTDBDUMP="bin/ntdbdump"
+ AC_SUBST(NTDBDUMP)
+ NTDBRESTORE="bin/ntdbrestore"
+ AC_SUBST(NTDBRESTORE)
+ NTDBTOOL="bin/ntdbtool"
+ AC_SUBST(NTDBTOOL)
+ NTDBTORTURE="bin/ntdbtorture"
+ AC_SUBST(NTDBTORTURE)
+fi
+
SMB_LIBRARY(netapi, 0)
SMB_LIBRARY(smbclient, 0)
SMB_LIBRARY(smbsharemodes, 0)