This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Configure patch] Issue error if bison not found
- From: Craig Rodrigues <rodrigc at attbi dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Nov 2002 00:06:45 -0500
- Subject: [Configure patch] Issue error if bison not found
Hi,
Without the following patch, if you try to configure
on a system which does not have bison installed,
${build_dir}/gcc/Makefile will be generated with the following line:
BISON=false
This causes weird errors later on during a bootstrap, because
something like:
$(srcdir)/c-parse.c: $(srcdir)/c-parse.y
cd $(srcdir) && \
if $(BISON) $(BISONFLAGS) -o c-p$$$$.c c-parse.y; then \
test -f c-p$$$$.output && mv -f c-p$$$$.output c-parse.output ; \
mv -f c-p$$$$.c c-parse.c ; \
else \
rm -f c-p$$$$.* ; \
false ; \
fi
will be executed as:
if false -o -c........; then
Is this OK for mainline?
Also, what version of autoconf is acceptable for rebuilding
configure so that it can be checked in? I have autoconf 2.53
here and it works fine.
2002-11-28 Craig Rodrigues <rodrigc@gcc.gnu.org>
* configure.in: Issue error if bison not found.
* configure: Rebuilt.
Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure.in,v
retrieving revision 1.626
diff -u -r1.626 configure.in
--- configure.in 26 Nov 2002 20:08:07 -0000 1.626
+++ configure.in 28 Nov 2002 04:58:57 -0000
@@ -610,6 +610,9 @@
BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
else
AC_CHECK_PROG(BISON, bison, bison, false)
+ if test "$BISON" = "false"; then
+ AC_MSG_ERROR([cannot find bison])
+ fi
fi
# These libraries may be used by collect2.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@attbi.com