[Gnucash-changes] r12096 - gnucash/trunk - Fold branches/goffice-update/ back into trunk/.

Joshua Sled jsled at cvs.gnucash.org
Sun Dec 4 16:27:43 EST 2005


Author: jsled
Date: 2005-12-04 16:27:17 -0500 (Sun, 04 Dec 2005)
New Revision: 12096
Trac: http://svn.gnucash.org/trac/changeset/12096

Added:
   gnucash/trunk/goffice-config.h.in
   gnucash/trunk/goffice-features.h.in
   gnucash/trunk/gsf-config.h.in
   gnucash/trunk/lib/goffice-0.0.4/
   gnucash/trunk/lib/libgsf-1.12.3/
Removed:
   gnucash/trunk/lib/goffice/
Modified:
   gnucash/trunk/
   gnucash/trunk/ChangeLog
   gnucash/trunk/Makefile.am
   gnucash/trunk/configure.in
   gnucash/trunk/lib/Makefile.am
   gnucash/trunk/lib/goffice-0.0.4/goffice/
   gnucash/trunk/lib/goffice-0.0.4/goffice/app/
   gnucash/trunk/lib/goffice-0.0.4/goffice/cut-n-paste/
   gnucash/trunk/lib/goffice-0.0.4/goffice/cut-n-paste/foocanvas/
   gnucash/trunk/lib/goffice-0.0.4/goffice/cut-n-paste/pcre/
   gnucash/trunk/lib/goffice-0.0.4/goffice/data/
   gnucash/trunk/lib/goffice-0.0.4/goffice/drawing/
   gnucash/trunk/lib/goffice-0.0.4/goffice/graph/
   gnucash/trunk/lib/goffice-0.0.4/goffice/gtk/
   gnucash/trunk/lib/goffice-0.0.4/goffice/ms-compat/
   gnucash/trunk/lib/goffice-0.0.4/goffice/utils/
   gnucash/trunk/lib/goffice-0.0.4/pixmaps/
   gnucash/trunk/lib/goffice-0.0.4/plugins/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_barcol/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_boxes/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_pie/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_radar/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_surface/
   gnucash/trunk/lib/goffice-0.0.4/plugins/plot_xy/
   gnucash/trunk/lib/goffice-0.0.4/plugins/reg_linear/
   gnucash/trunk/lib/goffice-0.0.4/po/
   gnucash/trunk/lib/goffice-0.0.4/tests/
   gnucash/trunk/lib/libgsf-1.12.3/doc/
   gnucash/trunk/lib/libgsf-1.12.3/gsf-gnome/
   gnucash/trunk/lib/libgsf-1.12.3/gsf-win32/
   gnucash/trunk/lib/libgsf-1.12.3/gsf/
   gnucash/trunk/lib/libgsf-1.12.3/po/
   gnucash/trunk/lib/libgsf-1.12.3/python/
   gnucash/trunk/lib/libgsf-1.12.3/tests/
   gnucash/trunk/lib/libgsf-1.12.3/thumbnailer/
   gnucash/trunk/src/doc/design/
   gnucash/trunk/src/gnome-utils/Makefile.am
   gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c
Log:
Fold branches/goffice-update/ back into trunk/.


Property changes on: gnucash/trunk
___________________________________________________________________
Name: svn:ignore
   - .deps
.libs
ABOUT-NLS
COPYING
INSTALL
Makefile
Makefile.in
TAGS
TAGS.stamp
aclocal.m4
autom4te.cache
autom4te-2.53.cache
configure
config.cache
config.guess
config.sub
config.log
config.status
config.h
config.h.in
config.rpath
cscope.out
cscope.files
depcomp
etags.files
gnucash-config
install-sh
intltool-modules
intl
libtool
ltconfig
make-gnucash-patch
make-gnucash-potfiles
missing
mkinstalldirs
stamp-h
stamp-h1
stamp-h.in
install-stamp
tags
intltool-extract
intltool-extract.in
intltool-merge
intltool-merge.in
intltool-update
intltool-update.in
tags
*.tar.gz
*.log
*.patch
*.diff
*.diffs
*.xac.*.xac
autom4te.cache
ltmain.sh
mkinstalldirs
.DS_Store
*.prj
*.prj.bak
*.pws
.tm_project.cache

   + .deps
.libs
ABOUT-NLS
COPYING
INSTALL
Makefile
Makefile.in
TAGS
TAGS.stamp
aclocal.m4
autom4te.cache
autom4te-2.53.cache
configure
config.cache
config.guess
config.sub
config.log
config.status
config.h
config.h.in
config.rpath
cscope.out
cscope.files
depcomp
etags.files
gnucash-config
install-sh
intltool-modules
intl
libtool
ltconfig
make-gnucash-patch
make-gnucash-potfiles
missing
mkinstalldirs
stamp-h
stamp-h1
stamp-h.in
install-stamp
tags
intltool-extract
intltool-extract.in
intltool-merge
intltool-merge.in
intltool-update
intltool-update.in
tags
*.tar.gz
*.log
*.patch
*.diff
*.diffs
*.xac.*.xac
autom4te.cache
ltmain.sh
mkinstalldirs
.DS_Store
*.prj
*.pws
.tm_project.cache
compile
gsf-config.h
goffice-config.h
stamp-h2
stamp-h3
stamp-h4
goffice-features.h



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/ChangeLog	2005-12-04 21:27:17 UTC (rev 12096)
@@ -1,3 +1,7 @@
+2005-12-04  Joshua Sled  <jsled at asynchronous.org>
+
+	* All: Fold branches/goffice-update/ back into trunk/.
+
 2005-12-04  David Hampton  <hampton at employees.org>
 
 	* src/gnome-utils/test/test-gnc-recurrence.c:
@@ -155,6 +159,12 @@
 	* src/engine/Transaction.c: Initialize the qof entity in the new
 	split, not the old one.
 
+2005-11-26  David Hampton  <hampton at employees.org>
+
+	* lib/goffice-0.0.4/plugins/plot_radar/gog-radar.c:
+	* lib/goffice-0.0.4/goffice/app/go-plugin.c: Compile cleanly using
+	gcc4.
+
 2005-11-25  David Hampton  <hampton at employees.org>
 
 	* src/business/dialog-tax-table/dialog-tax-table.c: Andreas
@@ -205,6 +215,24 @@
 	* src/gnome/gnc-plugin-page-account-tree.c: Update default
 	accelerator keys as per the HIG.
 
+2005-11-25  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome-utils/Makefile.am:
+	  add GSF_CFLAGS
+	* lib/goffice-0.0.4/goffice/utils/go-libxml-extras.c
+	  lib/goffice-0.0.4/goffice/utils/datetime.c:
+	  lib/goffice-0.0.4/goffice/graph/gog-chart.c
+	  lib/goffice-0.0.4/goffice/graph/gog-plot.c
+	  lib/goffice-0.0.4/goffice/graph/gog-object.c
+	  lib/goffice-0.0.4/goffice/gtk/goffice-gtk.c:
+	  look for goffice/glib24_26-compat.h
+	* lib/goffice-0.0.4/goffice/Makefile.am:
+	  don't deal with goffice-features.h anymore
+	* configure.in:
+	  fix for FC3 dependencies
+	* Makefile.am:
+	  create goffice -> , symlink when building internal goffice
+
 2005-11-23  David Hampton  <hampton at employees.org>
 
 	* src/report/report-gnome/report-gnome.scm:
@@ -560,6 +588,53 @@
 	* po/glossary/no.po: Updated Norwegian/Bokmaal glossary
 	translation by Tor Harald Thorland <linux at strigen.com>.
 
