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 /libgomp/configure.ac | |
parent | c0eb1a3b7c944dd7cd5a4056a817a25aa8ce2569 (diff) | |
download | gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.tar.gz |
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 'libgomp/configure.ac')
-rw-r--r-- | libgomp/configure.ac | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libgomp/configure.ac b/libgomp/configure.ac index a9b1f3973f7..1aeac2d3cca 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -469,6 +469,44 @@ AC_SUBST(OMP_NEST_LOCK_25_KIND) AC_SUBST(OMP_DEPEND_KIND) CFLAGS="$save_CFLAGS" +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]) +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([ + *** sphinx-build is missing or too old. + *** 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) + # Determine what GCC version number to use in filesystem paths. GCC_BASE_VER |