Bug 576298 – Fails to link pango-view if --without-x is specified but cairo has X11...
authorSebastian Dröge <slomo@circular-chaos.org>
Mon, 23 Mar 2009 23:16:58 +0000 (19:16 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 23 Mar 2009 23:16:58 +0000 (19:16 -0400)
pango-view/pango-view.c
pango-view/viewer-cairo.c

index 55a62ed..fec00be 100644 (file)
@@ -7,7 +7,7 @@ extern const PangoViewer pangoft2_viewer;
 extern const PangoViewer pangox_viewer;
 
 const PangoViewer *viewers[] = {
-#ifdef HAVE_CAIRO_XLIB
+#ifdef HAVE_CAIRO
   &pangocairo_viewer,
 #endif
 #ifdef HAVE_XFT
index 72aae5d..ae8e01d 100644 (file)
@@ -30,6 +30,7 @@
 
 
 #ifdef HAVE_CAIRO_XLIB
+#ifdef HAVE_X
 #include "viewer-x.h"
 #include <cairo-xlib.h>
 
@@ -72,6 +73,7 @@ static CairoViewerIface cairo_x_viewer_iface = {
   cairo_x_view_iface_create_surface,
   cairo_x_view_iface_paint_background
 };
+#endif /* HAVE_X */
 #endif /* HAVE_CAIRO_XLIB */
 
 
@@ -348,11 +350,13 @@ cairo_viewer_iface_create (const CairoViewerIface **iface)
     return ret;
 
 #ifdef HAVE_CAIRO_XLIB
+#ifdef HAVE_X
   if (opt_display)
     {
       *iface = &cairo_x_viewer_iface;
       return (*iface)->backend_class->create ((*iface)->backend_class);
     }
+#endif /* HAVE_X */
 #endif /* HAVE_CAIRO_XLIB */
 
   *iface = &cairo_image_viewer_iface;