Skip to content

Commit

Permalink
configure: fail configuration with missing lex/flex (#3345)
Browse files Browse the repository at this point in the history
Closes #3343
  • Loading branch information
nilason committed Jan 16, 2024
1 parent 4c6be3e commit 18b54a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6484,7 +6484,9 @@ fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c

fi
if test "$LEX" = "lex"; then
if test "x$LEX" = "x:"; then
as_fn_error $? "*** Unable to locate lex." "$LINENO" 5
elif test "$LEX" = "lex"; then
# Extract the first word of "lex", so it can be a program name with args.
set dummy lex; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Expand Down Expand Up @@ -6528,7 +6530,7 @@ fi


if test "$LEXPATH" = "no"; then
as_fn_error $? "*** Unable to locate lex." "$LINENO" 5
as_fn_error $? "*** Unable to locate lex." "$LINENO" 5
fi
fi

Expand Down
6 changes: 4 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,12 @@ AC_SUBST(LIBRARY_DIRS)
AC_PROG_INSTALL

AC_PROG_LEX(noyywrap)
if test "$LEX" = "lex"; then
if test "x$LEX" = "x:"; then
AC_MSG_ERROR([*** Unable to locate lex.])
elif test "$LEX" = "lex"; then
AC_PATH_PROG(LEXPATH, lex, no)
if test "$LEXPATH" = "no"; then
AC_MSG_ERROR([*** Unable to locate lex.])
AC_MSG_ERROR([*** Unable to locate lex.])
fi
fi

Expand Down

0 comments on commit 18b54a9

Please sign in to comment.