On Tue, Jun 26, 2001 at 11:42:07AM +0200, Marcus Meissner wrote:
> On Tue, Jun 26, 2001 at 05:43:55PM +0900, Bang Jun-Young wrote:
> > Why does configure check for flex twice? On NetBSD I get:
> >
> > checking for bison... no
> > checking for byacc... no
> > checking for flex... flex
> > checking for yywrap in -lfl... yes
> > checking for flex... flex
> >
> > (as seen above, autoconf doesn't search for `yacc' for
> > AC_PROG_YACC -- should be fixed)
>
> It will use it as default if neither byacc nor flex are found.
>
> The reason we check for 'flex' again is that the standard check sets LEX
> to 'lex' even if none is found, which lead to confusion during compile.
>
> Our check is similar, but it finds out if 'lex' is present and aborts
> configure if not.
Another question: why doesn't it doublecheck for yacc? There may
be a system that doesn't have any parser installed by default and
at least one of yacc, byacc, and bison should be installed to
compile.
I have made another patch:
diff -u -r1.209 configure.in
--- configure.in 2001/06/19 03:30:14 1.209
+++ configure.in 2001/06/26 11:26:50
@@ -54,6 +54,13 @@
AC_PROG_CPP
AC_PATH_XTRA
AC_PROG_YACC
+AC_CHECK_PROGS(XYACC,$YACC yacc byacc bison,none)
+if test "$XYACC" = "none"
+then
+ echo "*** Error: No suitable parser found. ***"
+ echo " Please install 'yacc', 'byacc', or 'bison' package."
+ exit 1
+fi
AC_PROG_LEX
AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
if test "$XLEX" = "none"
Jun-Young
--
Bang Jun-Young <[EMAIL PROTECTED]>