+2005-11-20  Neil Williams  <linux at codehelp.co.uk>
+
+	* goffice-config.h.in : svn moved from 
+		lib/goffice-0.0.4/goffice to prevent unnecessary
+		subdirectory inclusion in make outside lib.
+	* goffice-features.h.in : svn moved from
+		lib/goffice-0.0.4/goffice.
+	* gsf-config.h.in : svn moved from lib/libsf-1.12.3
+	* configure.in : Create AC_CONFIG_HEADERS only in
+		$(top_srcdir) and stop using LDFLAGS = -no-undeclared
+	* lib/goffice-0.0.4/goffice-plugins.mk : handle new config
+		header location.
+	* lib/goffice-0.0.4/tests/Makefile.am : Don't overwrite AM_LDFLAGS
+	* lib/goffice-0.0.4/goffice/cut-n-paste/foocanvas/Makefile.am :
+		handle new config header location.
+  * lib/goffice-0.0.4/goffice.mk : Handle new config header location.
+
+2005-11-20  Neil Williams  <linux at codehelp.co.uk>
+
+	* lib/goffice-0.0.4/plugins/plot_radar/gog-radar.c :
+		Mac OSX fix: comment out #warning
+	* lib/goffice-0.0.4/plugins/plot_xy/gog-bubble-prefs.c :
+	* lib/goffice-0.0.4/plugins/plot_xy/gog-xy.c :
+	* lib/goffice-0.0.4/goffice/app/file.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-combo-pixmaps.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-action-combo-color.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-font-sel.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-color-palette.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-combo-color.c :
+	* lib/goffice-0.0.4/goffice/gtk/go-combo-box.c :
+	* lib/goffice-0.0.4/goffice/cut-n-paste/foocanvas/foo-canvas-line.c
+	* lib/goffice-0.0.4/goffice/cut-n-paste/foocanvas/foo-canvas-polygon.c
+	* lib/goffice-0.0.4/goffice/utils/go-pattern.c
+	* lib/goffice-0.0.4/goffice/graph/gog-guru.c
+	* lib/goffice-0.0.4/goffice/graph/gog-legend.c
+	* lib/goffice-0.0.4/goffice/graph/gog-graph.c
+	* lib/goffice-0.0.4/goffice/graph/gog-error-bar.c
+	* lib/goffice-0.0.4/goffice/graph/gog-style.c
+	* lib/goffice-0.0.4/goffice/graph/gog-theme.c
+	* lib/libgsf-1.12.3/gsf-gnome/gsf-input-bonobo.c :
+
+	* lib/goffice-0.0.4/goffice.mk :
+	Adding AM_LDFLAGS for OSX build
+
+	* lib/goffice-0.0.4/ : setting svn:ignore
+	* lib/libgsf-1.12.3/ : setting svn:ignore
+
 2005-11-19  David Hampton  <hampton at employees.org>
 
 	* various: More include file tweaking.  Don't include gtk.h from
@@ -912,6 +987,11 @@
 	Use the same x_offset logic regardless of how we enter the cell.
 
 	Make sure x_offset gets reset when changing cells via the keyboard.
+
+2005-11-09  Josh Sled  <jsled at asynchronous.org>
+
+	* lib/goffice-0.0.4/, lib/libgsf-1.12.3/: imported with changes to
+	update previously hacked-together versions.
 	
 2005-11-09  David Hampton  <hampton at employees.org>
 

Modified: gnucash/trunk/Makefile.am
===================================================================
--- gnucash/trunk/Makefile.am	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/Makefile.am	2005-12-04 21:27:17 UTC (rev 12096)
@@ -1,12 +1,12 @@
 
-SUBDIRS = doc lib src intl-scm po rpm accounts
+SUBDIRS = . doc lib src intl-scm po rpm accounts
 
 docdir = ${GNC_DOC_INSTALL_DIR}
 
 GNC_CTAGS_FILE = @GNC_CTAGS_FILE@
 GNC_ETAGS_FILE = @GNC_ETAGS_FILE@
 
-noinst_DATA = make-gnucash-patch make-gnucash-potfiles
+noinst_DATA = make-gnucash-patch make-gnucash-potfiles .goffice-links
 
 doc_DATA = \
   AUTHORS \
@@ -93,10 +93,19 @@
 	chmod +x $@.tmp
 	mv $@.tmp $@
 
+
+.goffice-links: 
+	rm -f goffice
+if !HAVE_GOFFICE
+	ln -sf . goffice
+endif
+	touch .goffice-links
+
 DISTCLEANFILES = \
   intltool-extract intltool-update intltool-merge\
   cscope.files cscope.out etags.files make-gnucash-patch \
-  make-gnucash-potfiles po/.intltool-merge-cache
+  make-gnucash-potfiles po/.intltool-merge-cache \
+  goffice .goffice-links
 
 cscope.files:
 	find . -name '*.[ch]' > cscope.files

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/configure.in	2005-12-04 21:27:17 UTC (rev 12096)
@@ -99,13 +99,6 @@
   ])
 ])
 
-## +jsled
-# copied from gnumeric for our lib/goffice/ stuffs.
-AC_CHECK_HEADERS(ieeefp.h ieee754.h)
-dnl Check for some functions
-AC_CHECK_FUNCS(random drand48 finite memmove mkdtemp uname times sysconf fmin)
-## --jsled
-
 STRUCT_TM_GMTOFF_CHECK
 SCANF_LLD_CHECK
 if test $am_cv_scanf_lld = "no"; then
