-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
+ )