diff options
author | Simon McVittie <smcv@collabora.com> | 2018-05-03 10:22:32 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-05-03 13:14:52 +0100 |
commit | b15465fde6dfa4d088d694ec9542ad99d7210d5e (patch) | |
tree | 4450c6b15bfc242a6280bedb2b2be01306275bb6 | |
parent | 174570d94e3000a91aac1ea1276292e5e154c36a (diff) |
build: Enable Sphinx documentation if dependencies are available
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 4a3d512..a802075 100644 --- a/configure.ac +++ b/configure.ac @@ -103,18 +103,20 @@ AC_ARG_ENABLE([documentation], [AC_HELP_STRING([--enable-documentation], [Enable documentation building (requires sphinx and sphinx_rtd_theme)])], [:], - [enable_documentation=no]) + [enable_documentation=auto]) AX_PYTHON_MODULE([sphinx]) AS_IF([test "x$HAVE_PYMOD_SPHINX" = xno], [ - AS_IF([test "$enable_documentation" != no], - [AC_MSG_ERROR([cannot build documentation without sphinx Python module])]) + AS_IF([test "$enable_documentation" = yes], + [AC_MSG_ERROR([cannot build documentation without sphinx Python module])], + [enable_documentation=no]) ]) AX_PYTHON_MODULE([sphinx_rtd_theme]) AS_IF([test "x$HAVE_PYMOD_SPHINX_RTD_THEME" = xno], [ - AS_IF([test "$enable_documentation" != no], - [AC_MSG_ERROR([cannot build documentation without sphinx_rtd_theme Python module])]) + AS_IF([test "$enable_documentation" = yes], + [AC_MSG_ERROR([cannot build documentation without sphinx_rtd_theme Python module])], + [enable_documentation=no]) ]) AC_ARG_VAR([DBUS_RUN_SESSION], |