diff options
author | Martin Liska <mliska@suse.cz> | 2022-07-27 15:40:48 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-11-09 09:00:36 +0100 |
commit | 1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0 (patch) | |
tree | 019685ef4fc6e3a8615d4a67ccaf7fa41937df98 /gcc/configure.ac | |
parent | c0eb1a3b7c944dd7cd5a4056a817a25aa8ce2569 (diff) | |
download | gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.zip gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.tar.gz gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.tar.bz2 |
sphinx: add --with-sphinx-build
gcc/ChangeLog:
* Makefile.in: Support --with-sphinx-build.
* configure.ac:
* configure: Regenerate.
gcc/ada/ChangeLog:
* gcc-interface/Make-lang.in: Support --with-sphinx-build.
gcc/d/ChangeLog:
* Make-lang.in: Support --with-sphinx-build.
gcc/fortran/ChangeLog:
* Make-lang.in: Support --with-sphinx-build.
gcc/go/ChangeLog:
* Make-lang.in: Support --with-sphinx-build.
gcc/jit/ChangeLog:
* Make-lang.in: Support --with-sphinx-build.
libgomp/ChangeLog:
* Makefile.in: Support --with-sphinx-build.
* configure.ac: Likewise..
* configure: Regenerate.
libiberty/ChangeLog:
* Makefile.in: Support --with-sphinx-build.
* configure.ac: Likewise.
* configure: Regenerate.
libitm/ChangeLog:
* Makefile.in: Support --with-sphinx-build.
* configure.ac: Likewise.
* configure: Regenerate.
libquadmath/ChangeLog:
* Makefile.in: Support --with-sphinx-build.
* configure.ac: Likewise.
* configure: Regenerate.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index f1de29e..f87fab9 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1253,11 +1253,30 @@ else fi AC_SUBST(GENERATED_MANPAGES) +AC_ARG_WITH(sphinx-build, + [AS_HELP_STRING([--with-sphinx-build=], + [Use sphinx-build from a given path])], + [CONFIGURE_SPHINX_BUILD=$withval], + [CONFIGURE_SPHINX_BUILD=] +) +AC_SUBST(CONFIGURE_SPHINX_BUILD) + # See if sphinx-build has been installed and is modern enough # that we can use it. AC_MSG_CHECKING([for sphinx-build]) -if sphinx-build -j auto -h &>/dev/null ; then - SPHINX_BUILD=sphinx-build +sphinx=sphinx-build +if test x${CONFIGURE_SPHINX_BUILD} != x ; then + sphinx=${CONFIGURE_SPHINX_BUILD} +fi + +tempdir=build.$$ +source=source.$$ +mkdir $source +grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py +touch $source/index.rst +if ${sphinx} $source $tempdir >/dev/null 2>&1; then + SPHINX_BUILD=${sphinx} + HAS_SPHINX_BUILD=has-sphinx-build AC_MSG_RESULT(yes) else AC_MSG_WARN([ @@ -1265,8 +1284,12 @@ else *** Info and man pages documentation will not be built.]) AC_MSG_RESULT(no) SPHINX_BUILD= + HAS_SPHINX_BUILD= fi +rm -rf $tempdir +rm -rf $source AC_SUBST(SPHINX_BUILD) +AC_SUBST(HAS_SPHINX_BUILD) MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing" |