[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] configure.ac: fix complaint by automake of missing AC_PROG_YACC



On Sat, Aug 28, 2021 at 07:13:07PM +0200, Wouter Verhelst wrote:
> Hi Luis,
> 
> On Thu, Aug 26, 2021 at 12:37:27PM -0700, Luis Chamberlain wrote:
> > If automake sees you have a Yacc source but YACC is undefined
> > it will complain.
> > 
> > Makefile.am: error: Yacc source seen but 'YACC' is undefined
> > Makefile.am:   The usual way to define 'YACC' is to add 'AC_PROG_YACC'
> > Makefile.am:   to 'configure.ac' and run 'autoconf' again.
> > autoreconf: automake failed with exit status:
> > 
> > The recommended way to resolve this is to use AC_PROG_YACC on configure.ac,
> > but that is only if we care for yacc. Since we clearly are not fans of
> > it and seem to prefer bison, add the missing m4 helper which defines
> > AX_PROG_BISON().
> 
> We already have that? It assumes you have the "autoconf-archive"
> library[1] of m4 macros installed, though.
> 
> [1] https://www.gnu.org/software/autoconf-archive/, or as packaged in
> most distributions.

Correct - if autoconf-archive is installed, 'autoreconf -i' will
automatically pick up AX_PROG_BISON into aclocal.m4.  We don't need to
add the file to the repo.  But what we CAN do is make the error
message (when autoconf-archive was NOT installed) more useful, by
specifically telling autoreconf that we want ALL autoconf-archive
macros to be expanded.  Patch to follow...

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply to: