[Gnucash-changes] r11802 - gnucash/branches/cashutil/cashutil - Adding cashutil build structure

Neil Williams codehelp at cvs.gnucash.org
Thu Nov 3 06:03:20 EST 2005


Author: codehelp
Date: 2005-11-03 06:03:19 -0500 (Thu, 03 Nov 2005)
New Revision: 11802

Added:
   gnucash/branches/cashutil/cashutil/AUTHORS
   gnucash/branches/cashutil/cashutil/ChangeLog
   gnucash/branches/cashutil/cashutil/Makefile.am
   gnucash/branches/cashutil/cashutil/README
   gnucash/branches/cashutil/cashutil/README.cvs
   gnucash/branches/cashutil/cashutil/TODO
   gnucash/branches/cashutil/cashutil/cashutil-autogen.sh
   gnucash/branches/cashutil/cashutil/configure.ac
   gnucash/branches/cashutil/cashutil/make-potfiles.in
Log:
Adding cashutil build structure

Added: gnucash/branches/cashutil/cashutil/AUTHORS
===================================================================
--- gnucash/branches/cashutil/cashutil/AUTHORS	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/AUTHORS	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,3 @@
+
+Neil Williams <linux at codehelp.co.uk>
+

Added: gnucash/branches/cashutil/cashutil/ChangeLog
===================================================================
--- gnucash/branches/cashutil/cashutil/ChangeLog	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/ChangeLog	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,137 @@
+2005-09-12  Neil Williams <linux at codehelp.co.uk>
+	* configure.ac: Check for setenv, use GModule,
+	and remove redundant notice.
+	* po/en_GB.po: tweak.
+	* src/Makefile.am: Use GModule.
+	* src/cashutil.c: Keep GnuCash options specific
+	to CashUtil.
+	* src/cashutil.h.in: Imitate the setenv code in
+	GnuCash - will be removed when folded in.
+	* src/qof-main.h: Input is not a generic function,
+	move to CashUtil only.
+	* src/backend/Makefile.am: tweak.
+	* src/backend/gnc-backend-file.c: GnuCash tweak.
+	* src/objects/Makefile.am: tweak.
+
+2005-08-14 Neil Williams <linux at codehelp.co.uk>
+	Sync with GnuCash 
+
+2005-08-12 Neil Williams <linux at codehelp.co.uk>
+	* src/test/test-address.c: Test-address without Guile 
+
+2005-08-10 Neil Williams <linux at codehelp.co.uk>
+	* src/cashutil.c: Sample QOF undo 
+
+2005-08-07 Neil Williams <linux at codehelp.co.uk>
+	* src/objects/Account.c:
+	* src/objects/cap-gains.c:
+	* src/objects/FreSpec.c:
+	* src/objects/Group.c:
+	* src/objectsSchedXaction.c:
+	* src/objects/Scrub2.c:
+	* src/objects/Scrub.c:
+	* src/objects/SX-book.c:
+	* src/objects/Transaction.c:
+	G2 sync and cast changes, removing unnecessary headers.
+
+2005-08-07 Neil Williams <linux at codehelp.co.uk>
+	* src/backend/gnc-account-xml-v2.c:
+	* src/backend/gnc-address-xml-v2.c:
+	* src/backend/gnc-commodity-xml-v2.c:
+	* src/backend/gnc-customer-xml-v2.c:
+	* src/backend/gnc-bill-term-xml-v2.c:
+	* src/backend/gnc-book-xml-v2.c:
+	* src/backend/gnc-employee-xml-v2.c:
+	* src/backend/gnc-entry-xml-v2.c:
+	* src/backend/gnc-invoice-xml-v2.c:
+	* src/backend/gnc-job-xml-v2.c:
+	* src/backend/gnc-order-xml-v2.c:
+	* src/backend/gnc-owner-xml-v2.c:
+	* src/backend/gnc-pricedb-xml-v2.c: 
+	* src/backend/gnc-transaction-xml-v2.c:
+	* src/backend/io-gncbin-r.c:
+	* src/backend/io-gncxml-v2.c:
+	* src/backend/sixtp-dom-generators.c:
+	* src/backend/sixtp-dom-parsers.c:
+	 Sync with G2 and more cast changes 
+	* src/backend/gnc-backend-file.c: 
+	* src/backend/gnc-backend-file.h: QofBackendProvider handling 
+
+2005-07-28  gettextize  <bug-gnu-gettext at gnu.org>
+
+	* m4/codeset.m4: New file, from gettext-0.14.5.
+	* m4/gettext.m4: New file, from gettext-0.14.5.
+	* m4/glibc2.m4: New file, from gettext-0.14.5.
+	* m4/glibc21.m4: New file, from gettext-0.14.5.
+	* m4/iconv.m4: New file, from gettext-0.14.5.
+	* m4/intdiv0.m4: New file, from gettext-0.14.5.
+	* m4/intmax.m4: New file, from gettext-0.14.5.
+	* m4/inttypes.m4: New file, from gettext-0.14.5.
+	* m4/inttypes_h.m4: New file, from gettext-0.14.5.
+	* m4/inttypes-pri.m4: New file, from gettext-0.14.5.
+	* m4/isc-posix.m4: New file, from gettext-0.14.5.
+	* m4/lcmessage.m4: New file, from gettext-0.14.5.
+	* m4/lib-ld.m4: New file, from gettext-0.14.5.
+	* m4/lib-link.m4: New file, from gettext-0.14.5.
+	* m4/lib-prefix.m4: New file, from gettext-0.14.5.
+	* m4/longdouble.m4: New file, from gettext-0.14.5.
+	* m4/longlong.m4: New file, from gettext-0.14.5.
+	* m4/nls.m4: New file, from gettext-0.14.5.
+	* m4/po.m4: New file, from gettext-0.14.5.
+	* m4/printf-posix.m4: New file, from gettext-0.14.5.
+	* m4/progtest.m4: New file, from gettext-0.14.5.
+	* m4/signed.m4: New file, from gettext-0.14.5.
+	* m4/size_max.m4: New file, from gettext-0.14.5.
+	* m4/stdint_h.m4: New file, from gettext-0.14.5.
+	* m4/uintmax_t.m4: New file, from gettext-0.14.5.
+	* m4/ulonglong.m4: New file, from gettext-0.14.5.
+	* m4/wchar_t.m4: New file, from gettext-0.14.5.
+	* m4/wint_t.m4: New file, from gettext-0.14.5.
+	* m4/xsize.m4: New file, from gettext-0.14.5.
+	* m4/Makefile.am: New file.
+	* Makefile.am (ACLOCAL_AMFLAGS): New variable.
+	(EXTRA_DIST): Add config.rpath.
+	* configure.ac (AC_OUTPUT): Add m4/Makefile.
+
+2005-07-24  Neil Williams <linux at codehelp.co.uk>
+	* NEWS: news of test routines.
+	* README: How GnuCash will use CashUtil.
+	* TODO: Changes needed to fit with GnuCash.
+	* src/Account.h: Cannot search if the parameter
+	has a hyphen - this may need to be changed in GnuCash.
+	* src/README:
+	* src/backend/.cvsignore:
+	* src/backend/README: Where the GnuCash XML v2 backend
+	will live during further testing.
+	* src/cashutil.c: Moving the QOF_SQL_SUPPORTED regexp
+	handling to the standard qof-main to be used by all 
+	projects.
+	* src/cashutil.h:
+	* src/gnc-lot-p.h: Removing private QOF header.
+	* src/gnc-lot.c: Removing private QOF header.
+	* src/gncEmployee.c: Experimental. May be reverted.
+	* src/gncEmployee.h:
+	* src/gncEmployeeP.h:
+	* src/gncOrder.c: tweaks.
+	* src/objects/.cvsignore:
+	* src/objects/README: Where all the objects will live
+	during further testing.
+	* src/qof-main.c: regexp support.
+	* src/qof-main.h:
+	* src/test/test-book-merge.c: Imported from GnuCash.
+	* src/test/test-cash.c: Basis of a test routine, incomplete.
+	* website/gnucash.html: Setting out how CashUtil relates to
+	GnuCash.
+	* website/index.html: new page link.
+
+2005-07-17  Neil Williams <linux at codehelp.co.uk>
+
+	* src/website: Added prototype website content.
+	* src/cashutil.c: 
+	* src/cashutil.h: 
+	* src/qof-main.c:
+	* src/qof-main.h: Added shell handling
+
+2005-07-10  Neil Williams <linux at codehelp.co.uk>
+
+	* Initial project creation: based on Pilot-QOF

Added: gnucash/branches/cashutil/cashutil/Makefile.am
===================================================================
--- gnucash/branches/cashutil/cashutil/Makefile.am	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/Makefile.am	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,13 @@
+if BUILD_XML
+SUBDIRS = xml man
+else
+SUBDIRS = man
+endif
+
+EXTRA_DIST = doxygen.cfg.in
+
+all:
+
+doc: doxygen.cfg
+	rm -rf html refman.pdf
+	doxygen doxygen.cfg

Added: gnucash/branches/cashutil/cashutil/README
===================================================================
--- gnucash/branches/cashutil/cashutil/README	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/README	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,76 @@
+CASHUTIL - Command line GnuCash.
+========
+
+Most of the QOF processing is done in qof-main.c - the 
+specifics of making this general template into CashUtil are 
+expressed in cashutil.c which simply loads the particular 
+objects for this program and provides main().
+
+1.  CashUtil uses QSF XML which can be exported
+    from GnuCash v2 - the Gnome2 port which is
+    due for release in late 2005.
+
+2.  CashUtil will concentrate on the business
+    objects, gncInvoice, gncCustomer etc.
+    There are problems with currencies that mean
+    support is delayed.
+
+3.  CashUtil is now being steered towards full inclusion
+    in the GnuCash G2 source tree and using the full 
+    functionality of the GnuCash objects. 
+
+4.  The development of CashUtil is feeding back into
+    GnuCash in the separation of the financial objects
+    into a shared library, together with ancillary
+    logic from the GnuCash UI.
+
+5.  CashUtil will also now link into the GnuCash v2 XML
+    backend to read existing user data files as well as
+    exported data.
+ 
+CashUtil needs QOF v0.6.0 (currently available at v0.6.0  
+and via CVS) - it can use the gnucash internal libqof.
+
+SUPPORT
+-------
+
+Please send problems, bug reports and feedback to the mailing list:
+http://lists.sourceforge.net/lists/listinfo/qof-devel
+
+
+USING THE CLI WITH YOUR OWN OBJECTS
+-----------------------------------
+
+To alter this program for any other set of objects, most of the 
+changes are within cashutil.c:
+
+-# Amend the list of Register() calls in register_objects(),
+
+-# Amend the help_header_text in main(), 
+
+-# Edit the copyright notice printed by qof_op_vers, also in main()
+
+-# Add your details to the copyright notices in each file and
+change the name of this file and it's header. (Keep existing 
+copyright notices intact to comply with the GNU GPL.) You are 
+reminded that QOF is only licenced under the GNU GPL and any 
+program that is linked against it must also be licenced under 
+the GNU GPL.
+http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL
+http://www.gnu.org/licenses/gpl-faq.html#TOCLinkingWithGPL
+
+-# Replace the list of object header files in cashutil.c
+
+-# Change the version numbers and name of the program in 
+configure.ac AM_INIT_AUTOMAKE(cashutil, [$VERSION]),
+
+-# Adjust the makefile: src/Makefile.am, to change the names, 
+replacing cashutil in each case, e.g. libcashutil_la_SOURCES
+
+-# List the object files under libmyprog_la_SOURCES, 
+
+-# Replace the object headers in the list in EXTRA_DIST
+
+-# Finally, rename and edit the DocBook XML in doc/xml to 
+reflect the new program.
+

Added: gnucash/branches/cashutil/cashutil/README.cvs
===================================================================
--- gnucash/branches/cashutil/cashutil/README.cvs	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/README.cvs	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,32 @@
+This file contains guidelines for using CashUtil from CVS.
+They have been adapted from the guidelines for GnuCash which 
+in turn were adapted from the guidelines for gnome-libs by
+Miguel de Icaza who adapted them from guidelines written by
+Owen Taylor.
+
+ + In order to build CashUtil from CVS, you need to run the 
+   autogen.sh command to generate and execute a configure 
+   script. When building from CVS you should ALWAYS pass your 
+   configure options directly to autogen.sh.  For example:
+
+   ./autogen.sh --prefix=/opt/cashutil
+
+   Autogen will automatically generate the configure script 
+   and then run it WITH SPECIAL ARGUMENTS to make sure 
+   certain files get built.
+   If you run "configure" without these special arguments, 
+   it is very likely that CashUtil will fail to build.  
+   Therefore, do not run configure by hand.
+
+   If in doubt, you can run autogen.sh, run 
+   ./configure --help,
+   then re-run autogen.sh with your options.
+
+Neil Williams
+Sep 03, 2005
+
+Dave Peticolas
+June 21, 2002
+
+Derek Atkins
+November 21, 2002

Added: gnucash/branches/cashutil/cashutil/TODO
===================================================================
--- gnucash/branches/cashutil/cashutil/TODO	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/TODO	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,19 @@
+The shell is incomplete. The Doxygen output contains
+the list of todo items for completion. To build the docs:
+cd doc
+make doc
+Build the rest of the tree first, using:
+./autogen.sh --with-qof=<QOF location> --prefix=<cashutil prefix>
+
+The website template needs extending but keep to a GnuCash style.
+
+gncCommodity is the biggest problem outstanding. Until
+this is overhauled to be a genuine QOF object, currencies
+and probably stocks will be off-limits.
+
+Later, the GnuCash v2 XML backend will be linked to CashUtil
+in preparation for full inclusion into the GnuCash tree and the
+completed spin-out of QOF (which will have an interim location
+of lib/qof/ in the GnuCash source tree while remaining issues
+are being resolved.
+

Added: gnucash/branches/cashutil/cashutil/cashutil-autogen.sh
===================================================================
--- gnucash/branches/cashutil/cashutil/cashutil-autogen.sh	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/cashutil-autogen.sh	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,251 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+PKG_NAME=cashutil
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+DIE=0
+
+INTLTOOLIZE=${INTLTOOLIZE:-intltoolize}
+LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
+LIBTOOL=${LIBTOOL:-libtool}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
+  echo "Download the appropriate package for your distribution or get the source."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.50.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
+  (glibtool --version) < /dev/null > /dev/null 2>&1 ||
+  (libtool --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
+    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+(grep "^AC_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
+  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`intltool' installed."
+    echo "You can get it from:"
+    echo "  ftp://ftp.gnome.org/pub/GNOME/"
+    DIE=1
+  }
+}
+
+(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
+  (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
+  (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`glib' installed."
+    echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+    DIE=1
+  }
+}
+
+# usage: test_version program version
+# returns 0 if program >= version; returns 1 if not.
+test_version()
+{
+    this_prog="$1"
+    want_vers="$2"
+
+    testv=`"$this_prog" --version 2>/dev/null | head -1 | awk '{print $NF}'`
+    if test -z "$testv" ; then return 1 ; fi
+
+    testv_major=`echo "$testv" | sed 's/\([0-9]*\).\([0-9]*\).*$/\1/'`
+    testv_minor=`echo "$testv" | sed 's/\([0-9]*\).\([0-9]*\).*$/\2/'`
+
+    vers_major=`echo "$want_vers" | sed 's/\([0-9]*\).\([0-9]*\).*$/\1/'`
+    vers_minor=`echo "$want_vers" | sed 's/\([0-9]*\).\([0-9]*\).*$/\2/'`
+
+    # if wanted_major > found_major, this isn't good enough
+    if test $vers_major -gt $testv_major ; then
+        return 1
+    # if wanted_major < found_major, then this is fine
+    elif test $vers_major -lt $testv_major ; then
+        return 0
+    # if we get here, then the majors are equal, so test the minor version
+    # we want found_minor >= want_minor.
+    # So, if want_minor > found_minor, this is bad.
+    elif test $vers_minor -gt $testv_minor ; then
+        return 1
+    # this is it.
+    else
+        return 0
+    fi
+}
+
+# usage: find_program preset program version "<other versions>"
+# sets "program" to the name of the program to use.
+# if preset is set, then use that regardless,
+#  otherwise check if "program" is of a good enough version and use that,
+#  otherwise check if "program-version" is of a good enough version and use that.
+#  otherwise return an error.
+find_program()
+{
+    find="$1"
+    prog="$2"
+    vers="$3"
+    extravers="$4"
+
+    if test -n "$find" ; then
+        test_version "$find" "$vers"
+        status="$?"
+        if test "$status" = 0 ; then
+            program="$find"
+            return 0
+        fi
+        echo "**Error**: cannot use $find"
+    else
+
+        test_version "$prog" "$vers"
+        status=$?
+        if test "$status" = 0 ; then
+            program="$prog"
+            return 0
+        fi
+
+        for test_vers in $vers $extravers ; do
+            test_version "$prog-$test_vers" "$vers"
+            status=$?
+            if test "$status" = 0 ; then
+                program="$prog-$test_vers"
+                return 0
+            fi
+        done
+    fi
+
+    echo
+    echo "**Warning**: Could not find a $prog that identifies itself >= $vers."
+    echo
+    program="$prog"
+}
+
+# These statics should really be defined at the top
+find_program "$AUTOCONF" autoconf "2.53"
+AUTOCONF="$program"
+find_program "$AUTOHEADER" autoheader "2.53"
+AUTOHEADER="$program"
+find_program "$AUTOMAKE" automake "1.5 1.6 1.7 1.8"
+AUTOMAKE="$program"
+find_program "$ACLOCAL" aclocal "1.5 1.6 1.7 1.8"
+ACLOCAL="$program"
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+if test -z "$*"; then
+  echo "**Warning**: I am going to run \`configure' with no arguments."
+  echo "If you wish to pass any to it, please specify them on the"
+  echo \`$0\'" command line."
+  echo
+fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -name configure.ac -print`
+do
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    ( cd $dr
+      aclocalinclude="$ACLOCAL_FLAGS -I m4"
+
+      if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
+	if grep "sed.*POTFILES" configure.ac >/dev/null; then
+	  : do nothing -- we still have an old unmodified configure.ac
+	else
+	  echo "Creating $dr/aclocal.m4 ..."
+	  test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+	  echo "Running glib-gettextize...  Ignore non-fatal messages."
+	  echo "no" | glib-gettextize --force --copy
+	  echo "Making $dr/aclocal.m4 writable ..."
+	  test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        fi
+      fi
+      if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
+	if test -z "$NO_LIBTOOLIZE" ; then
+	    case "$OSTYPE" in
+		*darwin*)
+		    echo "Running glibtoolize... ($MACHTYPE)"
+		    glibtoolize --force --copy
+		;;
+		    *)
+		    echo "Running libtoolize..."
+		    libtoolize --force --copy
+		;;
+	    esac
+	fi
+      fi
+     if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
+        echo "Running intltoolize ..."
+        intltoolize --force --copy --automake
+      fi
+
+      echo "Running aclocal $aclocalinclude ..."
+      $ACLOCAL $aclocalinclude || {
+	echo
+	echo "**Error**: aclocal failed. This may mean that you have not"
+	echo "installed all of the packages you need, or you may need to"
+	echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
+	echo "for the prefix where you installed the packages whose"
+	echo "macros were not found"
+	exit 1
+      }
+
+      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
+	echo "Running autoheader..."
+	$AUTOHEADER || { echo "**Error**: autoheader failed."; exit 1; }
+      fi
+      echo "Running automake --gnu $am_opt ..."
+      $AUTOMAKE --add-missing --gnu $am_opt ||
+	{ echo "**Error**: automake failed."; exit 1; }
+      echo "Running autoconf ..."
+      $AUTOCONF || { echo "**Error**: autoconf failed."; exit 1; }
+    ) || exit 1
+  fi
+done
+
+conf_flags="--enable-maintainer-mode " #--enable-compile-warnings --enable-iso-c
+
+if test x$NOCONFIGURE = x; then
+  echo Running $srcdir/configure $conf_flags "$@" ...
+  $srcdir/configure $conf_flags "$@" \
+  && echo Now type \`make\' to compile $PKG_NAME || exit 1
+else
+  echo Skipping configure process.
+fi


Property changes on: gnucash/branches/cashutil/cashutil/cashutil-autogen.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: gnucash/branches/cashutil/cashutil/configure.ac
===================================================================
--- gnucash/branches/cashutil/cashutil/configure.ac	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/configure.ac	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,430 @@
+# This is free software, licensed under the GNU Public License V2.
+# See the file COPYING for details.
+
+AC_INIT(cashutil, 0.1.0, http://lists.sourceforge.net/lists/listinfo/qof-devel)
+
+AM_MAINTAINER_MODE
+AC_PREFIX_DEFAULT(/usr/local)
+AC_PREREQ(2.53)
+AM_CONFIG_HEADER(config.h)
+
+dnl ******************************
+dnl CashUtil Version
+dnl ******************************
+CASHUTIL_VERS=0
+CASHUTIL_MAJOR=1
+CASHUTIL_MINOR=0
+
+AC_SUBST(CASHUTIL_VERS)
+AC_SUBST(CASHUTIL_MAJOR)
+AC_SUBST(CASHUTIL_MINOR)
+VERSION="$CASHUTIL_VERS.$CASHUTIL_MAJOR.$CASHUTIL_MINOR"
+
+AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
+AC_DEFINE_UNQUOTED(HOST_OS, "$host", [Host type])
+AM_INIT_AUTOMAKE(cashutil, [$VERSION])
+AC_PROG_INTLTOOL
+INTLTOOLIZE=${INTLTOOLIZE:-intltoolize}
+
+dnl ******************************
+dnl Checks for basic programs.
+dnl ******************************
+AC_PROG_CC
+AC_PROG_INSTALL
+AM_PROG_LIBTOOL
+AC_PROG_YACC
+
+dnl ******************************
+dnl Platform-specific things
+dnl ******************************
+
+dnl PIC_LIBS is flags needed to compile PIC, for shared libs
+dnl where some linker offsets are not allowed. Currently set
+dnl for FreeBSD-amd64 only.
+PIC_LIBS=""
+
+dnl null_device is the default NULL device on your system
+dnl (usually /dev/null or NUL). If yours is _not_ /dev/null,
+dnl set it in the platform-specific section below.
+null_device="/dev/null"
+
+case "$host" in
+        *darwin*)
+        dnl Use fink under MacOS X
+        AC_MSG_CHECKING(for fink support)
+        if test -d "/sw/lib" -a -d "/sw/include"; then
+            CPPFLAGS="$CPPFLAGS -I/sw/include"
+            LDFLAGS="$LDFLAGS -L/sw/lib"
+            AC_MSG_RESULT(yes)
+        else
+            AC_MSG_RESULT(no)
+        fi
+        AC_CHECK_HEADERS(popt.h)
+        AC_MSG_RESULT([yes, patching libtool to always build dylibs])
+        mv libtool libtool.old
+        sed -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
+            -e 's|^archive_cmds.*|archive_cmds="$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs\\$linker_flags -install_name \\$rpath/\\$soname \\$verstring"|g' \
+            -e 's|^library_names_spec.*|library_names_spec="\\$libname\\$release\\$versuffix.dylib \\$libname\\$release\\${major}.dylib \\$libname.dylib"|g' \
+            -e 's|^soname_spec.*|soname_spec="\\$libname\\$release\\$major.dylib"|g' \
+        < libtool.old > libtool
+        rm libtool.old
+        AC_MSG_RESULT([yes, patching libtool to avoid the libtool bug on MacOSX])
+        mv libtool libtool.old
+        sed -e 's|^old_archive_cmds.*|old_archive_cmds="\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs \&\& \\$RANLIB \\$oldlib"|g' \
+            -e 's|^old_postinstall_cmds.*|old_postinstall_cmds="\\$RANLIB \\$oldlib \&\& chmod 644 \\$oldlib"|g' \
+       < libtool.old > libtool
+        rm libtool.old
+    ;;
+        amd64*freebsd*)
+                dnl Need -fPIC for shared libs
+                PIC_LIBS="-fPIC"
+    ;;
+        *solaris*)
+                dnl Check if we need -lresolv for inet_pton
+                AC_CHECK_FUNC(inet_pton,,
+                        [AC_CHECK_LIB(resolv,inet_pton,LIBS="-lresolv $LIBS")])
+                AC_CHECK_FUNC(pow,,
+                        [AC_CHECK_LIB(m,pow,LIBS="-lm $LIBS")])
+    ;;
+    *)
+    ;;
+esac
+AC_DEFINE_UNQUOTED(NULL_DEVICE, "$null_device",
+         [Your system's bitbucket (usually /dev/null or NUL)])
+AC_SUBST(PIC_LIBS)
+
+dnl ******************************
+dnl Check if this was CVS source
+dnl ******************************
+if test -f "${srcdir}/README.cvs" ; then
+       PL_FROM_CVS=yes
+fi
+
+### --------------------------------------------------------------------------
+### popt
+
+AC_CHECK_LIB(popt, poptStrippedArgv,, [AC_MSG_ERROR([
+
+  popt 1.5 or newer is required to build cashutil. You can download
+  the latest version from ftp://people.redhat.com/sopwith/popt/, or if
+  you're running Debian, install the libpopt-dev package.
+])])
+
+dnl ******************************
+dnl readline checking
+dnl ******************************
+VL_LIB_READLINE
+
+dnl ******************************
+dnl Cashutil Checks
+dnl ******************************
+AC_HEADER_STDC
+AC_C_CONST
+AC_HEADER_TIME
+AC_TYPE_SIZE_T
+AC_C_INLINE
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_PROG_GCC_TRADITIONAL
+AC_TYPE_SIGNAL
+AC_FUNC_MALLOC
+AC_FUNC_MKTIME
+AC_FUNC_CHOWN
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_FORK
+AC_FUNC_STAT
+AC_FUNC_STRFTIME
+AC_FUNC_STRTOD
+AC_FUNC_VPRINTF
+AC_HEADER_DIRENT
+AC_TYPE_PID_T
+
+AC_CHECK_HEADERS(
+	dirent.h errno.h fcntl.h inttypes.h memory.h netdb.h 	  \
+	netinet/in.h regex.h stdint.h stdlib.h string.h strings.h \
+	sys/ioctl_compat.h sys/ioctl.h 	sys/malloc.h sys/select.h \
+	sys/sockio.h sys/time.h sys/utsname.h unistd.h popt.h     \
+	ifaddrs.h inttypes.h langinfo.h libintl.h limits.h )
+
+AC_CHECK_FUNCS(
+	malloc memcpy memmove memset mkdir setenv putenv \
+	sigaction snprintf strchr strdup getline stpcpy  \
+	strtoul strerror getcwd gettimeofday localtime_r \
+	regcomp setlocale strcasecmp strcspn strrchr \
+	strspn strstr strtol strtok)
+
+dnl *************************************
+dnl QOF
+dnl *************************************
+AC_DEFUN([AS_SCRUB_INCLUDE],
+[
+  GIVEN_CFLAGS=$[$1]
+  INCLUDE_DIRS=`echo | cpp -v 2>&1`
+
+  dnl remove everything from this output between the "starts here" and "End of"
+  dnl line
+  INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'`
+  for dir in $INCLUDE_DIRS; do
+    GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I$dir ;;" | sed -e "s;-I$dir$;;")
+  done
+  [$1]=$GIVEN_CFLAGS
+])
+
+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
+	QOF=`$PKG_CONFIG --exists '$withval/lib/pkgconfig/qof-1.pc >= $QOF_REQUIRED'`
+	QOF_LIBS=`$PKG_CONFIG --libs $withval/lib/pkgconfig/qof-1.pc`
+	QOF_CFLAGS=`$PKG_CONFIG --cflags $withval/lib/pkgconfig/qof-1.pc`
+	QOF_VERSION=`$PKG_CONFIG --modversion $withval/lib/pkgconfig/qof-1.pc`
+	QOF_PREFIX=`$PKG_CONFIG --variable=prefix $withval/lib/pkgconfig/qof-1.pc`
+	QOF_LIB_DIR=`$PKG_CONFIG --variable=libdir $withval/lib/pkgconfig/qof-1.pc`
+	QOF_XML_DIR=`$PKG_CONFIG --variable=xmldir $withval/lib/pkgconfig/qof-1.pc`
+else
+	QOF=`$PKG_CONFIG --exists 'qof-1 >= $QOF_REQUIRED'`
+	QOF_LIBS=`$PKG_CONFIG --libs qof-1`
+	QOF_CFLAGS=`$PKG_CONFIG --cflags qof-1`
+	QOF_VERSION=`$PKG_CONFIG --modversion qof-1`
+	QOF_PREFIX=`$PKG_CONFIG --variable=prefix qof-1`
+	QOF_LIB_DIR=`$PKG_CONFIG --variable=libdir qof-1`
+	QOF_XML_DIR=`$PKG_CONFIG --variable=xmldir qof-1`
+fi
+AC_SUBST(QOF_CFLAGS)
+AC_SUBST(QOF_LIBS)
+AS_SCRUB_INCLUDE(QOF_PREFIX)
+AC_SUBST(QOF_PREFIX)
+AC_SUBST(QOF_LIB_DIR)
+AC_SUBST(QOF_XML_DIR)
+if test x$QOF_XML_DIR = x; then
+	AC_MSG_RESULT([no])
+	AC_MSG_ERROR([
+	CashUtil requires the Query Object Framework: QOF.
+	You need to install libqof1 >= 0.6.0
+	You can find it at http://qof.sourceforge.net/
+])
+	exit 1
+else
+	AC_MSG_RESULT([yes])
+fi
+
+dnl *************************************
+dnl GLib
+dnl *************************************
+
+AC_PATH_PROG(PKG_CONFIG,pkg-config)
+AM_PATH_GLIB_2_0("2.0.0", , ,gobject)
+if test "x$PKG_CONFIG" != x; then
+	GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0`
+	GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0`
+	GOBJECT_LIBS=`$PKG_CONFIG --libs gobject-2.0`
+	GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
+fi
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+AC_SUBST(GOBJECT_LIBS)
+AC_SUBST(GMODULE_LIBS)
+
+dnl *************************************
+dnl Check for xsltproc
+dnl *************************************
+AM_CONDITIONAL(BUILD_XML,[test ! -f "${srcdir}/doc/man/cashutil.1"])
+if test ! -f "${srcdir}/doc/man/cashutil.1" ; then
+
+# It's just rude to go over the net to build
+XSLTPROC_FLAGS=--nonet
+DOCBOOK_ROOT=
+XSLTROOT="../../doc/xml"
+case "$host" in
+        *darwin*)
+	DOCBOOK_ROOT="/sw/share/xml/xsl/docbook-xsl"
+	XSLTROOT="/sw/share/xml/xsl/docbook-xsl/manpages/"
+	XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid"
+	;;
+esac
+AC_SUBST(XSLTROOT)
+if test ! -f /etc/xml/catalog; then
+for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/docbook2X/xslt/man/ /usr/share/xml/docbook/stylesheet/nwalsh/manpages/ /sw/share/xml/xsl/docbook-xsl;
+	do
+		if test -d "$i"; then
+		DOCBOOK_ROOT=$i
+        fi
+	done
+# Last resort - try net
+if test -z "$DOCBOOK_ROOT"; then
+   XSLTPROC_FLAGS=
+fi
+else
+   XML_CATALOG=/etc/xml/catalog
+   CAT_ENTRY_START='<!--'
+   CAT_ENTRY_END='-->'
+fi
+
+AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
+XSLTPROC_WORKS=no
+if test -n "$XSLTPROC"; then
+    AC_MSG_CHECKING([whether xsltproc works])
+
+    if test -n "$XML_CATALOG"; then
+       DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
+    else
+       DB_FILE="$XSLTROOT/docbook.xsl"
+    fi
+   $XSLTPROC $XSLTPROC_FLAGS $DB_FILE << END
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="test">
+</book>
+END
+        if test "$?" = 0; then
+           XSLTPROC_WORKS=yes
+        fi
+        AC_MSG_RESULT($XSLTPROC_WORKS)
+fi
+fi
+AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
+
+AC_SUBST(XML_CATALOG)
+AC_SUBST(XSLTPROC_FLAGS)
+AC_SUBST(DOCBOOK_ROOT)
+AC_SUBST(CAT_ENTRY_START)
+AC_SUBST(CAT_ENTRY_END)
+AC_SUBST(XSLTPROC)
+
+### --------------------------------------------------------------------------
+### Check for perl
+
+# Check for perl, force version 5
+AC_ARG_WITH(perl,
+  [  --with-perl=FILE        which perl executable to use ],
+  PERL="${with_perl}")
+
+# If the user didn't specify a perl, then go fetch.
+if test x"$PERL" = x;
+then
+  AC_PATH_PROG(PERL, perl)
+fi
+
+# Make sure Perl was found
+if test x"$PERL" = x; then
+    AC_MSG_ERROR([Cannot find Perl. Try using the --with-perl flag.])
+fi
+
+# Make sure it's version 5 or later
+if "$PERL" -e 'exit 1 if $] < 5.0'; then
+        :
+else
+    AC_MSG_ERROR([Found ${PERL} reports version ]
+                 [`${PERL} -e 'print $]'`, need version 5.*])
+fi
+AC_SUBST(PERL)
+
+dnl *******************************
+dnl Internationalization
+dnl *******************************
+
+ALL_LINGUAS="en_GB "
+GETTEXT_PACKAGE=cashutil
+AC_SUBST(GETTEXT_PACKAGE)
+AM_GLIB_GNU_GETTEXT
+AC_SUBST(INTLTOOL_XGETTEXT)
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])
+
+dnl *************************************
+dnl Locate the backend library 
+dnl *************************************
+
+GNC_LIB_DIR=`eval echo $libdir | sed "s%^NONE%$prefix%"`
+GNC_LIB_DIR=`eval echo $GNC_LIB_DIR | sed "s%^NONE%$prefix%"`
+AC_SUBST(GNC_LIB_DIR)
+
+dnl ******************************
+dnl Defaults for GCC
+dnl ******************************
+AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)
+if test ${GCC}x = yesx; then
+  warnFLAGS=
+  CFLAGS="${CFLAGS} -g2 -Wall"
+  AC_ARG_ENABLE(error-on-warning,
+        [  --disable-error-on-warning    disable treating compile warnings as errors],
+        [case "${enableval}" in
+        yes) warnFLAGS="${warnFLAGS} -Werror" ;;
+        no)  ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
+        esac],
+        [  warnFLAGS="${warnFLAGS} -Werror" ])
+  GCC_VERSION=`${CC} -dumpversion`
+  if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then
+     # This is gcc >= 3.x.x
+     if test `echo ${GCC_VERSION} | cut -d. -f2` -ge 4; then
+        # This is gcc >= 3.4.x
+        warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
+     fi
+  fi
+  CFLAGS="${CFLAGS} ${warnFLAGS}"
+else
+  warnFLAGS=
+fi
+AC_MSG_RESULT($warnFLAGS)
+
+case "$host" in
+	*bsd*)
+		AC_DEFINE(TTYPrompt, "/dev/cua[<0..n>]", [Define verbose tty device])
+	;;
+	*)
+		AC_DEFINE(TTYPrompt, "/dev/tty[<0..n>]", [Define verbose tty device])
+	;;
+esac
+
+AC_OUTPUT([ po/Makefile.in
+  Makefile
+  src/Makefile
+  src/cashutil.h
+  src/gncla-dir.h
+  src/objects/Makefile
+  src/backend/Makefile
+  src/test/Makefile
+  doc/Makefile
+  doc/doxygen.cfg
+  doc/man/Makefile
+  doc/xml/Makefile
+  doc/xml/catalog.xml
+  doc/xml/docbook.xsl
+])
+
+AC_MSG_RESULT([
+  Options detected/selected
+  -------------------------
+  cashutil version ..... : $VERSION
+  Build for host ....... : $host
+  Extra Warnings ....... : $warnFLAGS
+  CPPFLAGS ............. : $CPPFLAGS
+  CFLAGS ............... : $CFLAGS
+  LDFLAGS .............. : $LDFLAGS
+  xsltproc flags ........: $XSLTPROC_FLAGS
+  QOF support ...........: $QOF_VERSION
+  QOF location ..........: $QOF_PREFIX
+  QOF library dir .......: $QOF_LIB_DIR
+  QOF backend config ....: $QOF_XML_DIR
+  GNC Backend location ..: $GNC_LIB_DIR
+])
+
+if [[ x"$PL_FROM_CVS" = xyes ]]; then
+  echo " .----- NOTICE ------------------------------------------------."
+  echo " |         You are using Cashutil from CVS source.             |"
+  echo " |                                                             |"
+  echo " | This is likely to be unstable, or contain some incomplete   |"
+  echo " | features, or just plain not work at all. Use it at your own |"
+  echo " | risk. Please help me to fix any bugs you find, by reporting |"
+  echo " | them back to me via the QOF-devel mailing list.             |"
+  echo " | http://lists.sourceforge.net/lists/listinfo/qof-devel       |"
+  echo " \`-------------------------------------------------------------'"
+  echo ""
+fi

