+# *****************
+# Help files
+# *****************
+
+GNOME_DOC_INIT([], gnome_doc_utils=yes, gnome_doc_utils=no)
+
+AC_ARG_ENABLE(help,
+ [AS_HELP_STRING([--disable-help], [Disable offline help files])],
+ [enable_help=$enableval],
+ [enable_help=yes])
+
+if test "x$enable_help" = "xyes" && test "x$os_win32" = "xyes" ; then
+ AC_MSG_WARN([Offline help is disabled (not implemented on Windows).])
+ enable_help=no
+fi
+
+if test "x$enable_help" = "xyes" && test "x$gnome_doc_utils" == "xno"; then
+ AC_MSG_ERROR(
+ [gnome-doc-utils not found; use --disable-help to disable help files]
+ )
+fi
+
+if test "x$enable_help" = "xyes"; then
+ AC_DEFINE([OFFLINE_HELP_ENABLED], [1], [Enable offline help])
+fi
+
+AM_CONDITIONAL(ENABLE_HELP, test "x$enable_help" = "xyes")
+
+# *****************
+# API documentation
+# *****************
+
+GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
+
+AC_SUBST([GLIB_PREFIX],[$($PKG_CONFIG --variable=prefix glib-2.0)])
+AC_SUBST([GTK_PREFIX],[$($PKG_CONFIG --variable=prefix gtk+-3.0)])
+
+# ******************