Skip to content

Commit

Permalink
Check for flex, re-enable fancy error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fenner committed Apr 20, 2015
1 parent 2fbbfb5 commit df938f2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 7,7 @@ HEADERS= config.h common.h

CFLAGS= @CFLAGS@ @DEFS@ -DYYDEBUG
YACC= @YACC@ -d -v
LEX= @LEX@
CC= @CC@

bap: ${OBJS}
Expand Down
10 changes: 10 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 15,15 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* define if we're using bison */
#undef YYERROR_VERBOSE

/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#undef YYTEXT_POINTER
16 changes: 9 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 3,7 @@ dnl
dnl Boy does modern autoconf make it hard to have a small ./configure.
dnl Sorry that it's so huge for almost no configuration.

AC_INIT(bap, 1.2)
AC_INIT(bap, 1.3)

AC_PROG_CC
AC_PROG_YACC
Expand All @@ -19,12 19,14 @@ fi
dnl The bap -d argument only works with bison, so enable it
dnl if we're using bison.
dnl
dnl Unfortunately, the bison internals that my YYERROR_VERBOSE
dnl code tweaks changed in bison 2.1, and I haven't taken the
dnl time to track it down, so skip this test for now.
dnl if test "$ac_cv_prog_YACC" = "bison -y"; then
dnl AC_DEFINE(YYERROR_VERBOSE, 1, [define if we're using bison])
dnl fi
if test "$ac_cv_prog_YACC" = "bison -y"; then
AC_DEFINE(YYERROR_VERBOSE, 1, [define if we're using bison])
fi

AC_PROG_LEX
if test "$ac_cv_prog_LEX" = ":"; then
AC_ERROR([please install flex])
fi

AC_REPLACE_FUNCS(hcreate)

Expand Down

0 comments on commit df938f2

Please sign in to comment.