build: Make gtk-doc optional

This is similar to what's done in glib.
This commit is contained in:
Jeremy Cline 2015-06-29 13:20:57 -04:00 committed by Colin Walters
parent 530631376e
commit f0a02fbf20
2 changed files with 10 additions and 3 deletions

View File

@ -16,8 +16,8 @@ set -e
mkdir -p m4 mkdir -p m4
GTKDOCIZE=$(which gtkdocize 2>/dev/null) GTKDOCIZE=$(which gtkdocize 2>/dev/null || true)
if test -z $GTKDOCIZE; then if test -z "$GTKDOCIZE"; then
echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation." echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
rm -f gtk-doc.make rm -f gtk-doc.make
cat > gtk-doc.make <<EOF cat > gtk-doc.make <<EOF
@ -25,7 +25,7 @@ EXTRA_DIST =
CLEANFILES = CLEANFILES =
EOF EOF
else else
gtkdocize || exit $? gtkdocize
fi fi
cd $olddir cd $olddir

View File

@ -112,7 +112,14 @@ OSTREE_FEATURES="$OSTREE_FEATURES +gpgme"
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0" LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
],[
enable_gtk_doc=no
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_ARG_WITH(libarchive, AC_ARG_WITH(libarchive,