+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:
# Backends
-SUBDIRS += pdf ps
+SUBDIRS += pdf
+
+if ENABLE_PS
+SUBDIRS += ps
+endif
if ENABLE_PIXBUF
SUBDIRS += pixbuf
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 += \
#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
/* 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: */
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.])
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 ===================================================
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
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"));
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 ();