Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Makefile.am2
-rw-r--r--backend/Makefile.am6
-rw-r--r--backend/ev-document-factory.c4
-rw-r--r--configure.ac1
-rw-r--r--shell/ev-window.c6
6 files changed, 28 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fdfb9e1..d0a8f3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-11-30 Yevgen Muntyan <muntyan@tamu.edu>
+
+ * Makefile.am:
+ * backend/Makefile.am:
+ * backend/ev-document-factory.c: (ev_document_factory_add_filters):
+ * configure.ac:
+ * shell/ev-window.c: (build_comments_string):
+
+ Make pdf compilation optional. See bug #38007.
+
2006-11-30 Carlos Garcia Campos <carlosgc@gnome.org>
* ps/ps.c: (get_next_text):
diff --git a/Makefile.am b/Makefile.am
index 5c04b74..c216292 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,9 @@ SUBDIRS = cut-n-paste po help data
# Backends
+if ENABLE_PDF
SUBDIRS += pdf
+endif
if ENABLE_PS
SUBDIRS += ps
diff --git a/backend/Makefile.am b/backend/Makefile.am
index f7ae5ec..bcf975a 100644
--- a/backend/Makefile.am
+++ b/backend/Makefile.am
@@ -52,8 +52,12 @@ libevbackend_la_SOURCES= \
ev-document-misc.h \
ev-document-misc.c
-libevbackend_la_LIBADD = \
+libevbackend_la_LIBADD =
+
+if ENABLE_PDF
+libevbackend_la_LIBADD += \
$(top_builddir)/pdf/libpdfdocument.la
+endif
if ENABLE_PS
libevbackend_la_LIBADD += \
diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c
index f524e1a..78be656 100644
--- a/backend/ev-document-factory.c
+++ b/backend/ev-document-factory.c
@@ -65,8 +65,10 @@ struct _EvDocumentType
};
const EvDocumentType document_types[] = {
+#ifdef ENABLE_PDF
/* PDF: */
{"application/pdf", EV_BACKEND_PDF, pdf_document_get_type},
+#endif
#ifdef ENABLE_PS
/* Postscript: */
@@ -390,6 +392,7 @@ ev_document_factory_add_filters (GtkWidget *chooser, EvDocument *document)
}
#endif
+#ifdef ENABLE_PDF
if (document == NULL || backend == EV_BACKEND_PDF) {
default_filter = filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("PDF Documents"));
@@ -397,6 +400,7 @@ ev_document_factory_add_filters (GtkWidget *chooser, EvDocument *document)
file_filter_add_mime_list_and_free (filter, mime_types);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
}
+#endif
#ifdef ENABLE_PIXBUF
if (document == NULL || backend == EV_BACKEND_PIXBUF) {
diff --git a/configure.ac b/configure.ac
index ed19edc..a299f09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,7 @@ if test "x$enable_pdf" = "xyes"; then
AC_DEFINE([ENABLE_PDF], [1], [Enable pdf support.])
FRONTEND_LIBS="$FRONTEND_LIBS $POPPLER_LIBS"
SHELL_LIBS="$SHELL_LIBS $POPPLER_LIBS"
+ SHELL_CFLAGS="$SHELL_CFLAGS $POPPLER_CFLAGS"
else
AC_MSG_WARN("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
fi
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 7442654..98d888f 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -80,7 +80,9 @@
#include <gtk/gtkprintunixdialog.h>
#endif
+#ifdef ENABLE_PDF
#include <poppler.h>
+#endif
#include <glib/gstdio.h>
#include <glib/gi18n.h>
@@ -3088,6 +3090,7 @@ ev_window_dual_mode_changed_cb (EvView *view, GParamSpec *pspec, EvWindow *ev_wi
static char *
build_comments_string (void)
{
+#ifdef ENABLE_PDF
PopplerBackend backend;
const char *backend_name;
const char *version;
@@ -3109,6 +3112,9 @@ build_comments_string (void)
return g_strdup_printf (_("PostScript and PDF File Viewer.\n"
"Using poppler %s (%s)"),
version, backend_name);
+#else
+ return g_strdup_printf (_("Document Viewer."));
+#endif
}
static void