Actually check for the valadoc version when building docs.
authorTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 1 Aug 2011 21:16:24 +0000 (14:16 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 1 Aug 2011 21:16:24 +0000 (14:16 -0700)
configure.ac

index 7f8c1d9..4214908 100644 (file)
@@ -348,9 +348,12 @@ AC_ARG_ENABLE([docs],
 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
 
 have_valadoc=no
-AS_IF([test "x$enable_docs" != xno],
-      [AC_PATH_PROG([VALADOC], [valadoc], [:])
-       AS_IF([test "$VALADOC" != :], have_valadoc=yes)])
+if test x$enable_docs = xyes; then
+  # make sure the library is new enough and the program exists
+  PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
+  AC_PATH_PROG([VALADOC], [valadoc], [:])
+  AS_IF([test "$VALADOC" != :], have_valadoc=yes)
+fi
 AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
 
 if test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"; then