]> www.fi.muni.cz Git - evince.git/blobdiff - configure.ac
Update for release 2.22.1.1
[evince.git] / configure.ac
index f8b64d389bc4b221932f456211dc19c9f5669ecd..6afc872c9c4da114486d2763e4af2ad0149d0e35 100644 (file)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT([Evince],[2.21.90],[http://bugzilla.gnome.org/enter_bug.cgi?product=evince],[evince])
+AC_INIT([Evince],[2.22.1.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=evince],[evince])
 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
 
 EV_API_VERSION=2.20
@@ -47,25 +47,28 @@ dnl Check dependencies
 
 DBUS_GLIB_REQUIRED=0.70
 GTK_REQUIRED=2.10.0
-GLIB_REQUIRED=2.15.4
+GLIB_REQUIRED=2.15.6
 KEYRING_REQUIRED=0.4.0
 
 LIBGNOMEUI_REQUIRED=2.14.0
 LIBGNOME_REQUIRED=2.14.0
-LIBGNOMEPRINTUI_REQUIRED=2.6.0
 GNOME_ICON_THEME_REQUIRED=2.17.1
 LIBXML_REQUIRED=2.5.0
 
-GTK_PRINT_REQUIRED=2.10.0
-
 PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
 PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED)
-PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 gio-2.0 >= $GLIB_REQUIRED)
-PKG_CHECK_MODULES(SHELL_CORE, libxml-2.0 >= $LIBXML_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED libglade-2.0 gconf-2.0)
+PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(SHELL_CORE, libxml-2.0 >= $LIBXML_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gthread-2.0 libglade-2.0 gconf-2.0)
 
 BACKEND_LIBTOOL_FLAGS="-module -avoid-version"
 AC_SUBST(BACKEND_LIBTOOL_FLAGS)
 
