summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/Makefile.in11
-rw-r--r--lib/tdb/build_macros.m414
-rw-r--r--lib/tdb/configure.ac4
-rw-r--r--lib/tdb/include/tdb.h1
4 files changed, 30 insertions, 0 deletions
diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in
index 090bb6e2dc..9915d88264 100644
--- a/lib/tdb/Makefile.in
+++ b/lib/tdb/Makefile.in
@@ -12,6 +12,8 @@ libdir = @libdir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
+sharedbuilddir = @sharedbuilddir@
+INSTALLCMD = @INSTALL@
CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude
CFLAGS = $(CPPFLAGS) @CFLAGS@
LDFLAGS = @LDFLAGS@
@@ -43,6 +45,15 @@ install:: all
$(TDB_SOLIB): $(TDB_OBJ)
$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME)
+shared-build: all
+ ${INSTALLCMD} -d $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 644 libtdb.a $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(sharedbuilddir)/lib
+ ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/$(TDB_SONAME)
+ ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/libtdb.so
+ ${INSTALLCMD} -d $(sharedbuilddir)/include
+ ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(sharedbuilddir)/include
+
check: test
test:: $(PYTHON_CHECK_TARGET)
diff --git a/lib/tdb/build_macros.m4 b/lib/tdb/build_macros.m4
new file mode 100644
index 0000000000..c036668cd1
--- /dev/null
+++ b/lib/tdb/build_macros.m4
@@ -0,0 +1,14 @@
+AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR,
+ [ AC_ARG_WITH([shared-build-dir],
+ [AC_HELP_STRING([--with-shared-build-dir=DIR],
+ [temporary build directory where libraries are installed [$srcdir/sharedbuild]])])
+
+ sharedbuilddir="$srcdir/sharedbuild"
+ if test x"$with_shared_build_dir" != x; then
+ sharedbuilddir=$with_shared_build_dir
+ CFLAGS="$CFLAGS -I$with_shared_build_dir/include"
+ LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib"
+ fi
+ AC_SUBST(sharedbuilddir)
+ ])
+
diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac
index eaf70d30b4..4bf2e98e8f 100644
--- a/lib/tdb/configure.ac
+++ b/lib/tdb/configure.ac
@@ -27,4 +27,8 @@ if test -z "$PYTHON_CONFIG"; then
PYTHON_INSTALL_TARGET=""
PYTHON_CHECK_TARGET=""
fi
+
+m4_include(build_macros.m4)
+BUILD_WITH_SHARED_BUILD_DIR
+
AC_OUTPUT(Makefile tdb.pc)
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
index 0008085de5..c41c9941f0 100644
--- a/lib/tdb/include/tdb.h
+++ b/lib/tdb/include/tdb.h
@@ -30,6 +30,7 @@
extern "C" {
#endif
+#include "signal.h"
/* flags to tdb_store() */
#define TDB_REPLACE 1 /* Unused */