]> err.no Git - systemd/commitdiff
build-sys: make gtk-doc dependency optional
authorJavier Jardón <jjardon@gnome.org>
Tue, 17 Apr 2012 14:17:27 +0000 (15:17 +0100)
committerKay Sievers <kay@vrfy.org>
Tue, 17 Apr 2012 15:01:21 +0000 (17:01 +0200)
Makefile.am
autogen.sh
configure.ac

index 13c4ed1699b6fee05fa7bf133d9467a7d66c9ecf..e8172bc51460ae18a0b1c9c8c3ce394975278579 100644 (file)
@@ -1276,8 +1276,10 @@ EXTRA_DIST += \
        src/libsystemd-daemon/libsystemd-daemon.sym
 
 # ------------------------------------------------------------------------------
+if ENABLE_GTK_DOC
 SUBDIRS += \
        docs/libudev
+endif
 
 include_HEADERS += \
        src/libudev/libudev.h
@@ -1625,8 +1627,10 @@ dist_udevrules_DATA += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_GUDEV
+if ENABLE_GTK_DOC
 SUBDIRS += \
        docs/gudev
+endif
 
 libgudev_includedir = \
        $(includedir)/gudev-1.0/gudev
index 0e1b5bedf68d5e173bd28935a954c740f98406e1..869632abb09886ffda98827e0ca89a94c66e9827 100755 (executable)
@@ -21,7 +21,17 @@ if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
     echo "Activated pre-commit hook."
 fi
 
-gtkdocize
+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."
+    NOGTKDOC=1
+    echo 'EXTRA_DIST =' > gtk-doc.make
+fi
+
+if test -z "$NOGTKDOC"; then
+    gtkdocize || exit $?
+fi
 intltoolize --force --automake
 autoreconf --force --install --symlink
 
index 2e766a6a5d7cdb575c2ac98da2134126226efe81..5a4fc84588a265d7c6e309f229a002e34c6244fe 100644 (file)
@@ -61,7 +61,16 @@ AM_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 
 AC_PATH_PROG([M4], [m4])
-GTK_DOC_CHECK(1.10)
+
+# 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.18])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC],[false])
+])
+
+
 GOBJECT_INTROSPECTION_CHECK([1.31.1])
 
 AC_CHECK_TOOL(OBJCOPY, objcopy)