diff options
author | Tomáš Chvátal <scarabeus@gentoo.org> | 2010-07-04 09:23:26 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2010-07-04 09:45:56 -0500 |
commit | dab7a79faf67ad5f33d15cc90b7fa34f61cf4c90 (patch) | |
tree | 7bf03a5c6d72e8d503e5318a50396989b8a1d494 | |
parent | 87883a1cc89618b5a985a9c78f8234fc1570c54c (diff) |
Do not automagically rely on xmlto, include a configure option instead.
Thanks, Tomáš!
-rw-r--r-- | configure.ac | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index a5a991b..25f0361 100644 --- a/configure.ac +++ b/configure.ac @@ -8,28 +8,28 @@ AC_PROG_CC AC_PROG_LN_S dnl --------------------------------------------------------------------------- -dnl - Extra verbose warning switches -dnl --------------------------------------------------------------------------- -CPPFLAGS="$CPPFLAGS -Wall -Werror" - -dnl --------------------------------------------------------------------------- -dnl - Debugging switches -dnl --------------------------------------------------------------------------- -CPPFLAGS="$CPPFLAGS -g" - -dnl --------------------------------------------------------------------------- dnl - Manual page build dnl --------------------------------------------------------------------------- -AC_PATH_PROG(XMLTO, xmlto, no) -AM_CONDITIONAL(HAVE_XMLTO, [test "x$XMLTO" != xno]) - -dnl --------------------------------------------------------------------------- -dnl - Make paths available for source files -dnl --------------------------------------------------------------------------- -AC_SUBST(SYSCONFDIR, $sysconfdir) -AC_SUBST(DATADIR, $datadir) -AC_SUBST(BINDIR, $bindir) -AC_SUBST(SBINDIR, $sbindir) +AC_ARG_ENABLE([doc], + AC_HELP_STRING([--disable-docs], + [Disable manpage generating via xmlto [[default=auto]]]), + [MAN="$enableval"], + [MAN=auto]) + AC_PATH_PROG(XMLTO, xmlto, no) + AS_IF([test "x$MAN" = "xyes"], + [ + AS_IF([test "x$XMLTO" = "xno"], + [AC_MSG_ERROR([Manpage generating requested but xmlto not found.]) + ]) + ], + [test "x${MAN}" != "xno"], + [ + AS_IF([test "x$XMLTO" != "xno"], + [MAN="yes"], + [MAN="no"]) + ]) +AM_CONDITIONAL(HAVE_XMLTO, [test "x$MAN" != xno]) +AC_MSG_RESULT([checking whether to build manpages... $MAN]) dnl --------------------------------------------------------------------------- dnl - Makefiles, etc. |