do not try to build docs by default, unless './configure --enable-docs' is specified

This commit is contained in:
Jeff Ahrenholz 2018-10-09 15:51:54 -07:00
parent f37e788a9e
commit 1c3385b50c

View file

@ -49,6 +49,11 @@ AC_ARG_ENABLE([daemon],
(default is yes)])],
[], [enable_daemon=yes])
AC_SUBST(enable_daemon)
AC_ARG_ENABLE([docs],
[AS_HELP_STRING([--enable-docs[=ARG]],
[build documentation (default is no)])],
[], [enable_docs=no])
AC_SUBST(enable_docs)
SEARCHPATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin"
@ -148,6 +153,9 @@ if test "x$enable_daemon" = "xyes"; then
AC_MSG_ERROR([Python bindings require libev (try installing your 'libev-devel' or 'libev-dev' package)])))
fi
want_docs=no
if test "x$enable_docs" = "xyes" ; then
AC_CHECK_PROG(help2man, help2man, yes, no, $SEARCHPATH)
if test "x$help2man" = "xno" ; then
@ -158,16 +166,17 @@ fi
if test "x$want_docs_missing" = "x" ; then
want_docs=yes
else
AC_MSG_WARN([Could not find required helper utilities (${want_docs_missing}) so the CORE documentation will not be built.])
AC_MSG_ERROR([Could not find required helper utilities (${want_docs_missing}) so the CORE documentation will not be built.])
want_docs=no
fi
# check for sphinx required during make
AC_CHECK_PROG(sphinxapi_path, sphinx-apidoc, $as_dir, no, $SEARCHPATH)
if test "x$sphinxapi_path" = "xno" ; then
AC_MSG_WARN(["Could not location sphinx-apidoc, from the python-sphinx package"])
AC_MSG_ERROR(["Could not location sphinx-apidoc, from the python-sphinx package"])
want_docs=no
fi
fi
#AC_PATH_PROGS(tcl_path, [tclsh tclsh8.5 tclsh8.4], no)
#if test "x$tcl_path" = "xno" ; then