public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/sphinx-v7)] fixup! Add --with-sphinx-build
@ 2022-07-27 19:53 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-07-27 19:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:63df328a4104c3a1c7fa94aea797bd9ec866a9c5

commit 63df328a4104c3a1c7fa94aea797bd9ec866a9c5
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Jul 27 21:47:24 2022 +0200

    fixup! Add --with-sphinx-build

Diff:
---
 libgomp/Makefile.in      |  1 +
 libgomp/configure        | 56 ++++++++++++++++++++++++++++++++++++++++++--
 libgomp/configure.ac     | 38 ++++++++++++++++++++++++++++++
 libitm/Makefile.in       |  1 +
 libitm/configure         | 56 ++++++++++++++++++++++++++++++++++++++++++--
 libitm/configure.ac      | 38 ++++++++++++++++++++++++++++++
 libquadmath/Makefile.in  |  1 +
 libquadmath/configure    | 60 ++++++++++++++++++++++++++++++++++++++++++++----
 libquadmath/configure.ac | 38 ++++++++++++++++++++++++++++++
 9 files changed, 281 insertions(+), 8 deletions(-)

diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index a6202f43848..9d1787d8458 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -400,6 +400,7 @@ SECTION_LDFLAGS = @SECTION_LDFLAGS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SPHINX_BUILD = @SPHINX_BUILD@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XCFLAGS = @XCFLAGS@
diff --git a/libgomp/configure b/libgomp/configure
index b11170e6a7c..19ceb7253b0 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -635,6 +635,9 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 get_gcc_base_ver
+HAS_SPHINX_BUILD
+SPHINX_BUILD
+CONFIGURE_SPHINX_BUILD
 OMP_DEPEND_KIND
 OMP_NEST_LOCK_25_KIND
 OMP_LOCK_25_KIND
@@ -826,6 +829,7 @@ enable_linux_futex
 enable_tls
 enable_symvers
 enable_cet
+with_sphinx_build
 with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
@@ -1494,6 +1498,7 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sphinx-build=    Use sphinx-build from a given path
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
 
@@ -11394,7 +11399,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11397 "configure"
+#line 11402 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11500,7 +11505,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11503 "configure"
+#line 11508 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16832,6 +16837,53 @@ fi
 
 CFLAGS="$save_CFLAGS"
 
+
+# Check whether --with-sphinx-build was given.
+if test "${with_sphinx_build+set}" = set; then :
+  withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
+else
+  CONFIGURE_SPHINX_BUILD=
+
+fi
+
+
+
+# See if sphinx-build has been installed and is modern enough
+# that we can use it.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
+$as_echo_n "checking for sphinx-build... " >&6; }
+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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&5
+$as_echo "$as_me: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SPHINX_BUILD=
+  HAS_SPHINX_BUILD=
+fi
+rm -rf $tempdir
+rm -rf $source
+
+
+
 # Determine what GCC version number to use in filesystem paths.
 
   get_gcc_base_ver="cat"
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
 
diff --git a/libitm/Makefile.in b/libitm/Makefile.in
index c2b03b808e1..38a7e5bf731 100644
--- a/libitm/Makefile.in
+++ b/libitm/Makefile.in
@@ -346,6 +346,7 @@ SECTION_LDFLAGS = @SECTION_LDFLAGS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SPHINX_BUILD = @SPHINX_BUILD@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XCFLAGS = @XCFLAGS@
diff --git a/libitm/configure b/libitm/configure
index 18fc2d3a10a..7e768647474 100755
--- a/libitm/configure
+++ b/libitm/configure
@@ -633,6 +633,9 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 get_gcc_base_ver
+HAS_SPHINX_BUILD
+SPHINX_BUILD
+CONFIGURE_SPHINX_BUILD
 ARCH_FUTEX_FALSE
 ARCH_FUTEX_TRUE
 ARCH_X86_AVX_FALSE
@@ -816,6 +819,7 @@ enable_tls
 enable_symvers
 enable_werror
 enable_cet
+with_sphinx_build
 with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
@@ -1481,6 +1485,7 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sphinx-build=    Use sphinx-build from a given path
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
 
