r15742 - gnucash/trunk - Do not check for and link against gnomeprint if gtkhtml uses gtkprint.

Andreas Köhler andi5 at cvs.gnucash.org
Tue Mar 20 12:37:52 EDT 2007


Author: andi5
Date: 2007-03-20 12:37:46 -0400 (Tue, 20 Mar 2007)
New Revision: 15742
Trac: http://svn.gnucash.org/trac/changeset/15742

Modified:
   gnucash/trunk/configure.in
   gnucash/trunk/src/business/business-gnome/Makefile.am
   gnucash/trunk/src/business/dialog-tax-table/Makefile.am
   gnucash/trunk/src/gnome-search/Makefile.am
   gnucash/trunk/src/gnome-utils/Makefile.am
   gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c
   gnucash/trunk/src/gnome-utils/print-session.h
   gnucash/trunk/src/gnome/Makefile.am
   gnucash/trunk/src/import-export/qif-import/Makefile.am
   gnucash/trunk/src/report/report-gnome/Makefile.am
Log:
Do not check for and link against gnomeprint if gtkhtml uses gtkprint.

If GtkHTML uses GtkPrint, reports and checks will use it, so GnomePrint
is not needed.  Also, remove some spurious GNOME_PRINT_{CFLAGS,LIBS} from
Makefile.am files.


Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/configure.in	2007-03-20 16:37:46 UTC (rev 15742)
@@ -1089,11 +1089,6 @@
     AC_SUBST(GDK_PIXBUF_CFLAGS)
     AC_SUBST(GDK_PIXBUF_LIBS)
 
-    PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
-    AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
-    AC_SUBST(GNOME_PRINT_CFLAGS)
-    AC_SUBST(GNOME_PRINT_LIBS)
-
     PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.4)
     AS_SCRUB_INCLUDE(GLADE_CFLAGS)
     AC_SUBST(GLADE_CFLAGS)
@@ -1118,7 +1113,7 @@
     ])
     CPPFLAGS="${saved_CPPFLAGS}"
 
-    # check for gtkhtml 3.x versions.
+    # check for gtkhtml >= 3.14 with gtkprint support
     gtkhtml=0
     PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.14, [
       if test "x$HAVE_GTK_2_10" != "xyes"; then
@@ -1130,6 +1125,9 @@
         AC_DEFINE(GTKHTML_USES_GTKPRINT,1,[GtkHTML uses GtkPrint for printing operations])
       fi
     ], [gtkhtml=0])
+    AM_CONDITIONAL(GTKHTML_USES_GTKPRINT,test "x$gtkhtml" = "x1")
+
+    # fallback to older gtkhtml versions and gnomeprint
     if test x$gtkhtml = x0
     then
       PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.8 , [gtkhtml=1], [
@@ -1141,6 +1139,11 @@
           ])
         ])
       ])
+
+      PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
+      AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
+      AC_SUBST(GNOME_PRINT_CFLAGS)
+      AC_SUBST(GNOME_PRINT_LIBS)
     fi
     AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
 dnl if Mac OSX, also scrub /sw/include

Modified: gnucash/trunk/src/business/business-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/business/business-gnome/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/business/business-gnome/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -16,7 +16,6 @@
   -I${top_srcdir}/src/business/business-core \
   -I${top_srcdir}/src/business/business-ledger \
   -I${top_srcdir}/src/business/dialog-tax-table \
-  ${GNOME_PRINT_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GTKHTML_CFLAGS} \

Modified: gnucash/trunk/src/business/dialog-tax-table/Makefile.am
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/business/dialog-tax-table/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -8,7 +8,6 @@
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/business/business-core \
-  ${GNOME_PRINT_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GTKHTML_CFLAGS} \

Modified: gnucash/trunk/src/gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/gnome/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -118,7 +118,6 @@
   -I${top_srcdir}/lib/libc \
   ${GUILE_INCS} \
   ${GNOME_CFLAGS} \
-  ${GNOME_PRINT_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GLADE_CFLAGS} \

Modified: gnucash/trunk/src/gnome-search/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-search/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/gnome-search/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -14,8 +14,7 @@
   ${GLADE_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GLIB_CFLAGS} \
-  ${QOF_CFLAGS} \
-  ${GNOME_PRINT_CFLAGS}
+  ${QOF_CFLAGS}
 
 libgncmod_gnome_search_la_SOURCES = \
   gncmod-gnome-search.c \
