On Tue, Oct 4, 2022 at 11:22 AM Tom de Vries via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Hi, > > Currently, we cannot build gdb without makeinfo installed. > > It would be convenient to work around this by using the configure flag > MAKEINFO=/usr/bin/true or some such, but that doesn't work because top-level > configure requires a makeinfo of at least version 4.7, and that version check > fails for /usr/bin/true, so we end up with MAKEINFO=missing instead. > > What does work is this: > ... > $ ./configure > $ make MAKEINFO=/usr/bin/true > ... > but the drawback is that it'll have to be specified for each make invocation. > > Fix this by adding support for --without-makeinfo in top-level configure. > > Tested by building gdb on x86_64-linux, and verifying that no .info files > were generated. > > OK for trunk? > > Thanks, > - Tom > > Add --without-makeinfo > > ChangeLog: > > 2022-09-05 Tom de Vries <tdevr...@suse.de> > > * configure.ac: Add --without-makeinfo. > * configure: Regenerate. > > --- > configure | 4 ++++ > configure.ac | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/configure b/configure > index f14e0efd675..eb84add60cb 100755 > --- a/configure > +++ b/configure > @@ -8399,6 +8399,9 @@ fi > done > test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo" > > +if test $with_makeinfo = "no"; then > +MAKEINFO=true > +else > case " $build_configdirs " in > *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; > *) > @@ -8414,6 +8417,7 @@ case " $build_configdirs " in > ;; > > esac > +fi > > # FIXME: expect and dejagnu may become build tools? > > diff --git a/configure.ac b/configure.ac > index 0152c69292e..e4a2c076674 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -3441,6 +3441,9 @@ case " $build_configdirs " in > esac > > AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
A new configure flag starting with the "--with-" prefix should use the AC_ARG_WITH autoconf macro, along with the AS_HELP_STRING macro so that it shows up in `./configure --help`. Check other places where AC_ARG_WITH is used in configure.ac to see how it's done. Also, the new option should be documented in install.texi as well. > +if test $with_makeinfo = "no"; then > +MAKEINFO=true > +else > case " $build_configdirs " in > *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; > *) > @@ -3456,6 +3459,7 @@ changequote(,) > ;; > changequote([,]) > esac > +fi > > # FIXME: expect and dejagnu may become build tools? >