Coda File System

Re: bison now required for rpc2?

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Tue, 07 Aug 2007 09:13:48 -0400
Jan Harkes <jaharkes_at_cs.cmu.edu> writes:

> On Mon, Aug 06, 2007 at 08:19:31AM -0400, Greg Troxel wrote:
>> if [ ! -x "$YACC" ]; then
>
> I think I like this test best. Really we should include the generated
> parser.c and lexer.c code in the distributed sources, however we can't
> because the generated code seems platform specific (i.e. it required
> stdint.h).

I have modified configure to look for yacc explicitly and not have a
fallback, and I think this is a good solution.  I remove the test for
success, but I'd leave that in and I'll see how that works.

$NetBSD: patch-aa,v 1.7 2007/08/06 12:54:25 gdt Exp $

--- configure.in.orig	2007-06-28 12:16:52.000000000 -0400
+++ configure.in
@@ -30,10 +30,7 @@ AM_PROG_LEX
 if test -z "${ac_cv_prog_LEX}" ; then
     AC_MSG_ERROR([Build requires flex or lex lexical analyzer generator])
 fi
-AC_PROG_YACC
-if test -z "${ac_cv_prog_YACC}" ; then
-    AC_MSG_ERROR([Build requires bison, byacc or yacc parser generator])
-fi
+AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL

> The executable test best matches intent, we want to have executable
> yacc (and lex) binaries available. I might move these tests all the way
> to the end, possibly even after we've created all the makefiles.
> (so technically they would become warnings, but at least you get to see
> all possible issues listed instead of having configure halt on a missing
> lex, install lex, halt on a missing yacc, install yacc, halt on a
> missing lwp, etc.

If you really mean warning, then please change to AC_MSG_WARN.  I agree
that exit 1 at the end is much like not exiting with non-zero status,
but packaging systems will fail (correctly so) if configure has non-zero
exit status.
Received on 2007-08-07 09:16:45