From 8a27b1d1164c6c63467d79c497330fefd7c6de6e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 1 Aug 2007 19:27:30 +0100 Subject: [PATCH] Check for epydoc version >= 3, and default to building API docs if available --- configure.ac | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 48929ea..d30b86b 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,7 @@ AC_MSG_RESULT([$enable_html_docs]) AC_MSG_CHECKING([whether you want to build API docs]) AC_ARG_ENABLE(api-docs, -AC_HELP_STRING([--enable-api-docs], [Enable API documentation building (requires epydoc 3 and docutils)]), enable_api_docs=$enableval, enable_api_docs=no) +AC_HELP_STRING([--enable-api-docs], [Enable API documentation building (requires epydoc 3 and docutils)]), enable_api_docs=$enableval, enable_api_docs="if possible") AC_MSG_RESULT([$enable_api_docs]) @@ -81,13 +81,26 @@ fi if test "${enable_api_docs}" != no; then AC_PATH_PROG([EPYDOC], [epydoc]) + AC_MSG_CHECKING([epydoc 3]) + if test -n "$EPYDOC"; then + EPYDOC_VERSION=`$EPYDOC --version` + case "$EPYDOC_VERSION" in + *ersion?3*) + AC_MSG_RESULT([yes, $EPYDOC_VERSION]) + ;; + *) + AC_MSG_RESULT([no, $EPYDOC_VERSION]) + EPYDOC= + ;; + esac + fi if test -z "$EPYDOC"; then case "$enable_api_docs" in if*possible) enable_api_docs=no ;; *) - AC_MSG_ERROR([cannot compile API documentation without epydoc installed]) + AC_MSG_ERROR([cannot compile API documentation without epydoc 3.0beta1 or newer installed]) ;; esac fi -- 2.11.4.GIT