diff --git a/configure.ac b/configure.ac index 4b504008e28cd..b21ad4482d58a 100644 --- a/configure.ac +++ b/configure.ac @@ -21,8 +21,16 @@ if test -d ".git" ; then fi AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE']) -AC_CHECK_PROGS(SPHINX_BUILD, sphinx-1.0-build sphinx-build, no) -AM_CONDITIONAL(HAS_SPHINX_BUILD, test x"$SPHINX_BUILD" != "xno") +AC_ARG_WITH([man-pages], + [AS_HELP_STRING([--with-man-pages], [build man pages])], + [], + [with_man_pages=check]) +AS_IF([test "x$with_man_pages" != "xno"], + [AC_CHECK_PROGS(SPHINX_BUILD, sphinx-1.0-build sphinx-build) + AS_IF([test -z "$SPHINX_BUILD" && \ + test "x$with_man_pages" = "xyes"], + [AC_MSG_ERROR([sphinx-build not found (python-sphinx)])])]) +AM_CONDITIONAL(WITH_MAN_PAGES, test -n "$SPHINX_BUILD") AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/.gitignore b/doc/.gitignore index 0c7c74746ae94..aca7518a3ee0a 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1,3 @@ /overview.png /object_store.png +/Makefile diff --git a/man/Makefile.am b/man/Makefile.am index 2298866efe6be..7d1159edff0c3 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -4,7 +4,7 @@ EXTRA_DIST = conf.py dist_man_MANS = -if HAS_SPHINX_BUILD +if WITH_MAN_PAGES if ENABLE_CLIENT include Makefile-client.am endif