[Gnucash-changes] r12331 - gnucash/trunk - * configure.in: add --enable-qof so build defaults to internal qof.

Derek Atkins warlord at cvs.gnucash.org
Thu Jan 12 16:44:20 EST 2006


Author: warlord
Date: 2006-01-12 16:44:08 -0500 (Thu, 12 Jan 2006)
New Revision: 12331
Trac: http://svn.gnucash.org/trac/changeset/12331

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/configure.in
Log:
	* configure.in:  add --enable-qof so build defaults to internal qof.



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-01-12 21:26:01 UTC (rev 12330)
+++ gnucash/trunk/ChangeLog	2006-01-12 21:44:08 UTC (rev 12331)
@@ -1,3 +1,7 @@
+2006-01-12  Derek Atkins  <derek at ihtfp.com>
+
+	* configure.in:  add --enable-qof so build defaults to internal qof.
+
 2006-01-10  David Hampton  <hampton at employees.org>
 
 	* src/gnome-utils/gnc-gnome-utils.c:

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2006-01-12 21:26:01 UTC (rev 12330)
+++ gnucash/trunk/configure.in	2006-01-12 21:44:08 UTC (rev 12331)
@@ -401,15 +401,30 @@
 dnl QOF
 dnl *************************************
 
+dnl XXX: FIXME: RELEASE HACK
+dnl This makes sure that we default to using internal QOF for SVN.
+dnl Make sure to enable this be default for stable releases!
+dnl
+AC_ARG_ENABLE(qof,
+  [  --enable-qof     enable the search for an external QOF library (disabled)],
+  [case "${enableval}" in
+     yes) gnc_enable_qof=true ;;
+     no)  gnc_enable_qof=false ;;
+     *) AC_MSG_ERROR(bad value ${enableval} for --enable-qof) ;;
+   esac],
+   [gnc_enable_qof=false])
+
 AC_ARG_WITH(qof, [  --with-qof=path           prefix for Query Object Framework - QOF (auto)])
+
 QOF_REQUIRED=0.6.0
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 if test pkg-config = no; then
         AC_MSG_ERROR([Please install pkgconfig])
         exit 1
 fi
-AC_MSG_CHECKING([for QOF, version >= $QOF_REQUIRED])
-if test "$withval" != "yes"; then
+if test "$gnc_enable_qof" = yes ; then
+  AC_MSG_CHECKING([for QOF, version >= $QOF_REQUIRED])
+  if test "$withval" != "yes"; then
         QOF=`$PKG_CONFIG --silence-errors --exists '$withval/lib/pkgconfig/qof-1.pc >= $QOF_REQUIRED'`
         QOF_LIBS=`$PKG_CONFIG --silence-errors --libs $withval/lib/pkgconfig/qof-1.pc`
         QOF_CFLAGS=`$PKG_CONFIG --silence-errors --cflags $withval/lib/pkgconfig/qof-1.pc`
@@ -417,7 +432,7 @@
         QOF_PREFIX=`$PKG_CONFIG --silence-errors --variable=prefix $withval/lib/pkgconfig/qof-1.pc`
         QOF_LIB_DIR=`$PKG_CONFIG --silence-errors --variable=libdir $withval/lib/pkgconfig/qof-1.pc`
         QOF_XML_DIR=`$PKG_CONFIG --silence-errors --variable=xmldir $withval/lib/pkgconfig/qof-1.pc`
-else
+  else
         QOF=`$PKG_CONFIG --silence-errors --exists 'qof-1 >= $QOF_REQUIRED'`
         QOF_LIBS=`$PKG_CONFIG --silence-errors --libs qof-1`
         QOF_CFLAGS=`$PKG_CONFIG --silence-errors --cflags qof-1`
@@ -425,9 +440,16 @@
         QOF_PREFIX=`$PKG_CONFIG --silence-errors --variable=prefix qof-1`
         QOF_LIB_DIR=`$PKG_CONFIG --silence-errors --variable=libdir qof-1`
         QOF_XML_DIR=`$PKG_CONFIG --silence-errors --variable=xmldir qof-1`
+  fi
+  if test x$QOF_XML_DIR = x; then
+        AC_MSG_RESULT([no, will use internal QOF code])
+  else
+        AC_MSG_RESULT([yes])
+  fi
+else
+  AC_MSG_NOTICE([External QOF Disabled.  Using Internal QOF Code.])
 fi
 if test x$QOF_XML_DIR = x; then
-        AC_MSG_RESULT([no, will use internal QOF code])
 	QOF_LIB_DIR=`eval echo $libdir | sed "s%^NONE%$prefix%"`
 	QOF_LIB_DIR=`eval echo $QOF_LIB_DIR | sed "s%^NONE%$prefix%"`  
 	QOF_CFLAGS="-I\${top_srcdir}/lib/libqof/qof"
@@ -442,8 +464,6 @@
 	AC_SUBST(LIBQOF_BACKEND_QSF_LIBRARY_VERSION)
   	AC_DEFINE(HAVE_LIBQOF,,[We will use the internal QOF code])
 	HAVE_LIBQOF="use_internal"
-else
-        AC_MSG_RESULT([yes])
 fi
 AM_CONDITIONAL(USE_LIBQOF, [test x$HAVE_LIBQOF != x])
 AM_CONDITIONAL(USE_LIBQOF, [test "$HAVE_LIBQOF" = "use_internal"])



More information about the gnucash-changes mailing list