Code

see, if someone else with actual time had done this they probably wouldn't be tired...
authormental <mental@users.sourceforge.net>
Thu, 17 Aug 2006 03:21:58 +0000 (03:21 +0000)
committermental <mental@users.sourceforge.net>
Thu, 17 Aug 2006 03:21:58 +0000 (03:21 +0000)
configure.ac
src/extension/init.cpp
src/extension/internal/cairo-pdf-out.cpp
src/extension/internal/cairo-pdf-out.h
src/extension/internal/pdf-cairo.cpp
src/extension/internal/pdf-cairo.h

index de8151734702ae808cba3ad42df57c8329bcfbb2..c22fc4f8964e3b11f8a52d8a811f192b20a4ba7e 100644 (file)
@@ -519,6 +519,11 @@ else
 fi
 PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4  glibmm-2.4  gtkmm-2.4  gtk+-2.0 >= 2.4.0  libxml-2.0 >= 2.6.11  libxslt >= 1.0.15  cairo  sigc++-2.0 >= $min_sigc_version  $ink_spell_pkg  gthread-2.0 >= 2.0 libpng >= 1.2)
 
+PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
+if test "x$cairo_pdf" = "xyes"; then
+  AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
+fi
+
 dnl Shouldn't we test for libpng and libz?
 INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz"
 
index affa3bcd01e62abf09e85eacc202afe3e28ddcb6..756fff96476176b47152d6026bef25b6b5ed0f46 100644 (file)
@@ -26,7 +26,9 @@
 #include "internal/svgz.h"
 #include "internal/ps.h"
 #include "internal/pdf.h"
-#include "internal/pdf-cairo.h"
+#ifdef HAVE_CAIRO_PDF
+# include "internal/pdf-cairo.h"
+#endif
 #ifdef WITH_GNOME_PRINT
 # include "internal/gnome.h"
 #endif
@@ -35,7 +37,9 @@
 #endif
 #include "internal/ps-out.h"
 #include "internal/pdf-out.h"
-#include "internal/cairo-pdf-out.h"
+#ifdef HAVE_CAIRO_PDF
+# include "internal/cairo-pdf-out.h"
+#endif
 #include "internal/pov-out.h"
 #include "internal/odf.h"
 #include "internal/latex-pstricks-out.h"
@@ -110,8 +114,10 @@ init()
     Internal::PrintPS::init();
     Internal::PdfOutput::init();
     Internal::PrintPDF::init();
+#ifdef HAVE_CAIRO_PDF
     Internal::CairoPdfOutput::init();
     Internal::PrintCairoPDF::init();
+#endif
 #ifdef WITH_GNOME_PRINT
     Internal::PrintGNOME::init();
 #endif
index c73faaef60d7372717a53cb6a1b54cc9ffa597e8..9ee1ae32ff1fb98a659fe918839c76cbc332fbc7 100644 (file)
@@ -14,6 +14,9 @@
 #ifdef HAVE_CONFIG_H\r
 # include <config.h>\r
 #endif\r
+\r
+#ifdef HAVE_CAIRO_PDF\r
+\r
 #include "cairo-pdf-out.h"\r
 #include <print.h>\r
 #include "extension/system.h"\r
@@ -143,3 +146,5 @@ CairoPdfOutput::init (void)
 }\r
 \r
 } } }  /* namespace Inkscape, Extension, Implementation */\r
+\r
+#endif /* HAVE_CAIRO_PDF */\r
index 394c0749a8736779e4a1fa19ec1a9643a1393fa9..f0e67f165d4ca0a8c9ddd7524b53a8f5520e05f7 100644 (file)
@@ -16,6 +16,8 @@
 \r
 #include "extension/implementation/implementation.h"\r
 \r
+#ifdef HAVE_CAIRO_PDF\r
+\r
 namespace Inkscape {\r
 namespace Extension {\r
 namespace Internal {\r
@@ -32,6 +34,8 @@ public:
 \r
 } } }  /* namespace Inkscape, Extension, Implementation */\r
 \r
+#endif /* HAVE_CAIRO_PDF */\r
+\r
 #endif /* !EXTENSION_INTERNAL_CAIRO_PDF_OUT_H */\r
 \r
 /*\r
index 52ca35e330ac47639929f68c2c69afc59f84126a..b58023afebc6f7dac501f4dabd0314255d4f5534 100644 (file)
@@ -18,6 +18,8 @@
 # include "config.h"
 #endif
 
+#ifdef HAVE_CAIRO_PDF
+
 #ifndef PANGO_ENABLE_BACKEND
 #define PANGO_ENABLE_BACKEND
 #endif
@@ -1030,6 +1032,8 @@ PrintCairoPDF::init(void)
 
 /* End of GNU GPL code */
 
+#endif /* HAVE_CAIRO_PDF */
+
 
 /*
   Local Variables:
index d8c4eb67663c99dda799e2e72462366555428c02..f18a15d86da37482b3b9bf7b5e097ec67b408aa7 100644 (file)
@@ -17,6 +17,8 @@
 # include "config.h"
 #endif
 
+#ifdef HAVE_CAIRO_PDF
+
 #include "extension/extension.h"
 #include "extension/implementation/implementation.h"
 #include <set>
@@ -93,6 +95,7 @@ public:
 }  /* namespace Extension */
 }  /* namespace Inkscape */
 
+#endif /* HAVE_CAIRO_PDF */
 
 #endif /* !EXTENSION_INTERNAL_PDF_CAIRO_H_SEEN */