autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_YACC question


From: Bob Proulx
Subject: Re: AC_PROG_YACC question
Date: Tue, 9 Oct 2001 00:49:32 -0600

> > > I can't say as I found it in any documentation.  I pulled it out of
> > > other examples of its use in /usr/share/{aclocal,autoconf,automake}!

> You'll need to call
>   AC_CHECK_PROGS(YACC, byacc yacc 'bison -y', [AM_MISSING_PROG(yacc)])
> instead of using the undocumented, unsupported, internal am_missing_run

That had worried me a little.  Thanks for clarifying that.

> > > It might not be a public interface!

But you only care if you are a maintainer.  And as noted, things will
work acceptably if it is not set.  So even if catastrophy happens and
the interface changes things still work albeit in a simpler fashion.
It is a good bet for me.

> variable.  Then run aclocal to pull in the macro definitions needed.
> Note that this _may_ require a recent automake (1.5 recommended).

>   AC_CHECK_PROGS(YACC, byacc yacc 'bison -y', [AM_MISSING_PROG(yacc)])

With autoconf-2.52 and automake-1.5 I tried your example.

In config/yacc.m4:
AC_DEFUN([AC_PROG_YACC_SPECIAL],
[AC_CHECK_PROGS(YACC,xyacc xbyacc 'xbison -y',[AM_MISSING_PROG(yacc)])])

And in configure.ac I call it.  This produces one failure per Makefile
such as this and the Makefile is zero lenth.  As you can see I was
trying to force a not found and was going to test it.

  config.status: creating Makefile
  sed: file /tmp/csWzweyg/subs-2.sed line 17: Unterminated `s' command

But looking at the source for AM_MISSING_PROG in
/usr/share/aclocal/missing.m4 and other uses it looks like it should
always have two parameters, VARIABLE and NAME.  So I tried this.

AC_DEFUN([AC_PROG_YACC_SPECIAL],
[AC_CHECK_PROGS(YACC,xyacc xbyacc 'xbison -y',[AM_MISSING_PROG(YACC,yacc)])])

  config.status: creating Makefile
  sed: file /tmp/cs3ldBbJ/subs-2.sed line 17: Unterminated `s' command

With the same result.  Hmm...  The use of the macro looks okay.  Will
debug that later.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]