]> git.saurik.com Git - wxWidgets.git/commitdiff
Added --with-gnomeprint and its wxUSE_LIBGNOMEPRINT
authorRobert Roebling <robert@roebling.de>
Mon, 1 Nov 2004 18:40:51 +0000 (18:40 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 1 Nov 2004 18:40:51 +0000 (18:40 +0000)
  Removed the now obsolete test for FT2 (FreeType)
    which was used by the Pango based printing which
    I removed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in
include/wx/gtk/gnome/gprint.h
include/wx/gtk1/gnome/gprint.h
setup.h.in
src/gtk/gnome/gprint.cpp
src/gtk1/gnome/gprint.cpp

index fec1576680d2cbde25a9bc7ec713a6fbfe01bb5e..b9a750e3736df5d91f0c78a7713d619e2db63223 100644 (file)
@@ -401,6 +401,7 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_LIBXPM=no
   DEFAULT_wxUSE_LIBMSPACK=no
   DEFAULT_wxUSE_LIBSDL=no
+  DEFAULT_wxUSE_LIBGNOMEPRINT=no
   DEFAULT_wxUSE_ODBC=no
   DEFAULT_wxUSE_OPENGL=no
 
@@ -588,6 +589,7 @@ else
   DEFAULT_wxUSE_LIBXPM=yes
   DEFAULT_wxUSE_LIBMSPACK=yes
   DEFAULT_wxUSE_LIBSDL=no
+  DEFAULT_wxUSE_LIBGNOMEPRINT=no
   DEFAULT_wxUSE_ODBC=no
   DEFAULT_wxUSE_OPENGL=no
 
@@ -793,6 +795,7 @@ WX_ARG_SYS_WITH(libtiff,   [  --with-libtiff          use libtiff (TIFF file for
 WX_ARG_SYS_WITH(libxpm,    [  --with-libxpm           use libxpm (XPM file format)], wxUSE_LIBXPM)
 WX_ARG_WITH(libmspack,     [  --with-libmspack        use libmspack (CHM help files loading)], wxUSE_LIBMSPACK)
 WX_ARG_WITH(sdl,           [  --with-sdl              use SDL for audio on Unix], wxUSE_LIBSDL)
+WX_ARG_WITH(gnomeprint,    [  --with-gnomeprint       use GNOME print for audio printing under Unix], wxUSE_LIBGNOMEPRINT)
 WX_ARG_WITH(opengl,        [  --with-opengl           use OpenGL (or Mesa)], wxUSE_OPENGL)
 
 fi
@@ -2514,24 +2517,6 @@ equivalent variable and GTK+ is version 1.2.3 or above.
         esac
 
         if test "$WXGTK20" = 1; then
-            if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
-                PKG_CHECK_MODULES(PANGOFT2, pangoft2,
-                    [
-                        CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
-                        # FIXME: GTK_LIBS already has a lot of what this is
-                        #        about to add, but we go ahead and just add
-                        #        it all again anyway.
-                        # This is not a good way to manage things.  And simply
-                        # uniq'ing the list later is hardly better.
-                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
-                    ],
-                    [
-                        AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
-                        wxUSE_PRINTING_ARCHITECTURE="no"
-                    ]
-                )
-            fi
-                
             save_CFLAGS="$CFLAGS"
             save_LIBS="$LIBS"
             CFLAGS="$CFLAGS $GTK_CFLAGS"
@@ -4595,6 +4580,25 @@ if test "$wxUSE_SOUND" = "yes"; then
   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound"
 fi
 
+if test "$WXGTK20" = 1; then
+    if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
+        if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
+        
+                PKG_CHECK_MODULES(LIBGNOMEPRINTUI, libgnomeprintui-2.2,
+                    [
+                        CXXFLAGS="$CXXFLAGS $LIBGNOMEPRINTUI_CFLAGS"
+                        GUI_TK_LIBRARY="$GUI_TK_LIBRARY $LIBGNOMEPRINTUI_LIBS"
+                    ],
+                    [
+                        AC_MSG_WARN([libgnomeprintui not found, library will use standard PostScript printing])
+                        wxUSE_LIBGNOMEPRINT="no"
+                    ]
+                )
+        fi
+    fi
+fi
+
+
 if test "$wxUSE_CMDLINE_PARSER" = "yes"; then
   AC_DEFINE(wxUSE_CMDLINE_PARSER)
 fi
@@ -6018,6 +6022,7 @@ AC_SUBST(EXTRALIBS_GUI)
 AC_SUBST(EXTRALIBS_OPENGL)
 AC_SUBST(EXTRALIBS_SDL)
 AC_SUBST(WITH_PLUGIN_SDL)
+AC_SUBST(EXTRALIBS_GNOMEPRINT)
 AC_SUBST(UNICODE)
 AC_SUBST(BUILD)
 AC_SUBST(DEBUG_INFO)
@@ -6304,6 +6309,7 @@ echo "                                       odbc               ${wxUSE_ODBC}"
 echo "                                       expat              ${wxUSE_EXPAT}"
 echo "                                       libmspack          ${wxUSE_LIBMSPACK}"
 echo "                                       sdl                ${wxUSE_LIBSDL}"
+echo "                                       gnomeprint         ${wxUSE_LIBGNOMEPRINT}"
 
 echo ""
 
index 11cb0278e755c537e1ca9e9cdddad18994e832b5..2dce890414716052207a51f32f94b69e0cce5fbf 100644 (file)
@@ -4,6 +4,7 @@
 // Purpose:     GNOME printing support
 // Created:     09/20/04
 // Copyright:   Robert Roebling
+// Licence:     wxWindows Licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __gprint_H__
@@ -19,6 +20,8 @@
     #include <wx/wx.h>
 #endif
 
+#if wxUSE_LIBGNOMEPRINT
+
 #include "wx/print.h"
 #include "wx/prntbase.h"
 #include "wx/printdlg.h"
@@ -302,4 +305,7 @@ private:
     DECLARE_NO_COPY_CLASS(wxGnomePrintDC)
 };
 
+#endif
+    // wxUSE_LIBGNOMEPRINT
+
 #endif
index 11cb0278e755c537e1ca9e9cdddad18994e832b5..2dce890414716052207a51f32f94b69e0cce5fbf 100644 (file)
@@ -4,6 +4,7 @@
 // Purpose:     GNOME printing support
 // Created:     09/20/04
 // Copyright:   Robert Roebling
+// Licence:     wxWindows Licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __gprint_H__
@@ -19,6 +20,8 @@
     #include <wx/wx.h>
 #endif
 
+#if wxUSE_LIBGNOMEPRINT
+
 #include "wx/print.h"
 #include "wx/prntbase.h"
 #include "wx/printdlg.h"
@@ -302,4 +305,7 @@ private:
     DECLARE_NO_COPY_CLASS(wxGnomePrintDC)
 };
 
+#endif
+    // wxUSE_LIBGNOMEPRINT
+
 #endif
index 7a21a972c93243e8d3585e0b027205d84c08d94e..b76c4dcaf58daca732e9b56305a2553058d4c123 100644 (file)
  * Use SDL for audio (Unix)
  */
 #define wxUSE_LIBSDL 0
+/*
+ * Use GNOME print for printing under GTK+ 2.0
+ */
+#define wxUSE_LIBGNOMEPRINT 0
 /*
  * Use iODBC
  */
index 3c2e788c4871a04717e81c694e08ed28aaaadb42..e73e2ce58e08444aad5d73af19be10afcc1eb8b5 100644 (file)
     #pragma hdrstop
 #endif
 
-#include "gprint.h"
+#include "wx/gtk/gnome/gprint.h"
+
+#if wxUSE_LIBGNOMEPRINT
+
 #include "wx/fontutil.h"
 #include "wx/printdlg.h"
 #include "wx/gtk/private.h"
@@ -659,3 +662,6 @@ int wxGnomePrintDC::GetResolution()
 {
     return 72;
 }
+
+#endif
+    // wxUSE_LIBGNOMEPRINT
index 3c2e788c4871a04717e81c694e08ed28aaaadb42..e73e2ce58e08444aad5d73af19be10afcc1eb8b5 100644 (file)
     #pragma hdrstop
 #endif
 
-#include "gprint.h"
+#include "wx/gtk/gnome/gprint.h"
+
+#if wxUSE_LIBGNOMEPRINT
+
 #include "wx/fontutil.h"
 #include "wx/printdlg.h"
 #include "wx/gtk/private.h"
@@ -659,3 +662,6 @@ int wxGnomePrintDC::GetResolution()
 {
     return 72;
 }
+
+#endif
+    // wxUSE_LIBGNOMEPRINT