[pan2] -preparation for sql backend -forgot this in pan.cc



commit 75cfe4e471f457df1039cf464435ecd364d49272
Author: Heinrich MÃller <henmull src gnome org>
Date:   Sat Jan 21 16:48:45 2012 +0100

    -preparation for sql backend
    -forgot this in pan.cc

 configure.in              |   14 ++++++++++++++
 pan/data-impl/Makefile.am |    5 +++--
 pan/gui/pan.cc            |    2 +-
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 5dfb893..165b3d2 100644
--- a/configure.in
+++ b/configure.in
@@ -57,6 +57,8 @@ ENCHANT_REQUIRED=1.6.0
 GNUTLS_REQUIRED=2.12.10
 LIBNOTIFY_REQUIRED=0.4.1
 LIBGKR_REQUIRED=3.2.2
+ODB_REQUIRED=1.7.0
+AC_SUBST(ODB_REQUIRED)
 AC_SUBST(GLIB_REQUIRED)
 AC_SUBST(GMIME_REQUIRED)
 AC_SUBST(GTK_REQUIRED)
@@ -197,6 +199,18 @@ if test "x$enable_gkr" = "xyes" ; then
   fi
 fi
 
+dnl check for odb and libodb-sqlite for database support
+AC_ARG_ENABLE([sqlite-support],
+AC_HELP_STRING([--enable-sqlite-support],[enable sqlite support with libodb]),[enable_sqlite_support=$enableval],[enable_sqlite_support=yes])
+if test "x$enable_sqlite_support" = "xyes" ; then
+  PKG_CHECK_MODULES([LIBODB],[libodb >= ODB_REQUIRED libodb-sqlite >= ODB_REQUIRED],[HAVE_ODB="yes"],[HAVE_ODB="no"])
+  AC_SUBST([LIBODB_CFLAGS])
+  AC_SUBST([LIBODB_LIBS])
+  if test "x$HAVE_ODB" = "xyes"; then
+    AC_DEFINE([HAVE_ODB],[1],[sqlite support with libodb])
+  fi
+fi
+
 dnl Check to see if strftime supports the use of %l and %k
 AC_MSG_CHECKING(for %l and %k support in strftime)
 AC_TRY_RUN([
diff --git a/pan/data-impl/Makefile.am b/pan/data-impl/Makefile.am
index 7c11b43..0cd283e 100644
--- a/pan/data-impl/Makefile.am
+++ b/pan/data-impl/Makefile.am
@@ -1,6 +1,7 @@
-AM_CPPFLAGS = -I top_srcdir@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ @GNUTLS_CFLAGS@ @LIBGNOME_KEYRING_1_CFLAGS@
+AM_CPPFLAGS = -I top_srcdir@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ @GNUTLS_CFLAGS@ \
+						@LIBGNOME_KEYRING_1_CFLAGS@ @LIBODB_CFLAGS@
 
-AM_LDFLAGS = @LIBGNOME_KEYRING_1_LIBS@
+AM_LDFLAGS = @LIBGNOME_KEYRING_1_LIBS@ @LIBODB_LIBS@
 
 noinst_LIBRARIES = libpandata.a
 
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index e487c8b..85f2632 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -939,7 +939,7 @@ main (int argc, char *argv[])
     GVariant* var;
 
     if (!dbus_connection) goto _fail;
-    if (pan->dbus_id == -1)
+    if (pan.dbus_id == -1)
     {
 
       var = g_variant_new ("(sssbb)",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]