olddir=`pwd`
cd "$srcdir"
-GTKDOCIZE=`which gtkdocize`
+GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
- echo "*** No GTK-Doc found, please install it ***"
- exit 1
+ echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
+ rm -f gtk-doc.make
+ echo 'EXTRA_DIST =' > gtk-doc.make
+else
+ gtkdocize || exit $?
fi
AUTORECONF=`which autoreconf`
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
-gtkdocize || exit $?
autoreconf --force --install --verbose || exit $?
cd "$olddir"
dnl **************************
dnl *** Checks for gtk-doc ***
dnl **************************
-
+# 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.15], [--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC],[false])
+])
AC_ARG_ENABLE(man,
[AC_HELP_STRING([--enable-man],
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
+if ENABLE_GTK_DOC
SUBDIRS = reference
+endif
EXTRA_DIST += debugging.txt macros.txt