@@ -243,6 +236,8 @@
 
 AC_MSG_CHECKING(for g-wrap link args)
 G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-link-args guile`
+# Dear g-wrap: adding -L/usr/lib is very silly.  Do not do this.
+G_WRAP_LINK_ARGS=`echo ${G_WRAP_LINK_ARGS} | sed -e 's|-L/usr/lib ||'`
 AC_MSG_RESULT($G_WRAP_LINK_ARGS)
 
 AC_MSG_CHECKING(for g-wrap module directory)
@@ -447,76 +442,820 @@
 ### --------------------------------------------------------------------------
 ### for GOG/goffice...
 
-dnl If libgoffice-1 >= 0.0.3-2 and libgsf >= 1.12.2-1 are found, 
-dnl we need to omit lib/goffice and use the external library
-dnl because lib/goffice will not build with newer versions of libgsf.
+AC_MSG_CHECKING(for GTK - version >= 2.6.0)
+if $PKG_CONFIG 'gtk+-2.0 >= 2.6.0'
+then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_GTK26,1,[System has gtk 2.6.0 or better])
+  HAVE_GTK26=yes
+else
+  AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_GTK26, test "x$HAVE_GTK26" = "xyes" )
 
-GOFFICE_REQUIRED=0.0.3
-GSF_REQUIRED=1.12.2
-AC_MSG_CHECKING([for GOffice and GSF])
-LIBGOFFICE_CFLAGS=`$PKG_CONFIG --silence-errors --cflags " libgoffice-1 >= $GOFFICE_REQUIRED"`
-LIBGOFFICE_LIBS=`$PKG_CONFIG --silence-errors --libs " libgoffice-1 >= $GOFFICE_REQUIRED"`
-LIBGSF_CFLAGS=`$PKG_CONFIG --silence-errors --cflags " libgsf-1 >= $GSF_REQUIRED"`
-LIBGSF_LIBS=`$PKG_CONFIG --silence-errors --libs " libgsf-1 >= $GSF_REQUIRED"`
-AC_SUBST(LIBGOFFICE_CFLAGS)
-AC_SUBST(LIBGOFFICE_LIBS)
 
-if test x"$LIBGOFFICE_LIBS" = x; then
-  AC_MSG_RESULT([No, GOffice not found, will build using internal goffice library.])
-  if test x"$LIBGSF_LIBS" != x; then
-    AC_MSG_NOTICE([Sorry, the internal goffice code cannot build with libgsf >= $GSF_REQUIRED.])
-    AC_MSG_ERROR([Please either install goffice or downgrade libgsf to earlier than $GSF_REQUIRED])
-    exit 1
-  fi
+AC_MSG_CHECKING(for pango version >= 1.8.0)
+if $PKG_CONFIG 'pango >= 1.8.0'
+then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_PANGO18,1,[System has pango 1.8.0 or better])
+  HAVE_PANGO18=yes
 else
-  AC_MSG_RESULT([Yes, using GOffice])
-  AC_DEFINE(HAVE_GOFFICE,,[We have found an external GOffice])
-  HAVE_GOFFICE="use_external"
+  AC_MSG_RESULT(no)
 fi
-AM_CONDITIONAL(USE_LIBGOFFICE, [test x$HAVE_GOFFICE != x])
-AM_CONDITIONAL(USE_LIBGOFFICE, [test $HAVE_GOFFICE = "use_external"])
-AC_SUBST(USE_LIBGOFFICE)
+AM_CONDITIONAL(HAVE_PANGO18, test "x$HAVE_PANGO18" = "xyes" )
 
-###
-### GSF
-PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.8.0
-                       libgsf-gnome-1 >= 1.8.0)
+
+dnl @@fixme 
+dnl use both PKG_CHECK_MODULES and `$PKG_CONFIG`; the first importantly sets
+dnl MUMBLE_{LIBS,CFLAGS}...
+dnl Q: What does PKG_CHECK_MODULES create?
+dnl A: Just _CFLAGS and _LIBS, apparently [pkg.m4]
+
+dnl $4=true => don't die in case of failure.
+PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.12.2
+                       libgsf-gnome-1 >= 1.12.2,,true)
+if $PKG_CONFIG 'libgsf-1 >= 1.12.2'
+then
+  AC_DEFINE(HAVE_LIBGSF,1,[System has libgsf-1.12.2 or better])
+  HAVE_LIBGSF=yes
+else
+  AC_MSG_NOTICE(using internally-packaged libgsf)
+  GSF_CFLAGS='-I${top_srcdir}/lib/libgsf-1.12.3'
+  GSF_LIBS='${top_builddir}/lib/libgsf-1.12.3/gsf/libgsf-1.la'
+  NEED_LIBGSF=yes
+fi
+AM_CONDITIONAL(HAVE_LIBGSF, test "x$HAVE_LIBGSF" = "xyes")
+AC_SUBST(GSF_CFLAGS)
 AC_SUBST(GSF_LIBS)
-AC_SUBST(GSF_CFLAGS)
 
-### libart
-PKG_CHECK_MODULES(ART, libart-2.0 >= 2.3.11)
-AC_SUBST(ART_LIBS)
-AC_SUBST(ART_CFLAGS)
+dnl $4=true => don't die if failure.
+PKG_CHECK_MODULES(GOFFICE, libgoffice-1 >= 0.0.4,,true)
+if $PKG_CONFIG 'libgoffice-1 >= 0.0.4'
+then
+  AC_DEFINE(HAVE_GOFFICE,1,[System has goffice-0.0.4 or better])
+  HAVE_GOFFICE=yes
+else
+  AC_MSG_NOTICE(using internally-packaged goffice)
+  GOFFICE_CFLAGS='-I${top_srcdir}/lib/goffice-0.0.4'
+  GOFFICE_LIBS='${top_builddir}/lib/goffice-0.0.4/goffice/libgoffice-1.la'
+  NEED_GOFFICE=yes
+fi
+AM_CONDITIONAL(HAVE_GOFFICE, test "x$HAVE_GOFFICE" = "xyes")
+AC_SUBST(GOFFICE_CFLAGS)
+AC_SUBST(GOFFICE_LIBS)
 
-### silence convention-difference from cut-n-paste'd gnumeric Makefile.am's:
-AM_CONDITIONAL(WITH_GNOME, true)
-# for lib/goffice/graph/plugins/plot_barcol/gog-1.5d.c's use of
-# goffice/graph/gog-error-bar.h:gog_error_bar_prefs, which is bounded by
-# WITH_GTK for some reason... :/
-AM_CONDITIONAL(WITH_GTK, true)
-AC_DEFINE(WITH_GTK, 1, [Define if UI is built])
+### ----------
 
-### gnome-print [= gnome-font]
-PKG_CHECK_MODULES(PRINT, libgnomeprint-2.2 >= 2.5.2)
-AC_SUBST(PRINT_LIBS)
-AC_SUBST(PRINT_CFLAGS)
+### +libgsf-1.12.3
+if test "x$HAVE_LIBGSF" != xyes; then
+AC_MSG_NOTICE('internal libgsf configuration...')
 
-AC_ARG_VAR(GLIB_GENMARSHAL, [Absolute path of the glib-genmarshal executable.])
-AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+m4_define([libgsf_version_major], [1])
+m4_define([libgsf_version_minor], [12])
+m4_define([libgsf_version_micro], [3])
+m4_define([libgsf_version_extra], [])
+m4_define([libgsf_full_version],
+    [libgsf_version_major.libgsf_version_minor.libgsf_version_micro[]libgsf_version_extra])
 
-gog_plugindir='${GNC_LIBDIR}/plugins'
-# do this to minimize changes in the plugin makefiles...
-gnumeric_plugindir='${gog_plugindir}'
-AC_SUBST(gog_plugindir)
-AC_SUBST(gnumeric_plugindir)
-#AC_SUBST(pkglibdir) -- this breaks builds into /opt.
-gnumeric_icondir='${GNC_SHAREDIR}/pixmaps'
-AC_SUBST(gnumeric_icondir)
+dnl AC_CONFIG_SRCDIR(lib/libgsf-1.12.3/gsf/gsf.h)
 
+AC_SUBST(LIBGSF_MAJOR_VERSION, libgsf_version_major)
+AC_SUBST(LIBGSF_MINOR_VERSION, libgsf_version_minor)
+AC_SUBST(LIBGSF_MICRO_VERSION, libgsf_version_micro)
 
-# /GOG
+dnl Version info for libraries = CURRENT:REVISION:AGE
+AC_SUBST(VERSION_INFO,
+m4_eval(libgsf_version_major + libgsf_version_minor)[]dnl
+:libgsf_version_micro:libgsf_version_minor)
 
+dnl 2005-11-19,jsled, this doesn't seem to work... :(
+dnl ifelse(x$HAVE_LIBGSF, xyes,,
+  AC_CONFIG_HEADERS(gsf-config.h)
+dnl)
+
+AC_FUNC_FSEEKO
+AC_SYS_LARGEFILE
+
+dnl Checks for libraries.
+ifelse([
+  If we defined the module lists on the M4 level, we could have problems
+  with PKG_CHECK_MODULES from pkgconfig 0.16.0, which double quotes its
+  second argument (the module list).
+  As a handy workaround, we use shell variables.
+])
+dnl Modules common to libgsf and libgsf-gnome
+libgsf_reqs="
+    gobject-2.0 >= 2.4.0
+    glib-2.0 >= 2.4.0
+    libxml-2.0 >= 2.4.16
+"
+dnl Modules required for libgsf-gnome
+libgsf_gnome_reqs="
+    $libgsf_reqs
+    libbonobo-2.0 >= 2.0.0
+    gnome-vfs-2.0 >= 2.2.0
+    gnome-vfs-module-2.0 >= 2.2.0
+"
+PKG_CHECK_MODULES(LIBGSF, $libgsf_reqs)
+
+# this should come after `AC_PROG_CC'
+#ifdef([GNOME_COMPILE_WARNINGS],[GNOME_COMPILE_WARNINGS],)
+#CFLAGS="$CFLAGS $WARN_CFLAGS -DG_DISABLE_DEPRECATED"
+
+#if test "$GCC" = "yes"; then
+#	for option in -Wno-system-headers -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wformat -Wnested-externs -Winline -Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn -Wmissing-format-attribute; do
+#		SAVE_CFLAGS="$CFLAGS"
+#		CFLAGS="$CFLAGS $option"
+#		AC_MSG_CHECKING([whether gcc understands $option])
+#		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
+#			has_option=yes,
+#			has_option=no)
+#		if test $has_option = no; then
+#		  CFLAGS="$SAVE_CFLAGS"
+#		fi
+#		AC_MSG_RESULT($has_option)
+#		unset has_option
+#		unset SAVE_CFLAGS
+#	done
+#	unset option
+#fi
+
+AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
+if test $fdopen_works = no ; then
+	unset ac_cv_have_decl_fdopen
+	CFLAGS="$CFLAGS -D_POSIX_SOURCE"
+	AC_MSG_NOTICE([adding -D_POSIX_SOURCE to CFLAGS])
+	AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
+	if test $fdopen_works = no ; then
+		AC_MSG_ERROR([fdopen is not available])
+	fi
+fi
+
+# Unfortunately, -D_POSIX_SOURCE turns off struct timeval on Solaris
+AC_MSG_CHECKING([whether struct timeval is available])
+for try in 1 2; do
+	AC_COMPILE_IFELSE(
+		[AC_LANG_PROGRAM(
+			[[#include <sys/time.h>]],
+			[[struct timeval tv;]])],
+		struct_timeval_works=yes,
+		struct_timeval_works=no)
+	test $struct_timeval_works = yes && break
+	# Try this for the second attempt:
+	test $try = 1 && CFLAGS="$CFLAGS -D__EXTENSIONS__"
+done
+AC_MSG_RESULT($struct_timeval_works)
+if test $struct_timeval_works = no ; then
+	AC_MSG_ERROR([struct timeval is not available])
+fi
+
+AC_MSG_CHECKING([whether -D_BSD_SOURCE is needed for caddr_t])
+AC_COMPILE_IFELSE(
+	[AC_LANG_PROGRAM([[#include <sys/types.h>]], [[caddr_t ca]])],
+	need_bsd1=no,
+	need_bsd1=yes)
+AC_MSG_RESULT($need_bsd1)
+
+AC_MSG_CHECKING([whether -D_BSD_SOURCE is needed for lstat])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>]],
+[[void *ptr = &lstat]])],
+need_bsd2=no, need_bsd2=yes)
+AC_MSG_RESULT($need_bsd2)
+if test $need_bsd1 = yes -o $need_bsd2 = yes; then
+	CFLAGS="$CFLAGS -D_BSD_SOURCE"
+fi
+
+AC_TYPE_MODE_T
+AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h io.h)
+AC_FUNC_MMAP
+
+AC_CHECK_FUNCS(chown)
+
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+CFLAGS="$CFLAGS $LIBGSF_CFLAGS"
+LIBS="$LIBGSF_LIBS $LIBS"
+AC_MSG_CHECKING([for g_chmod])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gstdio.h>]], [[(void)g_chmod("/xxx",0777);]])],
+               [AC_DEFINE(HAVE_G_CHMOD, 1, [Define if g_chmod is available as macro or function])
+		AC_MSG_RESULT(yes)],
+	       [AC_MSG_RESULT(no)])
+AC_MSG_CHECKING([for g_access])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gstdio.h>]], [[(void)g_access("/xxx",0777);]])],
+               [AC_DEFINE(HAVE_G_ACCESS, 1, [Define if g_access is available as macro or function])
+		AC_MSG_RESULT(yes)],
+	       [AC_MSG_RESULT(no)])
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
+
+AC_MSG_CHECKING([whether macro S_ISREG is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#include <sys/types.h>
+#include <sys/stat.h>]],
+[[S_ISREG(S_IFMT);]])],
+	[macro_s_isreg=yes],
+	[AH_TEMPLATE([S_ISREG], [Define S_ISREG if stat.h doesn't])
+	 AC_DEFINE([S_ISREG(m)], [(((m) & S_IFMT) == S_IFREG)])
+	 macro_s_isreg=no])
+AC_MSG_RESULT($macro_s_isreg)
+
+AC_MSG_CHECKING([for native Win32])
+case $host in
+  *-*-mingw*)
+    native_win32=yes
+    ;;
+  *)
+    native_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$native_win32])
+AM_CONDITIONAL(OS_WIN32, test "$native_win32" = yes)
+
+AC_MSG_CHECKING([for Win32 platform in general])
+case $host in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+AC_MSG_RESULT($platform_win32)
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes)
+
+##################################################
+# Checks for gtk-doc and docbook-tools
+##################################################
+gtk_doc_installed=true
+#ifdef([GTK_DOC_CHECK],[GTK_DOC_CHECK([1.0])],[gtk_doc_installed=false])
+# I would have liked to conditionalize this, but 
+# that appears to break other things http://bugzilla.gnome.org/show_bug.cgi?id=156399
+GTK_DOC_CHECK([1.0])
+AM_CONDITIONAL(GTK_DOC_INSTALLED, $gtk_doc_installed)
+
+dnl ***********************************************************************************
+# Check for zlib.
+_cppflags=$CPPFLAGS
+_ldflags=$LDFLAGS
+
+Z_DIR= Z_LIBS= Z_CPPFLAGS=
+
+AC_ARG_WITH(zlib,
+        [[  --with-zlib=DIR       use libz in DIR]],
+        [case $withval in
+         yes|no) ;;
+         *)     Z_DIR=$withval
+                CPPFLAGS="${CPPFLAGS} -I$withval/include"
+                LDFLAGS="${LDFLAGS} -L$withval/lib"
+                ;;
+         esac])
+
+if test "x$with_zlib" != xno; then
+        with_zlib=no
+        AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, gzread, [with_zlib=yes])])
+fi
+if test "$with_zlib" = no; then
+        AC_MSG_ERROR([*** zlib is required])
+fi
+if test "x$Z_DIR" != "x"; then
+        Z_CPPFLAGS="-I$Z_DIR/include"
+        case $host in
+        *-*-solaris*)   Z_LIBS="-L$Z_DIR/lib -R$Z_DIR/lib -lz" ;;
+        *)              Z_LIBS="-L$Z_DIR/lib -lz" ;;
+        esac
+else
+        Z_LIBS="-lz"
+fi
+AC_SUBST(Z_CPPFLAGS)
+AC_SUBST(Z_LIBS)
+
+CPPFLAGS=${_cppflags}
+LDFLAGS=${_ldflags}
+
+dnl bz2
+dnl
+BZ2_LIBS=
+test_bz2=true
+AC_ARG_WITH(bz2,
+	[--{with,without}-bz2   Build additional wrappers for BZ2],
+	if test "x$withval" = xno; then
+		test_bz2=false
+	fi
+)
+
+with_bz2=false
+if test "x$test_bz2" = xtrue ; then
+   AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, 
+		bz2_ok=yes,
+		bz2_ok=no
+		AC_MSG_WARN(*** BZ2 support disabled (BZ2 library not found) ***))
+
+   if test "$bz2_ok" = yes; then
+      AC_MSG_CHECKING([for bzlib.h])
+      AC_PREPROC_IFELSE(
+	[AC_LANG_SOURCE(
+	[[#include <stdio.h>
+	#undef PACKAGE
+	#undef VERSION
+	#undef HAVE_STDLIB_H
+	#include <bzlib.h>]])],
+        bz2_ok=yes,
+        bz2_ok=no)
+      AC_MSG_RESULT($bz2_ok)
+   fi
+
+   if test "$bz2_ok" = yes; then
+	AC_DEFINE(HAVE_BZ2, 1, [Is bzip2 available and enabled])
+	BZ2_LIBS="-lbz2"
+   else
+	AC_MSG_WARN(*** BZ2 support disabled (BZ2 header not found) ***)
+   fi
+else
+   AC_MSG_WARN([BZ2 support disabled, as requested (Use --with-bz2 to enable)])
+fi
+
+AC_SUBST(BZ2_LIBS)
+
+dnl ***********************************************************************************
+
+dnl gnome
+dnl
+want_gnome=auto
+AC_ARG_WITH(gnome,
+	[--{with,without}-gnome   Build additional wrappers for GNOME-VFS and BONOBO],
+	[case $withval in
+	yes) want_gnome=yes;;
+	no) want_gnome=no;;
+	esac[]dnl
+])
+have_gnome=no
+if  test $want_gnome = no ; then 
+    AC_MSG_WARN([GNOME support disabled, as requested (Use --with-gnome to enable)])
+else
+    PKG_CHECK_MODULES(LIBGSF_GNOME, $libgsf_gnome_reqs,
+	[have_gnome=yes],
+	[if test $want_gnome = yes; then
+	    AC_MSG_ERROR([GNOME support requested, but not available.])
+	 else
+	    AC_MSG_WARN([GNOME support disabled, unable to find required version of VFS and/or Bonobo])
+	 fi])
+fi
+AM_CONDITIONAL(WITH_LIBGSF_GNOME, test $have_gnome = yes)
+
+# GConf configuration
+dnl Don't publish the GCONFTOOL variable, AM_GCONF_SOURCE_2 has ``gconftool-2'' hardwired.
+GCONFTOOL=
+AC_CHECK_PROG([GCONFTOOL], [gconftool-2], [gconftool-2], [no])
+if test "x$GCONFTOOL" = "xno"; then
+    AC_MSG_WARN([thumbnailer will not be built, unable to find gconftool-2])
+else
+    AM_GCONF_SOURCE_2
+fi
+AM_CONDITIONAL(WITH_GCONF, test "x$GCONFTOOL" != "xno")
+
+dnl # LDFLAGS="-no-undefined $LDFLAGS"
+
+# turn off unneeded python support
+AM_CONDITIONAL(WITH_PYTHON, false)
+
+else
+
+AM_CONDITIONAL(OS_WIN32, false)
+AM_CONDITIONAL(PLATFORM_WIN32, false)
+AM_CONDITIONAL(GTK_DOC_INSTALLED, false)
+ AM_CONDITIONAL(ENABLE_GTK_DOC, false)
+ AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, false)
+AM_CONDITIONAL(WITH_LIBGSF_GNOME, false)
+AM_CONDITIONAL(WITH_GCONF, false)
+AM_CONDITIONAL(WITH_PYTHON, false)
+
+fi
+# -libgsf-1.12.3
+
+# +goffice-0.0.4
+if test "x$HAVE_GOFFICE" != xyes; then
+
+AC_MSG_NOTICE('internal goffice configuration...')
+
+m4_define([goffice_version_epoch], [0])
+m4_define([goffice_version_major], [0])
+m4_define([goffice_version_minor], [4])
+m4_define([goffice_version_extra], [])
+m4_define([goffice_full_version],
+    [goffice_version_epoch.goffice_version_major.goffice_version_minor[]goffice_version_extra])
+
+AC_CONFIG_SRCDIR(lib/goffice-0.0.4/goffice/goffice.h)
+
+AC_SUBST(GOFFICE_LIB_VERSION,
+m4_eval(goffice_version_epoch + goffice_version_major)[]dnl
+:goffice_version_minor:goffice_version_major)
+
+dnl This one is created by autoheader, ...
+AC_CONFIG_HEADERS(goffice-config.h)
+
+dnl ... and this one is a small subset, maintained manually,
+dnl which will be installed.
+AC_CONFIG_HEADERS(goffice-features.h)
+dnl
+dnl Make sure these two won't clash.  Put the following to goffice-config.h:
+AH_BOTTOM([/* Don't include goffice-features.h, it's a subset of goffice-config.h. */
+#define GOFFICE_FEATURES_H])
+
+dnl We use $host_os:
+dnl AC_CANONICAL_HOST
+
+AC_ISC_POSIX
+AC_PROG_CC
+AC_PROG_YACC
+AM_PROG_LEX
+AC_PROG_LN_S
+AM_PROG_LIBTOOL
+AC_STDC_HEADERS
+AC_SYS_LARGEFILE
+
+dnl Propagate Gnome-specific variable ACLOCAL_FLAGS to Makefile.
+AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
+
+dnl The first call to PKG_CHECK_MODULES is inside an `if.'
+dnl We have to call PKG_PROG_PKG_CONFIG explicitly; otherwise it would
+dnl get expanded just before the first occurence of PKG_CHECK_MODULES
+dnl and might escape execution.
+dnl PKG_PROG_PKG_CONFIG
+
+dnl *****************************
+#	libgsf-1		>= 1.12.2
+goffice_reqs="
+	glib-2.0		>= 2.4.8
+	gobject-2.0		>= 2.4.8
+	gmodule-2.0		>= 2.4.8
+	libxml-2.0		>= 2.4.12
+	pango			>= 1.6.0
+	pangoft2		>= 1.6.0
+"
+goffice_cairo_reqs="
+	cairo			>= 0.5.0
+"
+goffice_gtk_reqs="
+	gtk+-2.0		>= 2.4.14
+	libglade-2.0		>= 2.3.6
+	libgnomeprint-2.2	>= 2.8.0
+	libart-2.0		>= 2.3.11
+"
+goffice_gnome_reqs="
+	gconf-2.0
+	libgnomeui-2.0		>= 2.0.0
+	libgsf-gnome-1		>= 1.12.2
+"
+dnl *********************
+dnl Should we use cairo ?
+dnl *********************
+goffice_with_cairo=false
+AC_ARG_WITH(cairo, [  --{with,without}-cairo  Use cairo for graph rendering])
+if test "x$with_cairo" = xyes; then
+	cairo_msg="Enabled"
+	PKG_CHECK_MODULES(CAIRO, [$goffice_cairo_reqs])
+	AC_DEFINE(WITH_CAIRO, 1, [Define if goffice is build with cairo])
+	goffice_reqs="$goffice_reqs $goffice_cairo_reqs"
+	goffice_with_cairo=true
+else
+	cairo_msg="Disabled"
+	goffice_with_cairo=false
+fi 
+
+dnl *******************
+dnl Should we use gtk ?
+dnl *******************
+goffice_with_gtk=true
+AC_ARG_WITH(gtk, [  --without-gtk           Build without UI])
+if test "x$with_gtk" = xno; then
+	ui_msg="None (Gtk disabled by request)"
+	goffice_with_gtk=false
+else
+	dnl We shouldn't silently default to --without-gtk.
+	dnl If the requirements are not met, fail.
+	ui_msg="Gtk"
+	PKG_CHECK_MODULES(GTK, [$goffice_gtk_reqs])
+fi 
+
+goffice_with_gnome=$goffice_with_gtk
+if test "x$goffice_with_gtk" = "xtrue" ; then
+	AC_DEFINE(WITH_GTK, 1, [Define if UI is built])
+	goffice_reqs="$goffice_reqs $goffice_gtk_reqs"
+
+	dnl ************************************
+	dnl Are the GNOME extensions available ?
+	dnl ************************************
+
+	goffice_with_gnome=true
+	AC_ARG_WITH(gnome,
+		[  --{with,without}-gnome  Use GNOME extensions],
+		[if test "x$withval" = xno; then
+			goffice_with_gnome=false
+			ui_msg="Gtk+ (Gnome disabled by request)"
+		fi]
+	)
+	if test "x$goffice_with_gnome" = "xtrue"; then
+		PKG_CHECK_MODULES(GNOME, [$goffice_gnome_reqs],
+			[ui_msg="Gnome"],
+			[ui_msg="Gtk (missing gnome dependencies)" ; goffice_with_gnome=false])
+	fi
+
+	if test "x$goffice_with_gnome" = "xtrue"; then
+		AC_DEFINE(WITH_GNOME, 1, [Define if GNOME extensions are available])
+		goffice_reqs="$goffice_reqs $goffice_gnome_reqs"
+	fi
+fi
+AM_CONDITIONAL(WITH_CAIRO, $goffice_with_cairo)
+AM_CONDITIONAL(WITH_GTK,   $goffice_with_gtk)
+AM_CONDITIONAL(WITH_GNOME, $goffice_with_gnome)
+
+dnl ****************************
+dnl now that we have selected out libraries the whole collection in one
+dnl shot so that we can have a nice neat compile/link line
+dnl ****************************
+
+PKG_CHECK_MODULES(GOFFICE_DEPS, $goffice_reqs)
+
+dnl  Checks for Xft/XRender
+AC_CHECK_LIB(Xrender, XRenderFindFormat, 
+	[AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
+	 AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
+	[AC_SUBST(RENDER_LIBS, "")],
+	[-lXext])
+
+dnl *****************************
+AC_MSG_CHECKING([for Win32 platform])
+with_win32=no
+case $host_os in
+  mingw* | pw32* | cygwin*)
+    with_win32=yes
+    GOFFICE_PLUGIN_LDFLAGS="-Wl,--enable-runtime-pseudo-relo,--export-all-symbols $GOFFICE_PLUGIN_LDFLAGS"
+    AC_ARG_VAR(WINDRES, [The windres executable (used by win32 builds only).])
+    AC_CHECK_TOOL(WINDRES, windres, :)
+    ;;
+esac
+AC_MSG_RESULT($with_win32)
+AM_CONDITIONAL(WITH_WIN32, test $with_win32 = yes)
+
+dnl *****************************
+dnl FIXME: perhaps declare with AC_ARG_VAR?
+dnl	   If we use the initial value of a variable, we have to make it precious.
+dnl
+GOFFICE_PLUGIN_LDFLAGS="-avoid-version -no-undefined $GOFFICE_PLUGIN_LDFLAGS"
+GOFFICE_PLUGIN_LIBADD="\$(top_builddir)/lib/goffice-0.0.4/goffice/libgoffice-1.la $GOFFICE_DEPS_LIBS $GOFFICE_PLUGIN_LIBADD"
+AC_SUBST(GOFFICE_PLUGIN_LDFLAGS)
+AC_SUBST(GOFFICE_PLUGIN_LIBADD)
+
+dnl disable for in stable release, re-enable for development series
+# FIXME - we should enable these, but maybe not right now...  -jsled
+# CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
+# CFLAGS="$CFLAGS -DPANGO_DISABLE_DEPRECATED"
+# if test "x$goffice_with_gtk" = "xtrue"; then
+# 	CFLAGS="$CFLAGS -DGDK_PIXBUF_DISABLE_DEPRECATED"
+# 	CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED"
+# 	CFLAGS="$CFLAGS -DGDK_MULTIHEAD_SAFE"
+# 	CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED"
+# 	CFLAGS="$CFLAGS -DLIBGLADE_DISABLE_DEPRECATED"
+# fi
+# if test "x$goffice_with_gnome" = "xtrue"; then
+# 	CFLAGS="$CFLAGS -DGNOME_DISABLE_DEPRECATED"
+# 	CFLAGS="$CFLAGS -DBONOBO_DISABLE_DEPRECATED"
+# 	CFLAGS="$CFLAGS -DBONOBO_UI_DISABLE_DEPRECATED"
+# fi
+
+dnl ****************************
+dnl prep the pixmap generator
+dnl ****************************
+
+AC_ARG_VAR(GLIB_GENMARSHAL, [The glib-genmarshal executable.])
+AC_CHECK_PROG(GLIB_GENMARSHAL, glib-genmarshal, glib-genmarshal)
+
+AC_ARG_VAR(GDK_PIXBUF_CSOURCE, [The gdk-pixbuf-csource executable.])
+AC_CHECK_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, gdk-pixbuf-csource)
+
+## this should come after `AC_PROG_CC'
+#ifdef([GNOME_COMPILE_WARNINGS],
+#	[GNOME_COMPILE_WARNINGS] CFLAGS="$CFLAGS $WARN_CFLAGS",
+#	[]
+#)
+#set_more_warnings=yes
+#if test "$GCC" = "yes" -a "x$set_more_warnings" != "xno"; then
+#	for option in -Wsign-compare -Wpointer-arith -Wnested-externs -Wchar-subscripts -Wwrite-strings -Wdeclaration-after-statement -Wmissing-noreturn -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-format-attribute; do
+#		SAVE_CFLAGS="$CFLAGS"
+#		CFLAGS="$CFLAGS $option"
+#		AC_MSG_CHECKING([whether gcc understands $option])
+#		AC_TRY_COMPILE([], [],
+#			has_option=yes,
+#			has_option=no,)
+#		if test $has_option = no; then
+#		  CFLAGS="$SAVE_CFLAGS"
+#		fi
+#		AC_MSG_RESULT($has_option)
+#		unset has_option
+#		unset SAVE_CFLAGS
+#	done
+#	unset option
+#fi
+#AC_SUBST(WARN_CFLAGS)
+
+AC_CHECK_FUNC(gettimeofday,
+	[AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
+		[Define if the gettimeofday function is available]
+	)])
+
+dnl M_PI
+AC_MSG_CHECKING([whether M_PI is available])
+AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], works_without_bsd_source=yes, works_without_bsd_source=no)
+AC_MSG_RESULT($works_without_bsd_source)
+
+if test $works_without_bsd_source = no ; then
+	CFLAGS="$CFLAGS -D_BSD_SOURCE"
+	AC_MSG_CHECKING([whether M_PI is available with -D_BSD_SOURCE])
+	AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], m_pi_works=yes, m_pi_works=no)
+	AC_MSG_RESULT($m_pi_works)
+	if test $m_pi_works = no ; then
+		AC_MSG_ERROR([M_PI is not available])
+	fi
+fi
+
+dnl
+dnl On Solaris finite() needs ieeefp.h
+dnl Either of these seem to signal IEEE754 math, see mathfunc.c
+dnl
+AC_CHECK_HEADERS(ieeefp.h ieee754.h)
+
+dnl Check for some functions
+AC_CHECK_FUNCS(random drand48 finite memmove mkdtemp uname times sysconf)
+
+dnl FIXME: Does this really belong here?
+AC_CHECK_FUNC(bind_textdomain_codeset,,[AC_CHECK_LIB(intl,bind_textdomain_codeset)])
+
+dnl isfinite is a macro on HPUX
+AC_TRY_COMPILE([#include <math.h>], [int a = isfinite(0.0)],
+	[AC_DEFINE(HAVE_ISFINITE, 1,
+		[Define if the isfinite() macro is available]
+	 )
+	], [])
+
+dnl
+dnl On BSD, we seem to need -lm for finite
+dnl
+if test $ac_cv_func_finite = no; then
+  AC_CHECK_LIB(m, finite,
+        [AC_DEFINE(HAVE_FINITE, 1,
+		[Define if the finite function is available]
+	 )
+         LIBS="$LIBS -lm"])
+fi
+
+dnl check for complete locale implementation
+AC_CHECK_HEADERS(langinfo.h)
+
+dnl Handle systems that have stuff in -lm.
+AC_CHECK_FUNCS(log)
+if test $ac_cv_func_log = no; then
+  AC_CHECK_LIB(m, log,
+        [AC_DEFINE(HAVE_LOG, 1,
+		[Define if the log function is available]
+	 )
+         LIBS="$LIBS -lm"])
+fi
+
+AC_DEFUN([GOFFICE_CHECK_FUNC],
+[AC_CHECK_FUNC([$1],
+	[],
+	[AC_DEFINE([GOFFICE_SUPPLIED_]AS_TR_CPP([$1]),
+		1,
+		[Define if G Office supplies $1.])])dnl
+])
+GOFFICE_CHECK_FUNC(log1p)
+GOFFICE_CHECK_FUNC(expm1)
+GOFFICE_CHECK_FUNC(asinh)
+GOFFICE_CHECK_FUNC(acosh)
+GOFFICE_CHECK_FUNC(atanh)
+
+float_msg=no
+EXTRA_LIBS= EXTRA_INCLUDES=
+AC_C_LONG_DOUBLE
+if test $ac_cv_c_long_double = yes; then
+    have_mandatory_funcs=yes
+    need_sunmath=0
+    sunmathlinkstuff='-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib -lsunmath'
+    for ldfunc in fabsl logl log10l ceill floorl powl isnanl finitel; do
+	    AC_CHECK_FUNC($ldfunc,
+		  ,
+		  [AC_CHECK_LIB(m,
+		      $ldfunc,
+		      ,
+		      [AC_CHECK_LIB(sunmath,
+			  $ldfunc,
+			  [ if test $need_sunmath = 0; then
+				# FIXME: better idea?
+				LDFLAGS="$LDFLAGS $sunmathlinkstuff"
+				sunmathinclude=`ls -d /opt/SUNWspro/*/include/cc | sed '$!d'`
+				CPPFLAGS="$CPPFLAGS -I$sunmathinclude"
+			    fi
+			    need_sunmath=1 ],
+			  [have_mandatory_funcs=no],
+			  [-L/opt/SUNWspro/lib $GOFFICE_DEPS_LIBS])])])
+    done
+    if test $need_sunmath = 1; then
+	EXTRA_LIBS="$EXTRA_LIBS $sunmathlinkstuff"
+	EXTRA_INCLUDES="$EXTRA_INCLUDES -I$sunmathinclude"
+	AC_CHECK_HEADERS([sunmath.h floatingpoint.h],
+			 ,
+			 [AC_MSG_WARN([Long doubles require the $ac_header header.])
+			  have_mandatory_funcs=no])
+    fi
+    unset need_sunmath
+    unset sunmathlinkstuff
+    unset sunmathinclude
+
+    GOFFICE_CHECK_FUNC(modfl)
+    GOFFICE_CHECK_FUNC(ldexpl)
+    GOFFICE_CHECK_FUNC(frexpl)
+
+    AC_CHECK_FUNCS(strtold)
+    if test "$ac_cv_func_strtold" = yes; then
+	AC_MSG_CHECKING([if we must prototype strtold ourselves])
+	AC_TRY_RUN([#include <stdlib.h>
+		int main ()
+		{
+			const char *s = "+3.1415e+0";
+			char *theend;
+			long double res = strtold (s, &theend);
+			return !(*theend == 0 && finitel (res) &&
+				 res >= 3.14 && res <= 3.15);
+		}],
+		[AC_MSG_RESULT(no)],
+		[AC_MSG_RESULT(yes)
+		 AC_DEFINE([GOFFICE_SUPPLIED_STRTOLD], 1,
+			   [Define if G Office supplies strtold.])
+		],
+		[AC_MSG_RESULT(assuming not)])
+    else 
+	AC_DEFINE([GOFFICE_SUPPLIED_STRTOLD], 1,
+		  [Define if G Office supplies strtold.])
+	AC_CHECK_FUNCS(string_to_decimal decimal_to_quadruple)
+	if test "x$ac_cv_func_string_to_decimal" != "xyes" || \
+	   test "x$ac_cv_func_decimal_to_quadruple" != "xyes" || \
+	   test "x$ac_cv_header_floatingpoint_h" != "xyes"; then
+		AC_MSG_WARN([You lack the strtold function -- precision will be impaired])
+	fi
+    fi
+    if test "$have_mandatory_funcs" = yes; then
+	float_msg=yes
+	AC_DEFINE([GOFFICE_WITH_LONG_DOUBLE], 1,
+		  [Define if G Office supports long double.])
+    else
+	AC_MSG_WARN([Long double support disabled because of library problems])
+    fi
+    unset have_mandatory_funcs
+fi
+AC_SUBST(EXTRA_LIBS)
+AC_SUBST(EXTRA_INCLUDES)
+
+dnl ******************
+dnl * Config defaults
+dnl ******************
+dnl
+dnl These are changed in goffice.c for WIN32 packages
+AC_SUBST(goffice_datadir, '${datadir}/goffice/${GOFFICE_VERSION}')
+AC_SUBST(goffice_libdir, '${libdir}/goffice/${GOFFICE_VERSION}')
+AC_SUBST(goffice_icondir, '${datadir}/pixmaps/goffice')
+AC_SUBST(goffice_localedir, '${prefix}/${DATADIRNAME}/locale')
+dnl
+AC_SUBST(goffice_plugindir, '${goffice_libdir}/plugins')
+AC_SUBST(goffice_gladedir, '${goffice_datadir}/glade')
+
+dnl Export to goffice-config.h and goffice-features.h
+AC_DEFINE(GOFFICE_VERSION, "goffice_full_version",
+	[The version number of this release, possibly with additional suffix])
+AC_DEFINE(GO_VERSION_EPOCH, goffice_version_epoch,
+	[The Epoch of this release])
+AC_DEFINE(GO_VERSION_MAJOR, goffice_version_major,
+	[The Major version number of this release])
+AC_DEFINE(GO_VERSION_MINOR, goffice_version_minor,
+	[The Minor version number of this release])
+AC_DEFINE(GO_VERSION_EXTRA, "goffice_version_extra",
+	[Extra, possibly empty tag for this release])
+
+else
+
+AM_CONDITIONAL(WITH_CAIRO, false)
+AM_CONDITIONAL(WITH_GTK,   false)
+AM_CONDITIONAL(WITH_GNOME, false)
+AM_CONDITIONAL(WITH_WIN32, false)
+
+fi
+# -goffice-0.0.4
+
+# -gog2
+
 ### --------------------------------------------------------------------------
 ### Variables
 ### Set up all the initial variable values...
@@ -1253,23 +1992,47 @@
           lib/guile-www/Makefile
           lib/srfi/Makefile
           lib/libc/Makefile
-          lib/goffice/Makefile
-          lib/goffice/split/Makefile
-          lib/goffice/split/widgets/Makefile
-          lib/goffice/app/Makefile
-          lib/goffice/graph/Makefile
-          lib/goffice/graph/plugins/Makefile
-          lib/goffice/graph/plugins/plot_barcol/Makefile
-          lib/goffice/graph/plugins/plot_pie/Makefile
-          lib/goffice/graph/plugins/plot_radar/Makefile
-          lib/goffice/graph/plugins/plot_surface/Makefile
-          lib/goffice/graph/plugins/plot_xy/Makefile
-          lib/goffice/utils/Makefile
-          lib/goffice/gui-utils/Makefile
-          lib/goffice/drawing/Makefile
-          lib/goffice/pixmaps/Makefile
-          lib/goffice/cut-n-paste/Makefile
-          lib/goffice/cut-n-paste/pcre/Makefile
+          lib/libgsf-1.12.3/Makefile
+          lib/libgsf-1.12.3/doc/Makefile
+          lib/libgsf-1.12.3/gsf/Makefile
+          lib/libgsf-1.12.3/gsf-gnome/Makefile
+          lib/libgsf-1.12.3/gsf-win32/Makefile
+          lib/libgsf-1.12.3/tests/Makefile
+          lib/libgsf-1.12.3/python/Makefile
+          lib/libgsf-1.12.3/thumbnailer/Makefile
+          lib/libgsf-1.12.3/po/Makefile.in
+          lib/libgsf-1.12.3/gsf/version.c
+          lib/libgsf-1.12.3/doc/version.xml
+          lib/libgsf-1.12.3/libgsf-1.pc
+          lib/libgsf-1.12.3/libgsf-1.spec
+          lib/libgsf-1.12.3/libgsf-gnome-1.pc
+          lib/libgsf-1.12.3/libgsf-gnome-1.spec
+          lib/libgsf-1.12.3/libgsf-win32-1.pc
+          lib/libgsf-1.12.3/libgsf-zip
+          lib/goffice-0.0.4/Makefile
+          lib/goffice-0.0.4/libgoffice-1.pc
+          lib/goffice-0.0.4/goffice/Makefile
+          lib/goffice-0.0.4/goffice/app/Makefile
+          lib/goffice-0.0.4/goffice/utils/Makefile
+          lib/goffice-0.0.4/goffice/data/Makefile
+          lib/goffice-0.0.4/goffice/gtk/Makefile
+          lib/goffice-0.0.4/goffice/graph/Makefile
+          lib/goffice-0.0.4/goffice/drawing/Makefile
+          lib/goffice-0.0.4/goffice/ms-compat/Makefile
+          lib/goffice-0.0.4/goffice/cut-n-paste/Makefile
+          lib/goffice-0.0.4/goffice/cut-n-paste/foocanvas/Makefile
+          lib/goffice-0.0.4/goffice/cut-n-paste/pcre/Makefile
+          lib/goffice-0.0.4/plugins/Makefile
+          lib/goffice-0.0.4/plugins/plot_barcol/Makefile
+          lib/goffice-0.0.4/plugins/plot_pie/Makefile
+          lib/goffice-0.0.4/plugins/plot_radar/Makefile
+          lib/goffice-0.0.4/plugins/plot_xy/Makefile
+          lib/goffice-0.0.4/plugins/plot_surface/Makefile
+          lib/goffice-0.0.4/plugins/plot_boxes/Makefile
+          lib/goffice-0.0.4/plugins/reg_linear/Makefile
+          lib/goffice-0.0.4/pixmaps/Makefile
+          lib/goffice-0.0.4/po/Makefile.in
+          lib/goffice-0.0.4/tests/Makefile
           lib/libqof/Makefile
           lib/libqof/qof/Makefile
           lib/libqof/backend/Makefile
@@ -1399,8 +2162,12 @@
   CPPFLAGS ............. : $CPPFLAGS
   CFLAGS ............... : $CFLAGS
   LDFLAGS .............. : $LDFLAGS
+  Have libgsf............: $HAVE_LIBGSF
+  Have goffice...........: $HAVE_GOFFICE
   QOF support ...........: $QOF_VERSION
   QOF location ..........: $QOF_PREFIX
   QOF library dir .......: $QOF_LIB_DIR
   QOF backend config ....: $QOF_XML_DIR
+
+
 ])

Copied: gnucash/trunk/goffice-config.h.in (from rev 12095, gnucash/branches/goffice-update/goffice-config.h.in)

Copied: gnucash/trunk/goffice-features.h.in (from rev 12095, gnucash/branches/goffice-update/goffice-features.h.in)

Copied: gnucash/trunk/gsf-config.h.in (from rev 12095, gnucash/branches/goffice-update/gsf-config.h.in)

Modified: gnucash/trunk/lib/Makefile.am
===================================================================
--- gnucash/trunk/lib/Makefile.am	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/lib/Makefile.am	2005-12-04 21:27:17 UTC (rev 12096)
@@ -1,10 +1,11 @@
 SUBDIRS = libc glib26 guile-www srfi
 
-if USE_LIBGOFFICE
-SUBDIRS +=
-else
-SUBDIRS += goffice
+if !HAVE_GOFFICE
+if !HAVE_LIBGSF
+SUBDIRS += libgsf-1.12.3
 endif
+SUBDIRS += goffice-0.0.4
+endif
 
 if USE_LIBQOF
 SUBDIRS += libqof

Copied: gnucash/trunk/lib/goffice-0.0.4 (from rev 12095, gnucash/branches/goffice-update/lib/goffice-0.0.4)


Property changes on: gnucash/trunk/lib/goffice-0.0.4
___________________________________________________________________
Name: svn:ignore
   + libgoffice-1.pc
