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.am6
-rw-r--r--backend/Makefile.am6
-rw-r--r--backend/ev-document-factory.c4
-rw-r--r--configure.ac15
-rw-r--r--shell/ev-document-types.c2
6 files changed, 40 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 324d598..92caf14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-12-21 Eduardo Lima <eduardo.lima@indt.org.br>
+ * Makefile.am:
+ * configure.ac:
+ * backend/Makefile.am:
+ * backend/ev-document-factory.c:
+ * shell/ev-document-types.c:
+
+ Included option in configure to make ps backend
+ compilation optional with --disable-ps.
+
2005-12-20 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* backend/ev-document-factory.c:
diff --git a/Makefile.am b/Makefile.am
index 5acc74f..de5ad3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,11 @@ SUBDIRS = cut-n-paste po help data
# Backends
-SUBDIRS += pdf ps
+SUBDIRS += pdf
+
+if ENABLE_PS
+SUBDIRS += ps
+endif
if ENABLE_PIXBUF
SUBDIRS += pixbuf
diff --git a/backend/Makefile.am b/backend/Makefile.am
index 75509e6..97f9910 100644
--- a/backend/Makefile.am
+++ b/backend/Makefile.am
@@ -45,8 +45,12 @@ libevbackend_la_SOURCES= \
ev-document-misc.c
libevbackend_la_LIBADD = \
- $(top_builddir)/pdf/libpdfdocument.la \
+ $(top_builddir)/pdf/libpdfdocument.la
+
+if ENABLE_PS
+libevbackend_la_LIBADD += \
$(top_builddir)/ps/libpsdocument.la
+endif
if ENABLE_PIXBUF
libevbackend_la_LIBADD += \
diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c
index 1cf3014..a695c45 100644
--- a/backend/ev-document-factory.c
+++ b/backend/ev-document-factory.c
@@ -28,7 +28,9 @@
#include "ev-poppler.h"
#include "pixbuf-document.h"
#include "tiff-document.h"
+#ifdef ENABLE_PS
#include "ps-document.h"
+#endif
#ifdef ENABLE_DVI
#include "dvi-document.h"
#endif
@@ -53,10 +55,12 @@ const EvDocumentType document_types[] = {
/* PDF: */
{"application/pdf", EV_BACKEND_PDF, pdf_document_get_type},
+#ifdef ENABLE_PS
/* Postscript: */
{"application/postscript", EV_BACKEND_PS, ps_document_get_type},
{"application/x-gzpostscript", EV_BACKEND_PS, ps_document_get_type},
{"image/x-eps", EV_BACKEND_PS, ps_document_get_type},
+#endif
#ifdef ENABLE_TIFF
/* Tiff: */
diff --git a/configure.ac b/configure.ac
index 3fe05b0..b66c188 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,15 @@ dnl for backtrace()
AC_CHECK_HEADERS([execinfo.h])
dnl ================== ggv checks ===================================================
+AC_ARG_ENABLE(ps,
+ [AC_HELP_STRING([--disable-ps], [Compile without PostScript backend])],enable_ps=$enableval,enable_ps="yes")
+
+if test x$enable_ps = xyes; then
+ AC_DEFINE([ENABLE_PS], [1], [Enable support for PostScript files.])
+fi
+
+AM_CONDITIONAL(ENABLE_PS, test x$enable_ps = xyes)
+if test x$enable_ps = xyes; then
AC_ARG_WITH(gs-pkg,
[ --with-gs=dir Directory Where GhostScript package is installed.])
@@ -162,6 +171,7 @@ fi
AA_PARMS="-sDEVICE=x11alpha -dNOPLATFONTS"
AC_DEFINE_UNQUOTED(ALPHA_PARAMS, "$AA_PARMS", [Anti-aliasing parameters for Ghostscript.])
AC_MSG_RESULT(Antialiasing parameters for Ghostscript: $AA_PARMS)
+fi
dnl ======================== End of ggv checks =================================
dnl ================== tiff checks ===================================================
@@ -279,8 +289,11 @@ dnl ================== End of comic book checks ================================
dnl =================== Mime types list ====================================================
-EVINCE_MIME_TYPES="application/pdf;application/postscript;application/x-gzpostscript"
+EVINCE_MIME_TYPES="application/pdf"
+if test "x$disable_ps" = "xno" ; then
+ EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/postscript;application/x-gzpostscript"
+fi
if test "x$enable_dvi" = "xyes"; then
EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/x-dvi"
fi
diff --git a/shell/ev-document-types.c b/shell/ev-document-types.c
index 27fb2fe..d6634f3 100644
--- a/shell/ev-document-types.c
+++ b/shell/ev-document-types.c
@@ -136,6 +136,7 @@ ev_document_types_add_filters (GtkWidget *chooser, EvDocument *document)
gtk_file_filter_add_pixbuf_formats (filter);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
+#ifdef ENABLE_PS
if (document == NULL || backend == EV_BACKEND_PS) {
default_filter = filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("PostScript Documents"));
@@ -143,6 +144,7 @@ ev_document_types_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
if (document == NULL || backend == EV_BACKEND_PDF) {
default_filter = filter = gtk_file_filter_new ();