Skip to content
Browse files

Detect bison and flex in configure.in

  • Loading branch information...
1 parent 1a22f37 commit 357a0ff23e25a07224bc5084d0503af98a8fd74c steve committed
Showing with 43 additions and 7 deletions.
  1. +6 −4 Makefile.in
  2. +16 −0 configure.in
  3. +5 −3 vvp/Makefile.in
  4. +16 −0 vvp/configure.in
View
10 Makefile.in
@@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
-#ident "$Id: Makefile.in,v 1.109 2001/12/06 02:55:24 steve Exp $"
+#ident "$Id: Makefile.in,v 1.110 2001/12/30 17:20:33 steve Exp $"
#
#
SHELL = /bin/sh
@@ -46,6 +46,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
STRIP = @STRIP@
+LEX = @LEX@
+YACC = @YACC@
CPPFLAGS = @CPPFLAGS@ @DEFS@
CXXFLAGS = @CXXFLAGS@ -I. -I$(srcdir)
@@ -170,14 +172,14 @@ lexor.o: lexor.cc parse.h
parse.o: parse.cc
parse.h parse.cc: $(srcdir)/parse.y
- bison --verbose -t -p VL -d -o parse.cc $(srcdir)/parse.y
+ $(YACC) --verbose -t -p VL -d -o parse.cc $(srcdir)/parse.y
mv parse.cc.h parse.h || mv parse.hh parse.h
syn-rules.cc: $(srcdir)/syn-rules.y
- bison --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
+ $(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
lexor.cc: $(srcdir)/lexor.lex
- flex -PVL -s -olexor.cc $(srcdir)/lexor.lex
+ $(LEX) -PVL -s -olexor.cc $(srcdir)/lexor.lex
lexor_keyword.o: lexor_keyword.cc
View
16 configure.in
@@ -14,6 +14,22 @@ then
exit 1
fi
+AC_CHECK_PROGS(LEX,flex,none)
+if test "$LEX" = "none"
+then
+ echo "*** Error: No suitable flex found. ***"
+ echo " Please install the 'flex' package."
+ exit 1
+fi
+
+AC_CHECK_PROGS(YACC,bison,none)
+if test "$YACC" = "none"
+then
+ echo "*** Error: No suitable bison found. ***"
+ echo " Please install the 'bison' package."
+ exit 1
+fi
+
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(getopt.h malloc.h iosfwd sys/wait.h)
View
8 vvp/Makefile.in
@@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
-#ident "$Id: Makefile.in,v 1.32 2001/11/10 18:07:11 steve Exp $"
+#ident "$Id: Makefile.in,v 1.33 2001/12/30 17:20:33 steve Exp $"
#
#
SHELL = /bin/sh
@@ -39,6 +39,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
STRIP = @STRIP@
+LEX = @LEX@
+YACC = @YACC@
CPPFLAGS = -I. -I$(srcdir)/.. @CPPFLAGS@ @DEFS@ -DMODULE_DIR=\"$(libdir)/ivl\"
CXXFLAGS = @CXXFLAGS@
@@ -88,11 +90,11 @@ parse.o: parse.cc
tables.o: tables.cc
parse.h parse.cc: $(srcdir)/parse.y
- bison --verbose -t -d -o parse.cc $(srcdir)/parse.y
+ $(YACC) --verbose -t -d -o parse.cc $(srcdir)/parse.y
mv parse.cc.h parse.h
lexor.cc: $(srcdir)/lexor.lex
- flex -s -olexor.cc $(srcdir)/lexor.lex
+ $(LEX) -s -olexor.cc $(srcdir)/lexor.lex
vvp.pdf: $(srcdir)/vvp.man
man -t $(srcdir)/vvp.man | ps2pdf - vvp.pdf
View
16 vvp/configure.in
@@ -10,6 +10,22 @@ AC_EXEEXT
AC_MINGW32
AC_SUBST(EXEEXT)
+AC_CHECK_PROGS(LEX,flex,none)
+if test "$LEX" = "none"
+then
+ echo "*** Error: No suitable flex found. ***"
+ echo " Please install the 'flex' package."
+ exit 1
+fi
+
+AC_CHECK_PROGS(YACC,bison,none)
+if test "$YACC" = "none"
+then
+ echo "*** Error: No suitable bison found. ***"
+ echo " Please install the 'bison' package."
+ exit 1
+fi
+
AC_PROG_INSTALL
AC_ARG_ENABLE(vvp-debug, vvp-debug -- interactive debugger for VVP runtime.,

0 comments on commit 357a0ff

Please sign in to comment.
Something went wrong with that request. Please try again.