mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
configure: don't require Flex
Flex should not be required to build Bison or run the test suite (of course it is needed for maintaining Bison). Yet the Automake conditional FLEX_WORKS does not work. * m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Since this is called conditionally, don't define LEX_IS_FLEX here, but rather... (AC_PROG_LEX): here. * configure.ac: Be more cautious about possibly undefined variables.
This commit is contained in:
@@ -211,10 +211,10 @@ AC_CONFIG_FILES([src/yacc], [chmod +x src/yacc])
|
|||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AM_MISSING_PROG([DOT], [dot])
|
AM_MISSING_PROG([DOT], [dot])
|
||||||
AC_PROG_LEX
|
AC_PROG_LEX
|
||||||
$LEX_IS_FLEX || test "X$LEX" = X: || {
|
if ! "$LEX_IS_FLEX" || test "X$LEX" = X:; then
|
||||||
AC_MSG_WARN([bypassing lex because flex is required])
|
AC_MSG_WARN([bypassing lex because flex is required])
|
||||||
LEX=:
|
LEX=:
|
||||||
}
|
fi
|
||||||
AM_CONDITIONAL([FLEX_WORKS], [$LEX_IS_FLEX])
|
AM_CONDITIONAL([FLEX_WORKS], [$LEX_IS_FLEX])
|
||||||
AM_CONDITIONAL([FLEX_CXX_WORKS],
|
AM_CONDITIONAL([FLEX_CXX_WORKS],
|
||||||
[$LEX_IS_FLEX && test $bison_cv_cxx_works = yes])
|
[$LEX_IS_FLEX && test $bison_cv_cxx_works = yes])
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ AC_DEFUN_ONCE([AC_PROG_LEX],
|
|||||||
[AC_CHECK_PROGS([LEX], [flex lex], [:])
|
[AC_CHECK_PROGS([LEX], [flex lex], [:])
|
||||||
if test "x$LEX" != "x:"; then
|
if test "x$LEX" != "x:"; then
|
||||||
_AC_PROG_LEX_YYTEXT_DECL
|
_AC_PROG_LEX_YYTEXT_DECL
|
||||||
fi])
|
fi
|
||||||
|
AC_SUBST([LEX_IS_FLEX],
|
||||||
|
[`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false`])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
# _AC_PROG_LEX_YYTEXT_DECL
|
# _AC_PROG_LEX_YYTEXT_DECL
|
||||||
@@ -37,8 +40,6 @@ else
|
|||||||
ac_cv_prog_lex_is_flex=no
|
ac_cv_prog_lex_is_flex=no
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
AC_SUBST([LEX_IS_FLEX],
|
|
||||||
[`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false`])dnl
|
|
||||||
|
|
||||||
cat >conftest.l <<_ACEOF[
|
cat >conftest.l <<_ACEOF[
|
||||||
%%
|
%%
|
||||||
|
|||||||
Reference in New Issue
Block a user