--- gda-dev/configure.in	2006-12-28 20:26:16.000000000 -0700
+++ mj-dev/configure.in	2006-12-28 20:24:23.000000000 -0700
@@ -538,16 +538,21 @@
 
 ### -----------------------
 ### LIBGDA
-LIBGDA_PACKAGE_NAME=libgda-2.0
-AC_ARG_WITH( libgda,
-  [  --with-libgda=PATH      specify where to look for libgda],
-  [ LIBGDA_PACKAGE_NAME=$with_libgda/lib/pkgconfig/${LIBGDA_PACKAGE_NAME}.pc ])
-#LIBGDA_CFLAGS=`$PKG_CONFIG --silence-errors --cflags $LIBGDA_PACKAGE_NAME`
-#LIBGDA_LIBS=`$PKG_CONFIG --silence-errors --libs $LIBGDA_PACKAGE_NAME`
-LIBGDA_CFLAGS=`$PKG_CONFIG --cflags $LIBGDA_PACKAGE_NAME`
-LIBGDA_LIBS=`$PKG_CONFIG --libs $LIBGDA_PACKAGE_NAME`
+AC_ARG_ENABLE(gda, 
+  [  --disable-gda                build without the libgda backend],
+  [case "${enableval}" in
+     yes) want_gda=true ;;
+     no)  want_gda=false ;;
+     *) want_gda=true ;;
+   esac],[want_gda=true])
+if test x${want_gda} = xtrue
+then
+  PKG_CHECK_MODULES(LIBGDA, libgda-3.0 >= 2.99.2, [GDA_DIR=gda])
+fi
+AC_SUBST(GDA_DIR)
 AC_SUBST(LIBGDA_CFLAGS)
 AC_SUBST(LIBGDA_LIBS)
+
 ### --------------------------------------------------------------------------
 ### Variables
 ### Set up all the initial variable values...
@@ -2276,6 +2281,9 @@
 output_qof_lib_dir=`eval eval eval echo $QOF_LIB_DIR`
 output_qof_xml_dir=`eval eval eval echo $QOF_XML_DIR`
 
+if test x${GDA_DIR} != x; then
+components="$components gda"
+fi
 if test x${SQL_DIR} != x; then
 components="$components sql"
 fi
--- gda-dev/src/backend/Makefile.am	2006-12-28 20:26:08.000000000 -0700
+++ mj-dev/src/backend/Makefile.am	2006-12-28 20:24:55.000000000 -0700
@@ -1,3 +1,3 @@
 
-SUBDIRS = file ${SQL_DIR} gda
+SUBDIRS = file ${SQL_DIR} ${GDA_DIR}
 DIST_SUBDIRS = file postgres gda
