Soften the valadoc requirement, even with --enable-docs.
authorTravis Reitter <travis.reitter@collabora.co.uk>
Tue, 9 Nov 2010 23:38:16 +0000 (15:38 -0800)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Wed, 10 Nov 2010 17:27:52 +0000 (09:27 -0800)
This is mainly so tarball-based builds don't break if valadoc isn't availble
(but it will be used if it is).

Helps bgo#633718.

Makefile.am
configure.ac

index b7aec36..786b4f1 100644 (file)
@@ -8,7 +8,7 @@ SUBDIRS = \
        po \
        $(NULL)
 
-if ENABLE_DOCS
+if HAVE_VALADOC
 SUBDIRS += docs
 endif
 
index 4fdfd3a..d1e2b94 100644 (file)
@@ -154,8 +154,9 @@ AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
 
 AS_IF([test "x$enable_docs" != xno],
       [AC_PATH_PROG([VALADOC], [valadoc], [:])
-       AS_IF([test "$VALADOC" = :],
-             [AC_MSG_ERROR([valadoc not found])])])
+       AS_IF([test "$VALADOC" != :],
+             have_valadoc=yes)])
+AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
 
 # -----------------------------------------------------------
 # Gettext
@@ -262,7 +263,7 @@ Configure summary:
         Compiler Flags..............:  ${CFLAGS} ${ERROR_CFLAGS}
         Prefix......................:  ${prefix}
         Bugreporting URL............:  ${PACKAGE_BUGREPORT}
-        Documentation...............:  ${enable_docs}
+        Documentation...............:  ${HAVE_VALADOC}
         Tests.......................:  ${have_tp_glib_for_tests}
         Import tool.................:  ${with_import_tool}