summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 47 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 13203bbf..fc297187 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,14 +53,14 @@ AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AM_PROG_LIBTOOL
+
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_STDC_HEADERS
-
+AM_PROG_LIBTOOL
AC_PROG_SED
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
@@ -688,6 +688,44 @@ AM_CONDITIONAL(ENABLE_XPS, test x$enable_xps = xyes)
dnl ================== End of XPS checks ===================================================
+
+dnl ================== EPUB checks ===================================================
+
+AC_ARG_ENABLE(epub,
+ [AS_HELP_STRING([--enable-epub],
+ [Compile with support for epub documents.])],
+ [enable_epub=$enableval],
+ [enable_epub=yes])
+
+if test "x$enable_epub" = "xyes"; then
+ WEBKIT_REQUIRED=2.4.2
+ case "$with_gtk" in
+ 2.0)
+ PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= $WEBKIT_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no)
+ ;;
+ 3.0)
+ PKG_CHECK_MODULES(WEBKIT, webkit2gtk-3.0 >= $WEBKIT_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no)
+ ;;
+ esac
+ if test "x$enable_epub" = "xyes"; then
+ AC_DEFINE([ENABLE_EPUB], [1], [Enable support for ePub documents.])
+ else
+ enable_epub="no"
+ AC_MSG_WARN(["ePub support is disabled since webkit-1.0( version >= $WEBKIT_REQUIRED ) is needed"])
+ case "$with_gtk" in
+ 2.0)
+ AC_MSG_WARN(["ePub support is disabled since webkit-1.0( version >= $WEBKIT_REQUIRED ) is needed"])
+ ;;
+ 3.0)AC_MSG_WARN(["ePub support is disabled since webkit2gtk-3.0( version >= $WEBKIT_REQUIRED ) is needed"])
+ ;;
+ esac
+ fi
+fi
+
+AM_CONDITIONAL(ENABLE_EPUB, test x$enable_epub = xyes)
+
+dnl ================== End of EPUB checks ===================================================
+
dnl =================== Mime types list ====================================================
if test "x$enable_pdf" = "xyes" ; then
@@ -714,6 +752,10 @@ fi
if test "x$enable_xps" = "xyes"; then
ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/oxps;application/vnd.ms-xpsdocument;"
fi
+if test "x$enable_epub" = "xyes"; then
+ ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/epub+zip"
+fi
+
AC_SUBST(ATRIL_MIME_TYPES)
AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your system]))
@@ -766,6 +808,8 @@ backend/comics/Makefile
backend/djvu/Makefile
backend/dvi/Makefile
backend/dvi/mdvi-lib/Makefile
+backend/epub/Makefile
+backend/epub/minizip/Makefile
backend/pdf/Makefile
backend/pixbuf/Makefile
backend/ps/Makefile
@@ -854,4 +898,5 @@ Configure summary:
Pixbuf Backend.....: $enable_pixbuf
Comics Backend.....: $enable_comics
XPS Backend........: $enable_xps
+ ePub Backend.......: $enable_epub
"