]> www.fi.muni.cz Git - evince.git/commitdiff
Included option in configure to make ps backend compilation optional with
authorEduardo Lima <eduardo.lima@indt.org.br>
Wed, 21 Dec 2005 21:29:39 +0000 (21:29 +0000)
committerEduardo de Barros Lima <eblima@src.gnome.org>
Wed, 21 Dec 2005 21:29:39 +0000 (21:29 +0000)
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.

ChangeLog
Makefile.am
backend/Makefile.am
backend/ev-document-factory.c
configure.ac
shell/ev-document-types.c

index 324d59867200187463a6987fc0441237b59bb2d6..92caf14befb4f1af05880d148783aaa7bb15845f 100644 (file)
--- 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:
index 5acc74fdfa89707116283307ed4329ba354a9b13..de5ad3e78595345947e0e146eeb730fa438d4423 100644 (file)
@@ -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    
index 75509e69610031c335bd2dcaea710c809e858495..97f99105062b19f65066acb2166857df212191ee 100644 (file)
@@ -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 +=                      \
index 1cf301414c4e7780060c3f13d2ab4a4061c13099..a695c452f6c8b171f116292e962fe9c119acef38 100644 (file)
@@ -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: */
index 3fe05b03e44e8984895d6b6b91c98cae42bea8d5..b66c188182c8cd732cd2c07a5064668cd61b7a6e 100644 (file)
@@ -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
index 27fb2fe2274b4b0ad59555ebe7d4023d7ee403f7..d6634f3c84d8e4fd0996e804ec254d2461a429ce 100644 (file)
@@ -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 ();