configure.ac : disable doc by default and check for asciidoc

This is a complaint that has been reported many many times. By default, docs
are enabled and there is no check for asciidoc, so anyone building from git
will see their build fail.

We cannot do a strict check for asciidoc because released source tarballs
have man pages already built, and it should be possible to install them
without having asciidoc.

This patch attempts to improve the situation in two ways :
1) disable doc by default
2) print a warning if docs are enabled but asciidoc is not installed

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2010-03-15 23:46:44 +01:00 committed by Dan McGee
parent d32f6daa66
commit d44e509933
1 changed files with 11 additions and 5 deletions

View File

@ -100,8 +100,8 @@ AC_ARG_ENABLE(internal-download,
# Help line for documentation # Help line for documentation
AC_ARG_ENABLE(doc, AC_ARG_ENABLE(doc,
AS_HELP_STRING([--disable-doc], [prevent make from looking at doc/ dir]), AS_HELP_STRING([--enable-doc], [run make in doc/ dir]),
[wantdoc=$enableval], [wantdoc=yes]) [wantdoc=$enableval], [wantdoc=no])
# Help line for doxygen # Help line for doxygen
AC_ARG_ENABLE(doxygen, AC_ARG_ENABLE(doxygen,
@ -261,12 +261,18 @@ AC_SUBST(CARCHFLAGS)
AC_SUBST(CHOST) AC_SUBST(CHOST)
# Check for documentation support and status # Check for documentation support and status
AC_CHECK_PROGS([ASCIIDOC], [asciidoc])
AC_MSG_CHECKING([for building documentation]) AC_MSG_CHECKING([for building documentation])
if test "x$wantdoc" = "xyes" ; then if test "x$wantdoc" = "xyes" ; then
AC_MSG_RESULT([yes]) if test $ASCIIDOC ; then
AC_MSG_RESULT([yes, enabled by configure])
else
asciidoc="(warning : asciidoc not installed)"
AC_MSG_RESULT([yes $asciidoc])
fi
wantdoc=yes wantdoc=yes
else else
AC_MSG_RESULT([no, disabled by configure]) AC_MSG_RESULT([no])
wantdoc=no wantdoc=no
fi fi
AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes") AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes")
@ -389,7 +395,7 @@ ${PACKAGE_NAME}:
build script name : ${BUILDSCRIPT} build script name : ${BUILDSCRIPT}
Compilation options: Compilation options:
Run make in doc/ dir : ${wantdoc} Run make in doc/ dir : ${wantdoc} ${asciidoc}
Use download library : ${internaldownload} Use download library : ${internaldownload}
Doxygen support : ${usedoxygen} Doxygen support : ${usedoxygen}
debug support : ${debug} debug support : ${debug}