]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Add --enable-docs option
authorLuca Boccassi <bluca@debian.org>
Wed, 2 Mar 2022 16:35:29 +0000 (16:35 +0000)
committerLuca Boccassi <bluca@debian.org>
Wed, 2 Mar 2022 16:56:44 +0000 (16:56 +0000)
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 <bluca@debian.org>
configure.ac

index 5b233f3c45c2f20c86e74ba617f0dad4cff5c318..8d6d343ff082681e068a658f62dd96eb2d2a88de 100644 (file)
@@ -1229,10 +1229,17 @@ AC_CHECK_HEADER([endian.h],
             [AC_DEFINE([ENDIAN_HDR], [<sys/isa_defs.h>])])])])
 
 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])