]> www.fi.muni.cz Git - evince.git/blobdiff - configure.ac
[build] Only fail on missing GConf when requested explicitly
[evince.git] / configure.ac
index 0c9e38a51090caeffd4173ba80e72a3463020c29..41dd94a89d6729bacc370df84f266d9ce9dae50c 100644 (file)
@@ -196,15 +196,24 @@ dnl ========= Check for GConf
 AC_MSG_CHECKING([whether GConf support is requested])
 AC_ARG_WITH([gconf],
   [AS_HELP_STRING([--without-gconf],[disable the use of gconf])],
-  [],[with_gconf=yes])
+  [],[with_gconf=check])
 AC_MSG_RESULT([$with_gconf])
 
-AM_CONDITIONAL([WITH_GCONF],[test "$with_gconf" = "yes"])
-
-if test "$with_gconf" = "yes"; then
-   PKG_CHECK_MODULES([GCONF],[gconf-2.0])
-   AC_DEFINE([WITH_GCONF],[1],[Define if GConf support is enabled])
+if test "x$with_gconf" != "xno"; then
+       PKG_CHECK_MODULES([GCONF],[gconf-2.0],
+               with_gconf=yes,
+               if test "x$with_gconf" = "xcheck"; then
+                       with_gconf=no
+                       AC_MSG_WARN(The use of GConf is disabled since required library gconf-2.0 was not found.)
+               else
+                       AC_MSG_FAILURE(GConf test failed: $GCONF_PKG_ERRORS)
+               fi
+       )
+fi
+if test "x$with_gconf" = "xyes"; then
+       AC_DEFINE([WITH_GCONF],[1],[Define if GConf support is enabled])
 fi
+AM_CONDITIONAL([WITH_GCONF],[test "$with_gconf" = "yes"])
 
 AM_GCONF_SOURCE_2
 
@@ -511,7 +520,15 @@ dnl ================== comic book checks =======================================
 AC_ARG_ENABLE(comics,
        [AC_HELP_STRING([--enable-comics], [Compile with support for comic book archives])],enable_comics="$enableval",enable_comics=yes)
 if test "x$enable_comics" = "xyes"; then
-       AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
+       if test "x$os_win32" = "xyes"; then
+               # The comics backend is disabled on windows because:
+               # 1) it uses unix functions from sys/wait.h.
+               # 2) it uses external decompression tools not generally available on windows.
+               enable_comics=no
+               AC_MSG_WARN(The comics backend is not supported on windows.)
+       else
+               AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
+       fi
 fi 
 AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes)