+AC_ARG_ENABLE(sphinx, AS_HELP_STRING([--enable-sphinx],
+ [use sphinx to build documentation for python-systemd]))
+AS_IF([test "x$enable_sphinx" = "xyes"], [
+ AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
+ AS_IF([test -z "$SPHINX_BUILD"], [
+ AC_MSG_ERROR([*** sphinx build requested, but sphinx-build not found])
+ ])
+ AS_IF([test "x$have_python_devel" != "xyes"], [
+ AC_MSG_ERROR([*** sphinx build requested, but python support not enabled])
+ ])
+])
+AM_CONDITIONAL(ENABLE_SPHINX, [test "x$enable_sphinx" = "xyes"])
+