]> www.fi.muni.cz Git - evince.git/blobdiff - configure.ac
[comics] Fixes memory leaks and error messages
[evince.git] / configure.ac
index e66b125137cda24dd8ed97a04054b56c83cc5142..a3b2fe3a9600ad21f95905d1bc56de36c9cd99c9 100644 (file)
@@ -3,8 +3,8 @@
 # *****************************************************************************
 
 m4_define([ev_major_version],[2])
-m4_define([ev_minor_version],[25])
-m4_define([ev_micro_version],[90])
+m4_define([ev_minor_version],[26])
+m4_define([ev_micro_version],[0])
 m4_define([ev_extra_version],[])
 m4_define([ev_version],[ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version])
 
@@ -86,6 +86,18 @@ esac
 AC_MSG_RESULT([$platform_win32])
 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
 
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+  *-*-mingw*)
+    os_win32=yes
+    ;;
+  *)
+    os_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+
 dnl Check dependencies
 
 # LIB_CFLAGS       for helpers and generic widgets. (libdocument, cut-and-paste)
@@ -96,7 +108,7 @@ dnl Check dependencies
 # SHELL_LIBS
 
 DBUS_GLIB_REQUIRED=0.70
-GTK_REQUIRED=2.12.0
+GTK_REQUIRED=2.14.0
 GLIB_REQUIRED=2.18.0
 KEYRING_REQUIRED=2.22.0
 AC_SUBST([GLIB_REQUIRED])
@@ -109,13 +121,19 @@ PKG_CHECK_MODULES(LIBDOCUMENT, gtk+-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIR
 PKG_CHECK_MODULES(LIBVIEW, gtk+-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
 PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED)
 PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(PREVIEWER, gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED 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)
 
-PKG_CHECK_MODULES(SMCLIENT, gtk+-2.0 gthread-2.0)
+if test "$os_win32" = no; then
+       PKG_CHECK_MODULES(SMCLIENT, gtk+-2.0 gthread-2.0 sm >= 1.0.0)
+else
+       PKG_CHECK_MODULES(SMCLIENT, gtk+-2.0 gthread-2.0)
+fi
+
 AC_SUBST(SMCLIENT_CFLAGS)
 AC_SUBST(SMCLIENT_LIBS)
 
-BACKEND_LIBTOOL_FLAGS="-module -avoid-version -export-symbols \$(top_srcdir)/backend/backend.symbols"
+BACKEND_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -export-symbols \$(top_srcdir)/backend/backend.symbols"
 AC_SUBST(BACKEND_LIBTOOL_FLAGS)
 
 dnl ===== Check special functions
@@ -259,6 +277,28 @@ AC_ARG_ENABLE(thumbnailer,
        [ENABLE_THUMBNAILER=yes]) dnl Default value
 AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$ENABLE_THUMBNAILER = "xyes")
 
+dnl Check for previewer build
+AC_ARG_ENABLE(previewer,
+       AC_HELP_STRING([--disable-previewer],[disable the GNOME Document Previewer]),
+       [case "${enableval}" in
+       yes) ENABLE_PREVIEWER=yes ;;
+       no) ENABLE_PREVIEWER=no ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-previewer) ;;
+       esac],
+       [ENABLE_PREVIEWER=yes]) dnl Default value
+if test x$ENABLE_PREVIEWER = "xyes" ; then
+   PKG_CHECK_MODULES(PREVIEWER, gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED,
+                    [ENABLE_PREVIEWER=yes],[ENABLE_PREVIEWER=no])
+   if test x$ENABLE_PREVIEWER = "xno" ; then
+      AC_MSG_WARN([Previewer support is disabled since gtk+-unix-print $GTK_REQUIRED or higher was not found])
+   fi
+fi
+AM_CONDITIONAL(ENABLE_PREVIEWER, test x$ENABLE_PREVIEWER = "xyes")
+PREVIEWER_CFLAGS="$PREVIEWER_CFLAGS $DEBUG_FLAGS"
+PREVIEWER_LIBS="$PREVIEWER_LIBS -lz"
+AC_SUBST(PREVIEWER_CFLAGS)
+AC_SUBST(PREVIEWER_LIBS)
+
 dnl GConf configuration
 AM_GCONF_SOURCE_2
 
@@ -267,6 +307,41 @@ if test "x$GCONFTOOL" = "xno"; then
        AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
 fi
 
+# ***
+# GIR
+# ***
+
+AC_MSG_CHECKING([whether GObject introspection is requested])
+AC_ARG_ENABLE([introspection],
+        AS_HELP_STRING([--enable-introspection],[Enable GObject introspection]),
+        [],[enable_introspection=no])
+AC_MSG_RESULT([$enable_introspection])
+
+G_IR_SCANNER=
+G_IR_COMPILER=
+G_IR_GENERATE=
+GIRDIR=
+GIRTYPELIBDIR=
+
+if test "$enable_introspection" = "yes"; then
+  GOBJECT_INTROSPECTION_REQUIRED=0.6
+  PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
+
+  G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
+  G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
+  G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
+  GIRDIR="$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)"
+  GIRTYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+fi
+
+AC_SUBST([G_IR_SCANNER])
+AC_SUBST([G_IR_COMPILER])
+AC_SUBST([G_IR_GENERATE])
+AC_SUBST([GIRDIR])
+AC_SUBST([GIRTYPELIBDIR])
+
+AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
+
 dnl ================== portability checks ===========================================
 
 dnl for backtrace()
@@ -515,7 +590,6 @@ backend/pixbuf/Makefile
 backend/ps/Makefile
 backend/tiff/Makefile
 cut-n-paste/Makefile
-cut-n-paste/evmountoperation/Makefile
 cut-n-paste/gedit-message-area/Makefile
 cut-n-paste/gimpcellrenderertoggle/Makefile
 cut-n-paste/smclient/Makefile
@@ -551,9 +625,11 @@ help/reference/shell/Makefile
 help/reference/shell/version.xml
 libdocument/Makefile
 libdocument/ev-version.h
+libmisc/Makefile
 libview/Makefile
 Makefile
 po/Makefile.in
+previewer/Makefile
 properties/Makefile
 shell/Makefile
 test/Makefile
@@ -572,8 +648,10 @@ Configure summary:
        DBUS Support.......:  $enable_dbus
        Nautilus Plugin....:  $HAVE_NAUTILUS
        Thumbnailer........:  $ENABLE_THUMBNAILER
+       Previewer..........:  $ENABLE_PREVIEWER
        Gtk-Doc Support....:  $enable_gtk_doc
        Debug mode.........:  $enable_debug
+       GObj. Introspection:  $enable_introspection
 
        PDF Backend........:  $enable_pdf
        PostScript Backend.:  $enable_ps