From 6aaf6f4620b1781a347516cf376ff5e4e0bb0b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Tue, 6 Mar 2018 09:40:11 +0100 Subject: [PATCH] Don't require xsltproc when not building man pages --- configure.ac | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index c47826d..234edc8 100644 --- a/configure.ac +++ b/configure.ac @@ -53,24 +53,20 @@ fi # # enable creation of man pages # -AC_ARG_ENABLE(man,[AC_HELP_STRING([--enable-man], - [generate man pages [default=auto]])],enable_man=yes,enable_man=no) -AS_IF([test "$enable_man" != no], [ - AC_PATH_PROG([XSLTPROC], [xsltproc]) - AS_IF([test -z "$XSLTPROC"], [ - AS_IF([test "$enable_man" = yes], [ - AC_MSG_ERROR([xsltproc is required for --enable-man]) - ]) - enable_man=no +enable_man=no +AC_ARG_ENABLE([man], + [AC_HELP_STRING([--enable-man], [generate man pages [default=auto]])], + [ + if test "$enableval" = yes; then + enable_man=yes + AC_PATH_PROG([XSLTPROC], [xsltproc]) + AS_IF([test -z "$XSLTPROC"], [ + AC_MSG_ERROR([xsltproc is required for --enable-man]) + enable_man="no (xsltproc not found)" + ]) + fi ]) -]) -AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno) -AC_MSG_CHECKING([whether to generate man pages]) -AS_IF([ test "$enable_man" != no ], [ - AC_MSG_RESULT([yes]) -], [ - AC_MSG_RESULT([no]) -]) +AM_CONDITIONAL(ENABLE_MAN, test x$enable_man = xyes) # src/psl-make-dafsa needs python 2.7+ AM_PATH_PYTHON([2.7]) @@ -343,5 +339,7 @@ AC_MSG_NOTICE([Summary of build options: PSL File: ${PSL_FILE} PSL Test File: ${PSL_TESTFILE} Sanitizers: UBSan $ubsan, ASan $asan, CFI $cfi + Docs: $enable_gtk_doc + Man pages: $enable_man Tests: ${TESTS_INFO} ])