Skip to content
Browse files

Detect and use the system libtdb.

  • Loading branch information...
1 parent 82fa516 commit daba7b98459c2bf15bb60482aa9e3c6438c9ab55 @erikd committed Jan 26, 2012
Showing with 23 additions and 10 deletions.
  1. +19 −2 configure.ac
  2. +4 −8 src/Makefile.am
View
21 configure.ac
@@ -128,6 +128,23 @@ if test "x$HAVE_LIBSNDFILE1" = xmaybe ; then
fi
fi
+dnl
+dnl Detect tdb (Tiny Database library)
+dnl
+
+PKG_CHECK_MODULES(TDB, tdb >= 1.2.0,
+ HAVE_LIBTDB="yes", HAVE_LIBTDB="no")
+
+if test "x$HAVE_LIBTDB" = xyes ; then
+ AC_DEFINE([HAVE_LIBTDB], [], [Define if we have tdb.])
+ AC_SUBST(TDB_CFLAGS)
+ AC_SUBST(TDB_LIBS)
+else
+ sweep_config_ok="no"
+fi
+
+
+
AC_CHECK_SIZEOF(off_t,1)
@@ -590,7 +607,7 @@ if test "x$HAVE_VORBIS" != xyes ; then
fi
if test "x$HAVE_GLIB" = xmaybe || test "x$HAVE_GTK" = xmaybe ||
- test "x$HAVE_LIBSNDFILE1" = xmaybe || test "x$HAVE_TDB" = xmaybe ||
+ test "x$HAVE_LIBSNDFILE1" = xmaybe || test "x$HAVE_LIBTDB" = xmaybe ||
test "x$HAVE_GTHREADS" = xmaybe || test "x$HAVE_ALSA" = xmaybe ||
test "x$HAVE_OGG" = xmaybe || test "x$HAVE_VORBIS" = xmaybe ; then
AC_MSG_RESULT([
@@ -631,7 +648,6 @@ m4/Makefile
include/Makefile
include/sweep/Makefile
src/Makefile
-src/tdb/Makefile
plugins/Makefile
plugins/echo/Makefile
plugins/normalise/Makefile
@@ -659,6 +675,7 @@ AC_MSG_RESULT([
** MPEG (MP3) loading: ...... $HAVE_MAD
** Speex support: ........... $HAVE_SPEEX
** Secret Rabbit Code: ...... $HAVE_LIBSAMPLERATE
+** libtdb for preferences: .. $HAVE_LIBTDB
** Translations: ............ $ALL_LINGUAS
**
** Installation directories:
View
12 src/Makefile.am
@@ -1,7 +1,5 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = tdb
-
AM_CFLAGS = \
$(GTK_DISABLE_DEPRECATED) \
-DPACKAGE_DATA_DIR='@PACKAGE_DATA_DIR@' \
@@ -12,14 +10,12 @@ AM_CFLAGS = \
@GLIB_CFLAGS@ \
@GTHREADS_CFLAGS@ \
@ALSA_CFLAGS@ \
- @PULSEAUDIO_CFLAGS@
+ @PULSEAUDIO_CFLAGS@ \
+ @TDB_CFLAGS@
INCLUDES = \
-I$(top_srcdir)/intl \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/tdb
-
-TDB_LIBS = $(top_builddir)/src/tdb/libtdb.a
+ -I$(top_srcdir)/include
bin_PROGRAMS = sweep
@@ -74,7 +70,7 @@ sweep_SOURCES = \
view.c view.h \
view_pixmaps.h
-sweep_LDADD = $(TDB_LIBS) \
+sweep_LDADD = @TDB_LIBS@ \
@GTK_LIBS@ $(INTLLIBS) $(PTHREAD_LIBS) \
$(SNDFILE_LIBS) \
$(OGG_LIBS) $(VORBIS_LIBS) $(VORBISFILE_LIBS) $(VORBISENC_LIBS) \

0 comments on commit daba7b9

Please sign in to comment.
Something went wrong with that request. Please try again.