-SUBDIRS = src protocol doc tests cursor
+if BUILD_DOCS
+doc_subdir = doc
+endif
+
+SUBDIRS = src protocol $(doc_subdir) tests cursor
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AC_ARG_ENABLE([scanner],
[AC_HELP_STRING([--disable-scanner],
- [Disable compilation of wayland-scannner])],
+ [Disable compilation of wayland-scanner])],
[],
[enable_scanner=yes])
AC_PATH_PROG(XSLTPROC, xsltproc)
AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
+AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
if test "x$enable_documentation" = "xyes"; then
+ AC_PATH_PROG(DOXYGEN, doxygen)
+
+ if test "x$DOXYGEN" = "x"; then
+ AC_MSG_ERROR([Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation])
+ fi
+
AC_PATH_PROG(PUBLICAN, publican)
AC_CONFIG_FILES([