Skip to content

Commit

Permalink
build: fail if bison/flex are not available
Browse files Browse the repository at this point in the history
Problem: if flex or bison are not installed, configure
lets the build continue and fail.

Ensure that if those programs are missing, configure fails.

Fixes #40
  • Loading branch information
garlick committed Jan 24, 2024
1 parent 72337a0 commit 47f87af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ AC_SUBST([WARNING_CFLAGS])
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LEX([noyywrap])
AS_IF([test "x$LEX" = "x:"],AC_MSG_ERROR([could not find flex]),[])
AC_PROG_YACC
# AC_PROG_YACC sets YACC=yacc when nothing is found, even yacc
# Just assume bison is the preferred compiler-compiler and call yacc a failure
AS_IF([test "x$YACC" = "xyacc"],AC_MSG_ERROR([could not find bison]),[])
AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")

##
Expand Down

0 comments on commit 47f87af

Please sign in to comment.