[ostree] build: Make gtk-doc optional



commit f0a02fbf20ebf4b1f2e248fee24a0babb2b22c03
Author: Jeremy Cline <jeremy jcline org>
Date:   Mon Jun 29 13:20:57 2015 -0400

    build: Make gtk-doc optional
    
    This is similar to what's done in glib.

 autogen.sh   |    6 +++---
 configure.ac |    7 +++++++
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index a2bba13..0eb6555 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,8 +16,8 @@ set -e
 
 mkdir -p m4
 
-GTKDOCIZE=$(which gtkdocize 2>/dev/null)
-if test -z $GTKDOCIZE; then
+GTKDOCIZE=$(which gtkdocize 2>/dev/null || true)
+if test -z "$GTKDOCIZE"; then
         echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
         rm -f gtk-doc.make
         cat > gtk-doc.make <<EOF
@@ -25,7 +25,7 @@ EXTRA_DIST =
 CLEANFILES =
 EOF
 else
-        gtkdocize || exit $?
+        gtkdocize
 fi
 
 cd $olddir
diff --git a/configure.ac b/configure.ac
index 6760b33..8484987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,7 +112,14 @@ OSTREE_FEATURES="$OSTREE_FEATURES +gpgme"
 
 LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
 
+# check for gtk-doc
+m4_ifdef([GTK_DOC_CHECK], [
 GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
+],[
+enable_gtk_doc=no
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
+
 AC_PATH_PROG([XSLTPROC], [xsltproc])
 
 AC_ARG_WITH(libarchive,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]