Makefile
Makefile.in



Copied: gnucash/trunk/lib/libgsf-1.12.3 (from rev 12095, gnucash/branches/goffice-update/lib/libgsf-1.12.3)


Property changes on: gnucash/trunk/lib/libgsf-1.12.3
___________________________________________________________________
Name: svn:ignore
   + Makefile.in
libgsf-1.spec
libgsf-zip
libgsf-gnome-1.pc
gsf-config.h
Makefile
stamp-h2
libgsf-gnome-1.spec
libgsf-1.pc
libgsf-win32-1.pc




Property changes on: gnucash/trunk/src/doc/design
___________________________________________________________________
Name: svn:ignore
   - Makefile
Makefile.in
version.texi
stamp-vti
gnucash-design.tps
gnucash-design.fns
gnucash-design.cps
gnucash-design.toc
gnucash-design.pg
gnucash-design.ky
gnucash-design.tp
gnucash-design.vr
gnucash-design.fn
gnucash-design.cp
gnucash-design.ps
gnucash-design.dvi
gnucash-design.aux
*.info
*.info-*
*.html
texinfo.tex
.DS_Store
mdate-sh

   + Makefile
Makefile.in
version.texi
stamp-vti
gnucash-design.tps
gnucash-design.fns
gnucash-design.cps
gnucash-design.toc
gnucash-design.pg
gnucash-design.ky
gnucash-design.tp
gnucash-design.vr
gnucash-design.fn
gnucash-design.cp
gnucash-design.ps
gnucash-design.dvi
gnucash-design.aux
*.info
*.info-*
*.html
texinfo.tex
.DS_Store
mdate-sh



Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/src/gnome-utils/Makefile.am	2005-12-04 21:27:17 UTC (rev 12096)
@@ -4,7 +4,7 @@
 pkglib_LTLIBRARIES = libgncmod-gnome-utils.la libgw-gnome-utils.la
 
 # Note that src/gnome-utils CANNOT depend on src/gnome!