@@ -62,8 +61,7 @@
   ${GLADE_LIBS} \
   ${GLIB_LIBS} \
   ${REGEX_LIBS} \
-  ${QOF_LIBS} \
-  ${GNOME_PRINT_LIBS}
+  ${QOF_LIBS}
 
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = \

Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/gnome-utils/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -16,7 +16,6 @@
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GTK_CFLAGS} \
-  ${GNOME_PRINT_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GUILE_INCS} \
@@ -90,7 +89,6 @@
   gnc-window.c \
   gncmod-gnome-utils.c \
   misc-gnome-utils.c \
-  print-session.c \
   search-param.c \
   gnc-dialog.c \
   swig-gnome-utils.c \
@@ -181,7 +179,6 @@
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   $(top_builddir)/lib/libc/libc-missing.la \
   ${GNOME_LIBS} \
-  ${GNOME_PRINT_LIBS} \
   ${GTKHTML_LIBS} \
   ${GUILE_LIBS} \
   ${GDK_PIXBUF_LIBS} \
@@ -195,7 +192,7 @@
   ${LIBXML2_LIBS}
 
 if BUILDING_FROM_SVN
-swig-gnome-utils.c: gnome-utils.i gnc-html.h print-session.h \
+swig-gnome-utils.c: gnome-utils.i gnc-html.h \
                     ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
@@ -213,6 +210,14 @@
   ${gncmod_DATA} \
   ${gncscm_DATA}
 
+if GTKHTML_USES_GTKPRINT
+  EXTRA_DIST += print-session.c
+else
+  AM_CFLAGS += ${GNOME_PRINT_CFLAGS}
+  libgncmod_gnome_utils_la_LIBADD += ${GNOME_PRINT_LIBS} \
+  libgncmod_gnome_utils_la_SOURCES += print-session.c
+endif
+
 ## We borrow guile's convention and use @-...-@ as the substitution
 ## brackets here, instead of the usual @... at .  This prevents autoconf
 ## from substituting the values directly into the left-hand sides of

Modified: gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c	2007-03-20 16:37:46 UTC (rev 15742)
@@ -40,7 +40,9 @@
 #else
 #    include <goffice/graph/gog-renderer-pixbuf.h>
 #endif
-#include <goffice/graph/gog-renderer-gnome-print.h>
+#ifndef GTKHTML_USES_GTKPRINT
+#    include <goffice/graph/gog-renderer-gnome-print.h>
+#endif
 #include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-styled-object.h>
 #include <goffice/graph/gog-plot.h>

Modified: gnucash/trunk/src/gnome-utils/print-session.h
===================================================================
--- gnucash/trunk/src/gnome-utils/print-session.h	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/gnome-utils/print-session.h	2007-03-20 16:37:46 UTC (rev 15742)
@@ -24,6 +24,8 @@
 #ifndef PRINT_SESSION_H
 #define PRINT_SESSION_H
 
+#ifndef GTKHTML_USES_GTKPRINT
+
 /** @addtogroup Printing
     @{ */
 /** @file print-session.h
@@ -85,4 +87,6 @@
 /** @} */
 /** @} */
 
+#endif /* GTKHTML_USES_GTKPRINT */
+
 #endif

Modified: gnucash/trunk/src/import-export/qif-import/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/qif-import/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/import-export/qif-import/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -64,7 +64,6 @@
   ${GUILE_INCS} \
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
-  ${GNOME_PRINT_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${QOF_CFLAGS} \

Modified: gnucash/trunk/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-gnome/Makefile.am	2007-03-20 05:19:20 UTC (rev 15741)
+++ gnucash/trunk/src/report/report-gnome/Makefile.am	2007-03-20 16:37:46 UTC (rev 15742)
@@ -15,7 +15,6 @@
   ${GLADE_CFLAGS} \
   ${GUILE_INCS} \
   ${GTKHTML_CFLAGS} \
-  ${GNOME_PRINT_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
@@ -45,7 +44,6 @@
   ${top_builddir}/src/report/report-system/libgncmod-report-system.la \
   ${GLADE_LIBS} \
   ${GUILE_LIBS} \
-  ${GNOME_PRINT_LIBS} \
   ${GNOME_LIBS} \
   ${QOF_LIBS} \
   ${GLIB_LIBS}



More information about the gnucash-changes mailing list