@@ -12058,7 +12063,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12061 "configure"
+#line 12066 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12164,7 +12169,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12167 "configure"
+#line 12172 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18006,6 +18011,53 @@ else
 fi
 
 
+
+# Check whether --with-sphinx-build was given.
+if test "${with_sphinx_build+set}" = set; then :
+  withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
+else
+  CONFIGURE_SPHINX_BUILD=
+
+fi
+
+
+
+# See if sphinx-build has been installed and is modern enough
+# that we can use it.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
+$as_echo_n "checking for sphinx-build... " >&6; }
+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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&5
+$as_echo "$as_me: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SPHINX_BUILD=
+  HAS_SPHINX_BUILD=
+fi
+rm -rf $tempdir
+rm -rf $source
+
+
+
 # Determine what GCC version number to use in filesystem paths.
 
   get_gcc_base_ver="cat"
diff --git a/libitm/configure.ac b/libitm/configure.ac
index 78a682376d9..6930f5abaae 100644
--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -301,6 +301,44 @@ AM_CONDITIONAL([ARCH_X86], [test "$ARCH" = x86])
 AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes])
 AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes])
 
+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
 
diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in
index 9cf8cf7489a..d551f56ce62 100644
--- a/libquadmath/Makefile.in
+++ b/libquadmath/Makefile.in
@@ -346,6 +346,7 @@ REPORT_BUGS_TO = @REPORT_BUGS_TO@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SPHINX_BUILD = @SPHINX_BUILD@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XCFLAGS = @XCFLAGS@
diff --git a/libquadmath/configure b/libquadmath/configure
index b3ee64f9c7d..14f20f69ca9 100755
--- a/libquadmath/configure
+++ b/libquadmath/configure
@@ -633,6 +633,9 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 get_gcc_base_ver
+HAS_SPHINX_BUILD
+SPHINX_BUILD
+CONFIGURE_SPHINX_BUILD
 GENINSRC_FALSE
 GENINSRC_TRUE
 XCFLAGS
@@ -790,6 +793,7 @@ with_toolexeclibdir
 enable_symvers
 enable_cet
 enable_generated_files_in_srcdir
+with_sphinx_build
 with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
@@ -1455,6 +1459,7 @@ Optional Packages:
   --with-toolexeclibdir=DIR
                           install libraries built with a cross compiler within
                           DIR
+  --with-sphinx-build=    Use sphinx-build from a given path
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
 
@@ -4693,7 +4698,7 @@ fi
     REPORT_BUGS_TEXI=
     ;;
   *)
-    REPORT_BUGS_TO="<$BUGURL>"
+    REPORT_BUGS_TO="$BUGURL"
     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
     ;;
   esac;
@@ -10806,7 +10811,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10819 "configure"
+#line 10814 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10912,7 +10917,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10925 "configure"
+#line 10920 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13031,7 +13036,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13243,6 +13248,53 @@ else
 fi
 
 
+
+# Check whether --with-sphinx-build was given.
+if test "${with_sphinx_build+set}" = set; then :
+  withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
+else
+  CONFIGURE_SPHINX_BUILD=
+
+fi
+
+
+
+# See if sphinx-build has been installed and is modern enough
+# that we can use it.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
+$as_echo_n "checking for sphinx-build... " >&6; }
+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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&5
+$as_echo "$as_me: WARNING:
+  *** sphinx-build is missing or too old.
+  *** Info and man pages documentation will not be built." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SPHINX_BUILD=
+  HAS_SPHINX_BUILD=
+fi
+rm -rf $tempdir
+rm -rf $source
+
+
+
 # Determine what GCC version number to use in filesystem paths.
 
   get_gcc_base_ver="cat"
diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac
index eec4084a45f..f2befdcb16e 100644
--- a/libquadmath/configure.ac
+++ b/libquadmath/configure.ac
@@ -394,6 +394,44 @@ AS_HELP_STRING([--enable-generated-files-in-srcdir],
 AC_MSG_RESULT($enable_generated_files_in_srcdir)
 AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
 
+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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-27 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 19:53 [gcc(refs/users/marxin/heads/sphinx-v7)] fixup! Add --with-sphinx-build Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).