-if USE_LIBGOFFICE
+
 AM_CFLAGS = \
   -DPREFIX=\"${prefix}\" \
   -DSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
@@ -25,36 +25,9 @@
   ${GTKHTML_CFLAGS} \
   ${GUILE_INCS} \
   ${G_WRAP_COMPILE_ARGS} \
-  ${GSF_CFLAGS} \
   ${QOF_CFLAGS} \
-  ${LIBGOFFICE_CFLAGS}
-else
-AM_CFLAGS = \
-  -DPREFIX=\"${prefix}\" \
-  -DSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
-  -DDATADIR=\"${GNC_SHAREDIR}\" \
-  -DLIBDIR=\"${GNC_LIBDIR}\" \
-  -I${top_srcdir}/src/core-utils \
-  -I${top_srcdir}/src/gnc-module \
-  -I${top_srcdir}/src/engine \
-  -I${top_srcdir}/src/backend/file \
-  -I${top_srcdir}/src/network-utils \
-  -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src \
-  -I${top_srcdir}/lib/goffice \
-  -I${top_srcdir}/lib/goffice/split \
-  -I${top_srcdir}/lib/glib26 \
-  -I${top_srcdir}/lib \
-  ${GNOME_CFLAGS} \
-  ${GTKHTML_CFLAGS} \
-  ${GLIB_CFLAGS} \
-  ${GLADE_CFLAGS} \
-  ${GUILE_INCS} \
-  ${GNOME_PRINT_CFLAGS} \
-  ${G_WRAP_COMPILE_ARGS} \
-  ${QOF_CFLAGS} \
+  ${GOFFICE_CFLAGS} \
   ${GSF_CFLAGS}
-endif
 
 libgncmod_gnome_utils_la_SOURCES = \
   QuickFill.c \
@@ -195,7 +168,6 @@
   gw-gnome-utils.h \
   search-param.h
 
-if USE_LIBGOFFICE
 libgncmod_gnome_utils_la_LIBADD = \
   ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
@@ -215,31 +187,8 @@
   ${DB_LIBS} \
   ${GSF_LIBS} \
   ${QOF_LIBS} \
-  ${LIBGOFFICE_LIBS} \
+  ${GOFFICE_LIBS} \
   ${XML_LIBS}
-else
-libgncmod_gnome_utils_la_LIBADD = \
-  ${top_builddir}/src/core-utils/libcore-utils.la \
-  ${top_builddir}/src/gnc-module/libgncmodule.la \
-  ${top_builddir}/src/engine/libgncmod-engine.la \
-  ${top_builddir}/src/calculation/libgncmod-calculation.la \
-  ${top_builddir}/src/network-utils/libgncmod-network-utils.la \
-  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
-  ${top_builddir}/lib/goffice/libgoffice.la \
-  ${top_builddir}/lib/glib26/libgncglib.la \
-  ${GNOME_LIBS} \
-  ${GNOME_PRINT_LIBS} \
-  ${GTKHTML_LIBS} \
-  ${GUILE_LIBS} \
-  ${GDK_PIXBUF_LIBS} \
-  ${GLADE_LIBS} \
-  ${GUILE_LIBS} \
-  ${GLIB_LIBS} \
-  ${DB_LIBS} \
-  ${GSF_LIBS} \
-  ${QOF_LIBS} \
-  ${XML_LIBS}
-endif
 
 libgw_gnome_utils_la_SOURCES = gw-gnome-utils.c
 

