Re: [PATCH] maint: Nicer warning if autoconf-archive not available
On Fri, Sep 03, 2021 at 12:04:10PM +0200, Wouter Verhelst wrote:
> > With this change, the error changes to:
> >
> > configure.ac:117: error: possibly undefined macro: AX_PROG_BISON
> > If this token and others are legitimate, please use m4_pattern_allow.
> > See the Autoconf documentation.
> >
> > which is still not a direct finger pointing to missing
> > autoconf-archives, but at least provides more relevant hits in a
> > google search for how to resolve it (compared to recommended remedies
> > for the first message).
>
> I've used
>
> m4_ifdef([AX_CXX_COMPILE_STDCXX_11],,
> [m4_fatal([The m4 macro AX_CXX_COMPILE_STDCXX_11 has not been defined. Please install the autoconf-archive package.])])
>
> in a different project, which produces a more helpful error message that
> does point directly to the missing package and the correct solution.
Indeed, that's even nicer!
I would have written
m4_ifndef([AX_...],
[m4_fatal([...])])
for one less empty argument, but that's cosmetic. No point in further
tweaking what you pushed.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Reply to: