diff --git a/autogen.sh b/autogen.sh index 6605e82b..0db8cce5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -73,8 +73,15 @@ fi echo "* Running libtoolize" libtoolize --copy --force -echo "* Running gtkdocize" -gtkdocize --flavour no-tmpl || exit $? +GTKDOCIZE=`which gtkdocize` +if test -z $GTKDOCIZE; then + echo "You don't have gtk-doc installed, and thus" + echo "won't be able to generate the documentation." + touch gtk-doc.make +else + echo "* Running gtkdocize" + $GTKDOCIZE --flavour no-tmpl || exit $? +fi echo "* Running $ACLOCAL" $ACLOCAL $ACLOCAL_FLAGS -I m4 || exit $? diff --git a/configure.ac b/configure.ac index 04dbe3ae..c4e49bed 100644 --- a/configure.ac +++ b/configure.ac @@ -681,7 +681,14 @@ AC_SUBST(LASSO_WSF_SUPPORT) dnl API Reference documentation support +# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have +# it on it's own line. +m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK(1.9) +],[ +AM_CONDITIONAL([ENABLE_GTK_DOC],[false]) +]) + if test "z$with_html_dir" != "z" ; then LASSO_DOCDIR=$with_html_dir else diff --git a/docs/Makefile.am b/docs/Makefile.am index 4235c7ed..49c40034 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,4 +1,10 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = lasso-book reference +SUBDIRS = lasso-book + +if ENABLE_GTK_DOC +SUBDIRS += reference +else +DIST_SUBDIRS = reference +endif diff --git a/docs/reference/lasso/Makefile.am b/docs/reference/lasso/Makefile.am index ac8c5118..4713c3c7 100644 --- a/docs/reference/lasso/Makefile.am +++ b/docs/reference/lasso/Makefile.am @@ -90,6 +90,8 @@ GTKDOC_LIBS= \ $(top_builddir)/lasso/liblasso.la \ $(LASSO_LIBS) +EXTRA_DIST = + # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make