From afd0483e3662281d6b11319cd6118a46c48a223e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 2 Mar 2022 16:35:29 +0000 Subject: [PATCH] Add --enable-docs option Allow to explicitly disable building documentation. Some platforms are too old (RHEL 7) and even if Python is available due to build macros, building documentation fails. Allow to disable it explicitly. Signed-off-by: Luca Boccassi --- configure.ac | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5b233f3c..8d6d343f 100644 --- a/configure.ac +++ b/configure.ac @@ -1229,10 +1229,17 @@ AC_CHECK_HEADER([endian.h], [AC_DEFINE([ENDIAN_HDR], [])])])]) build_www=yes -AC_PATH_PROGS(PYTHON, [python3 python2 python], [], $PATH:/bin:/usr/bin) -if test -z "${ac_cv_path_PYTHON}"; then - AC_MSG_NOTICE([Python not found; not building HTML pages]) - build_www=no +AC_ARG_ENABLE([docs], + [AS_HELP_STRING([--enable-docs], + [enable militant API assertions])], + [build_www=$enableval], + []) +if test "${build_www}" = "yes"; then + AC_PATH_PROGS(PYTHON, [python3 python2 python], [], $PATH:/bin:/usr/bin) + if test -z "${ac_cv_path_PYTHON}"; then + AC_MSG_NOTICE([Python not found; not building HTML pages]) + build_www=no + fi fi if test "${build_www}" = "yes"; then AC_MSG_CHECKING([if groff can create UTF-8 XHTML]) -- 2.49.0