+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):
# Backends
+if ENABLE_PDF
SUBDIRS += pdf
+endif
if ENABLE_PS
SUBDIRS += ps
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 += \
};
const EvDocumentType document_types[] = {
+#ifdef ENABLE_PDF
/* PDF: */
{"application/pdf", EV_BACKEND_PDF, pdf_document_get_type},
+#endif
#ifdef ENABLE_PS
/* Postscript: */
}
#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"));
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) {
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
#include <gtk/gtkprintunixdialog.h>
#endif
+#ifdef ENABLE_PDF
#include <poppler.h>
+#endif
#include <glib/gstdio.h>
#include <glib/gi18n.h>
static char *
build_comments_string (void)
{
+#ifdef ENABLE_PDF
PopplerBackend backend;
const char *backend_name;
const char *version;
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