summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2012-10-31 12:15:26 +0900
committerDaiki Ueno <ueno@unixuser.org>2012-12-30 14:16:07 +0900
commit89b918dfbb11f8ccc3162eb84097c39baccac9cc (patch)
tree2e4ff4d48291bab92568b1d3876ab5daf956da0f /configure.ac
parent73e45d3d4e848168b2c78dc8953167f222dfc768 (diff)
downloadcaribou-89b918dfbb11f8ccc3162eb84097c39baccac9cc.tar.gz
Add documentation support
Add Valadoc documentation support in the build system. The template is borrowed from Folks. https://bugzilla.gnome.org/show_bug.cgi?id=687244
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 33727fe..bc0fb83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,7 @@ PYGOBJECT_REQUIRED=2.90.3
GTK_REQUIRED=3.0.0
CLUTTER_REQUIRED=1.5.11
GDK_REQUIRED=3.0.0
+VALADOC_REQUIRED=0.3.1
PKG_CHECK_MODULES(CARIBOU, [
pygobject-3.0 >= $PYGOBJECT_REQUIRED,
@@ -104,6 +105,25 @@ IT_PROG_INTLTOOL([0.35.0])
dnl == GObject introspection ==
GOBJECT_INTROSPECTION_REQUIRE([0.10.7])
+dnl == Documentation ==
+AC_ARG_ENABLE([docs],
+ AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
+ [enable_docs=$enableval], [enable_docs=no])
+AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
+
+have_valadoc=no
+AS_IF([test x$enable_docs = xyes], [
+ # make sure the library is new enough and the program exists
+ PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
+ AC_PATH_PROG([VALADOC], [valadoc], [:])
+ AS_IF([test "$VALADOC" != :], have_valadoc=yes)
+])
+AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
+
+AS_IF([test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"], [
+ AC_MSG_ERROR([Doc building requested but valadoc not installed.])
+])
+
dnl == generate makefiles ==
AC_OUTPUT([
Makefile
@@ -128,4 +148,5 @@ modules/Makefile
modules/gtk3/Makefile
modules/gtk2/Makefile
tools/Makefile
+docs/Makefile
])