Modified: gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c	2005-12-04 19:33:30 UTC (rev 12095)
+++ gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c	2005-12-04 21:27:17 UTC (rev 12096)
@@ -31,8 +31,6 @@
 #include "gnc-html-graph-gog.h"
 #include "gnc-html.h"
 #include "gnc-engine.h"
-
-#ifdef HAVE_GOFFICE
 #include <goffice/goffice.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/graph/gog-object.h>
@@ -45,21 +43,8 @@
 #include <goffice/graph/gog-data-set.h>
 #include <goffice/graph/gog-renderer-svg.h>
 #include <goffice/data/go-data-simple.h>
-#else
-#include "goffice.h"
-#include "graph/gog-graph.h"
-#include "graph/gog-object.h"
-#include "graph/gog-plot.h"
-#include "graph/gog-series.h"
-#include "graph/go-data-simple.h"
-#include "utils/go-color.h"
-#include "utils/go-pattern.h"
-#include "graph/gog-renderer-pixbuf.h"
-#include "graph/gog-renderer-svg.h"
-#include "graph/gog-data-set.h"
-#include "graph/gog-styled-object.h"
-#include "graph/gog-style.h"
-#endif
+#include <goffice/app/go-plugin.h>
+#include <goffice/app/go-plugin-loader-module.h>
 #include <gsf/gsf.h>
 #include <gsf/gsf-output-memory.h>
 
@@ -96,6 +81,9 @@
   PINFO( "init gog graphing" );
   
   libgoffice_init();
+  
+  /* Initialize plugins manager */
+  go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_PLUGIN_LOADER_MODULE_TYPE);
 
   gnc_html_register_object_handler( "gnc-guppi-pie", handle_piechart );
   gnc_html_register_object_handler( "gnc-guppi-bar", handle_barchart );
@@ -242,9 +230,6 @@
   }
 
   tmp = gog_object_add_by_name(chart, "Title", NULL);
-#ifndef HAVE_GOFFICE
-  gog_object_set_pos(tmp, GOG_POSITION_N | GOG_POSITION_ALIGN_START);
-#endif
   titleScalar = go_data_scalar_str_new(totalTitle->str, FALSE);
   gog_dataset_set_dim(GOG_DATASET(tmp), 0, titleScalar, NULL);
 
@@ -345,19 +330,11 @@
   GOG_STYLED_OBJECT(graph)->style->outline.color = RGBA_BLACK;
 
   series = gog_plot_new_series(plot);
-#ifdef HAVE_GOFFICE
   labelData = go_data_vector_str_new((char const * const *)labels, datasize, NULL);
-#else
-  labelData = go_data_vector_str_new((char const * const *)labels, datasize);
-#endif
   gog_series_set_dim(series, 0, labelData, NULL);
   go_data_emit_changed(GO_DATA(labelData));
 
-#ifdef HAVE_GOFFICE
   sliceData = go_data_vector_val_new(data, datasize, NULL);
-#else
-  sliceData = go_data_vector_val_new(data, datasize);
-#endif
   gog_series_set_dim(series, 1, sliceData, NULL);
   go_data_emit_changed(GO_DATA(sliceData));
 
@@ -449,11 +426,7 @@
                 "type",                         barType,
                 "overlap_percentage",           barOverlap, 
 		NULL);
-#ifdef HAVE_GOFFICE
   labelData = go_data_vector_str_new(  (char const * const *)col_labels, datacols, NULL );
-#else
-  labelData = go_data_vector_str_new(  (char const * const *)col_labels, datacols );
-#endif
   {
     // foreach row:
     //   series = row
@@ -474,11 +447,7 @@
       gog_series_set_dim( series, 0, labelData, NULL );
       go_data_emit_changed (GO_DATA (labelData));
 
-#ifdef HAVE_GOFFICE
       sliceData = go_data_vector_val_new( data + (i*datarows), datarows, NULL );
-#else
-      sliceData = go_data_vector_val_new( data + (i*datarows), datarows );
-#endif
       gog_series_set_dim( series, 1, sliceData, NULL );
       
       /*
@@ -539,19 +508,11 @@
 
   series = gog_plot_new_series( plot );
 
-#ifdef HAVE_GOFFICE
   sliceData = go_data_vector_val_new( xData, datasize, NULL );
-#else
-  sliceData = go_data_vector_val_new( xData, datasize );
-#endif
   gog_series_set_dim( series, 0, sliceData, NULL );
   go_data_emit_changed (GO_DATA (sliceData));
 
-#ifdef HAVE_GOFFICE
   sliceData = go_data_vector_val_new( yData, datasize, NULL );
-#else
-  sliceData = go_data_vector_val_new( yData, datasize );
-#endif
   gog_series_set_dim( series, 1, sliceData, NULL );
   go_data_emit_changed (GO_DATA (sliceData));
 



More information about the gnucash-changes mailing list