diff options
author | Yevgen Muntyan <muntyan@tamu.edu> | 2006-11-30 20:58:58 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-11-30 20:58:58 (GMT) |
commit | 2dc20d298ea8064cf09bc5acc201a9df4e4cd4f0 (patch) | |
tree | 9308fb0aca3465335c0399cbdf4c1f45bd39e19b | |
parent | b62cd9e5c51ac21bde4a328c52f463913d84a1dc (diff) |
Make pdf compilation optional. See bug #38007.
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.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | backend/Makefile.am | 6 | ||||
-rw-r--r-- | backend/ev-document-factory.c | 4 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | shell/ev-window.c | 6 |
6 files changed, 28 insertions, 1 deletions
@@ -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 |