[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Be more lenient in what is accepted in _AC_PROG_LEX_YYTEXT_DECL

From: Ross Burton
Subject: [PATCH] Be more lenient in what is accepted in _AC_PROG_LEX_YYTEXT_DECL
Date: Thu, 16 Jul 2020 17:25:44 +0100

From: Ross Burton <>

Most users of flex provide their own implementation of yywrap instead of
linking to, which simply provides stub main() and yywrap()

However the recent change 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL
(#109320)' means that the flex tool being present but not
(which is easy in cross-compilation environments) resullts in
AC_PROG_LEX failing, because the test lexer doesn't provide yywrap().

Add a minimal yywrap() to the test lexer so that the test case is
standalone and correctly uses lexes which don't *need* a separate
library to work (such as flex).
 lib/autoconf/programs.m4 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index 9deb62e8..c11ea62d 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -739,6 +739,11 @@ main (void)
   return ! yylex () + ! yywrap ();
+yywrap (void)
+  return 1;
 _AC_DO_VAR(LEX conftest.l)
 AC_CACHE_CHECK([for lex output file root], [ac_cv_prog_lex_root], [

reply via email to

[Prev in Thread] Current Thread [Next in Thread]