summaryrefslogtreecommitdiff
path: root/macros/mm-doc.m4
diff options
context:
space:
mode:
authorDaniel Elstner <danielk@openismus.com>2009-08-19 19:51:57 +0200
committerDaniel Elstner <danielk@openismus.com>2009-08-19 19:58:48 +0200
commit925e01e76e147b61df9f2e26d1707a3f88d15114 (patch)
tree70414ecf6e032d036334929e40ab5f7af87ea28d /macros/mm-doc.m4
parent697e26bb87296c972710eccdad37138cb8f7ac8c (diff)
downloadmm-common-925e01e76e147b61df9f2e26d1707a3f88d15114.tar.gz
Disable documentation if utilities are missing
* macros/mm-doc.m4 (_MM_ARG_ENABLE_DOCUMENTATION): If one of the required utilities for the documentation build is missing, display a warning message and disable the documentation build, but otherwise continue execution. However, do abort with an error if the configure option --enable-documentation was used explicitly.
Diffstat (limited to 'macros/mm-doc.m4')
-rw-r--r--macros/mm-doc.m424
1 files changed, 15 insertions, 9 deletions
diff --git a/macros/mm-doc.m4 b/macros/mm-doc.m4
index 7e2818d..2b6df21 100644
--- a/macros/mm-doc.m4
+++ b/macros/mm-doc.m4
@@ -95,23 +95,29 @@ AC_ARG_ENABLE([documentation],
[AS_HELP_STRING([--disable-documentation],
[do not build or install the documentation])],
[ENABLE_DOCUMENTATION=$enableval],
- [ENABLE_DOCUMENTATION=yes])
+ [ENABLE_DOCUMENTATION=auto])
AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
[
+ mm_msg=
AS_IF([test "x$PERL" = xperl],
- [AC_MSG_FAILURE([[Perl is required for installing the documentation.]])])
-
- AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
+ [mm_msg='Perl is required for installing the documentation.'],
+ [test "x$USE_MAINTAINER_MODE" != xno],
[
for mm_prog in "$DOT" "$DOXYGEN" "$XSLTPROC"
do
- AS_CASE([$mm_prog], [[dot|doxygen|xsltproc]],
- [AC_MSG_FAILURE([[The documentation will be built in this configuration,
-but the required tool $mm_prog could not be found.]])])
+ AS_CASE([$mm_prog], [[dot|doxygen|xsltproc]], [dnl
+mm_msg='The reference documentation cannot be generated
+because the required tool '$mm_prog' could not be found.'
+break])
done
- ])[]dnl
+ ])
+ AS_IF([test "x$mm_msg" = x],
+ [ENABLE_DOCUMENTATION=yes],
+ [test "x$ENABLE_DOCUMENTATION" = xyes],
+ [AC_MSG_FAILURE([[$mm_msg]])],
+ [AC_MSG_WARN([[$mm_msg]])])[]dnl
])
-AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "x$ENABLE_DOCUMENTATION" != xno])
+AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "x$ENABLE_DOCUMENTATION" = xyes])
AC_SUBST([DOXYGEN_TAGFILES], [[]])
AC_SUBST([DOCINSTALL_FLAGS], [[]])[]dnl
])