Added: gnucash/branches/cashutil/cashutil/make-potfiles.in
===================================================================
--- gnucash/branches/cashutil/cashutil/make-potfiles.in	2005-11-03 10:52:51 UTC (rev 11801)
+++ gnucash/branches/cashutil/cashutil/make-potfiles.in	2005-11-03 11:03:19 UTC (rev 11802)
@@ -0,0 +1,53 @@
+#!@-PERL-@ -w
+# -*- perl -*-
+#
+# This perl script is used to make po/POTFILES.in, the list
+# of C files to be searched for translatable strings.
+#
+# Author: Dave Peticolas <dave at krondo.com>
+
+use strict;
+
+use File::Basename;
+
+my @cvsignores = `find src -name '.cvsignore'`;
+my @possible_files = `find src -name '*.c' -o -name '*.desktop.in' -o -name '*.keys.in' -o -name '*.pl'`;
+
+chomp(my $cwd = `pwd`);
+
+my %ignores;
+
+foreach my $one_ignore (@cvsignores) {
+  chomp($one_ignore);
+  my ($name, $path) = fileparse($one_ignore);
+  $path =~ s/^\.\///;
+  open (IG, $one_ignore);
+  chdir $path;
+  foreach my $fl (<IG>) {
+    chomp $fl;
+    next unless $fl;
+    my @matches = glob ($fl);
+    foreach my $match (@matches) {
+      chomp($match);
+      next unless $match;
+      $ignores{$path . $match} = 1;
+    }
+  }
+  close (IG);
+  chdir $cwd;
+}
+
+print "# List of files which containing translatable strings.\n";
+print "# This file was generated by ../make-potfiles.in.\n";
+print "\n";
+
+foreach my $file (@possible_files) {
+  chomp($file);
+  my ($name, $path) = fileparse($file);
+  $path =~ s/^\.\///;
+
+  next if $ignores{$path . $name};
+
+  print $path . $name . "\n";
+}
+



More information about the gnucash-changes mailing list