+AC_MSG_CHECKING([whether to use libgnomeprint])
+AC_ARG_ENABLE(gnomeprint,
+ [ --disable-gnomeprint disable libgnomeprint support],
+ [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=auto])
+
+if test x$ac_cv_have_gtk210 = xyes; then
+ ac_cv_enable_gnomeprint="no"
+fi
+
+if test x$ac_cv_enable_gnomeprint = xyes \
+ -o \( x$ac_cv_enable_gnomeprint = xauto \
+ -a x$ac_cv_have_gtk210 = xno \); then
+ AC_MSG_RESULT(yes)
+ PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
+ ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
+ if test x"$ac_cv_enable_gnomeprint" = xyes; then
+ AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
+ else
+ AC_MSG_RESULT(not found)
+ AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
+ AC_MSG_WARN([*** using built-in printing support ***])
+ fi
+else
+ ac_cv_enable_gnomeprint=no
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
+