+dnl ===== Check special functions
+evince_save_LIBS=$LIBS
+LIBS="$LIBS $BACKEND_LIBS"
+AC_CHECK_FUNCS(cairo_format_stride_for_width)
+LIBS=$evince_save_LIBS
+
 AC_ARG_WITH(keyring,
         AC_HELP_STRING([--without-keyring],[disable the use of gnome-keyring]),
        [case "${withval}" in
@@ -100,75 +103,32 @@ fi
 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`  
 AC_SUBST(GLIB_GENMARSHAL)
 
-dnl ========= Print support
-AC_ARG_WITH(print,
-           [AC_HELP_STRING([--with-print=no/gtk/gnome/auto], [Compile with print support [default=auto]])],
-           PRINT=$withval,
-            PRINT="auto")
-
-PKG_CHECK_MODULES(GNOME_PRINT, 
-                 libgnomeprintui-2.2 >= $LIBGNOMEPRINTUI_REQUIRED,
-                 enable_gnome_print=yes, enable_gnome_print=no)
-PKG_CHECK_MODULES(GTK_PRINT,
-                 gtk+-unix-print-2.0 >= $GTK_PRINT_REQUIRED,
-                 enable_gtk_print=yes, enable_gtk_print=no)
-enable_print=no
-if test x$PRINT = xgnome -a x$enable_gnome_print = xyes; then
-   enable_print=gnome
-else
-   if test x$PRINT = xgtk -a x$enable_gtk_print = xyes; then
-      enable_print=gtk
-   else
-      if test x$PRINT = xauto; then
-        if test x$enable_gtk_print = xyes; then
-           enable_print=gtk
-        else
-           if test x$enable_gnome_print = xyes; then
-              enable_print=gnome
-           fi
-        fi
-      fi
-   fi
-fi
-
-if test x$enable_print = xgnome; then
-   AC_SUBST(GNOME_PRINT_CFLAGS)
-   AC_SUBST(GNOME_PRINT_LIBS)
-   AC_DEFINE([WITH_GNOME_PRINT],[1],[Enable GNOME Print Support.])
-   AC_DEFINE([WITH_PRINT],[1],[Enable Print Support.])
-fi
-
-if test x$enable_print = xgtk; then   
-   AC_SUBST(GTK_PRINT_CFLAGS)
-   AC_SUBST(GTK_PRINT_LIBS)
-   AC_DEFINE([WITH_GTK_PRINT],[1],[Enable GTK Print Support.])
-   AC_DEFINE([WITH_PRINT],[1],[Enable Print Support.])
-fi
-   
-AM_CONDITIONAL(WITH_GNOME_PRINT, test x$enable_print = xgnome)
-AM_CONDITIONAL(WITH_GTK_PRINT, test x$enable_print = xgtk)
-
-
 dnl ========= Check for DBUS
-PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
+AC_ARG_ENABLE(dbus,
+       [AC_HELP_STRING([--enable-dbus], [Compile with support for dbus])],
+       enable_dbus="$enableval",enable_dbus=yes)
+if test "x$enable_dbus" != "xno"; then
+       PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
        [enable_dbus=yes],[enable_dbus=no])
-AC_SUBST([DBUS_CFLAGS])
-AC_SUBST([DBUS_LIBS])
 
-if test "x$enable_dbus" = "xno"; then
-       AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
-fi
+       if test "x$enable_dbus" = "xno"; then
+          AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
+       fi         
 
-if test "x$enable_dbus" = "xyes" ; then
-        AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
+       if test "x$enable_dbus" = "xyes" ; then
+               AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
 
-        if test x$DBUS_BINDING_TOOL = "xno" ; then
-               AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
-        fi                                            
+               if test x$DBUS_BINDING_TOOL = "xno" ; then
+                       AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
+               fi                                            
 
-        AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
+               AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
+       fi
 fi
 
+AC_SUBST([DBUS_CFLAGS])
+AC_SUBST([DBUS_LIBS])
+
 LIB_CFLAGS="$LIB_CFLAGS $GNOME_CFLAGS"
 LIB_LIBS="$LIB_LIBS $GNOME_LIBS"
 AC_SUBST(LIB_CFLAGS)
@@ -264,13 +224,23 @@ if test "x$enable_pdf" = "xyes"; then
            AC_CHECK_FUNCS(poppler_page_get_image)
            LIBS=$evince_save_LIBS
 
+           poppler_version=`$PKG_CONFIG --modversion poppler-glib`
+           if test x$poppler_version = x0.6; then
+                   poppler_version=0.6.0
+           fi
+           POPPLER_MAJOR_VERSION=`echo $poppler_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2 /'`
+           POPPLER_MINOR_VERSION=`echo $poppler_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3 /'`
+
+           AC_DEFINE_UNQUOTED([POPPLER_MAJOR_VERSION], $POPPLER_MAJOR_VERSION, [Poppler major version number])
+           AC_DEFINE_UNQUOTED([POPPLER_MINOR_VERSION], $POPPLER_MINOR_VERSION, [Poppler minor version number])
+
            PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
-           if test x$enable_cairo_pdf == xyes; then
+           if test x$enable_cairo_pdf = xyes; then
                    AC_DEFINE([HAVE_CAIRO_PDF], [1], [defined if cairo-pdf is available])
             fi
 
            PKG_CHECK_MODULES(CAIRO_PS, cairo-ps, enable_cairo_ps=yes, enable_cairo_ps=no)
-           if test x$enable_cairo_ps == xyes; then
+           if test x$enable_cairo_ps = xyes; then
                    AC_DEFINE([HAVE_CAIRO_PS], [1], [defined if cairo-ps is available])
             fi
     else
@@ -448,7 +418,7 @@ if test "x$enable_ps" = "xyes" ; then
        EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;"
 fi
 if test "x$enable_dvi" = "xyes"; then
-       EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-dvi;"
+       EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-dvi;application/x-bzdvi;application/x-gzdvi;"
 fi
 if test "x$enable_djvu" = "xyes"; then
        EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/vnd.djvu;"
@@ -519,7 +489,6 @@ AC_OUTPUT
 echo "
 Configure summary:
        GNOME Support......:  $WITH_GNOME
-       Print Support......:  $enable_print
        Keyring Support....:  $WITH_KEYRING
        DBUS Support.......:  $enable_dbus
        Nautilus Plugin....:  $HAVE_NAUTILUS