Derek Atkins wrote:
Quoting Mark Johnson <[EMAIL PROTECTED]>:
What I'm looking at is using AC_ARG_ENABLE to make a --disable-gda
argument, so that for the gda-dev branch (at least for now) building the
gda backend would be the default.
Take a look at what we do for AC_ARG_ENABLE(ofx ...) You probably
want to duplicate that.
The OFX example makes more sense. I can see how it becomes optional.
Now that I've seen it, I can see that the postgres works similarly. I
knew there had to be something more than the top level configure.in to
modify.
I think PKG_CHECK_MODULES does everything I need for this. The code for
gda will be much simpler than for ofx.
This would replace the current argument which takes a path to the
libgda-2.0.pc file. Shouldn't that be set in the PKG_CONFIG_PATH
environment variable?
Yeah, it should just use PKG_CONFIG_PATH, and the default pkgconfig
macros to look for the various configurations. I don't think we use
pkg-config for libofx, but you could look at the libgtkhtml checks.
I had looked at it. I was thinking of something similar, until I
realized that the libgda 1.99/2.0 was not going to continue.
Thanks for the help Derek. It was just what I needed.
I have attached a patch against configure.in and src/backend/Makefile.am
(svn 15277, gda-dev branch) to implement the --disable-gda option for
configure. I am currently testing if the gda-dev branch builds with
--disable-gda passed to configure. It will most likely be tomorrow
morning before I know if it has built (and built correctly).
Mark
--- 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
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel