[vlc-commits] configure.ac: fix AC_PROG_LEX warning

Alexandre Janniaux git at videolan.org
Mon Feb 15 15:06:01 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Sat Jan 30 18:43:44 2021 +0100| [824b3d4551e6c19e34e31bedb6f8843cfda35ca0] | committer: Alexandre Janniaux

configure.ac: fix AC_PROG_LEX warning

With autoconf 2.70, the following warnings are emitted:

configure.ac:56: warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete
./lib/autoconf/programs.m4:716: _AC_PROG_LEX is expanded from...
./lib/autoconf/programs.m4:709: AC_PROG_LEX is expanded from...
configure.ac:56: the top level

The documentation[1] of autoconf now states:

> Prior to Autoconf 2.70, AC_PROG_LEX did not take any arguments, and
> its behavior was different from either of the above possibilities: it
> would search for a library that defines yywrap, and would set LEXLIB
> to that library if it finds one. However, if a library that defines
> this function could not be found, LEXLIB would be left empty and LEX
> would not be reset. This behavior was due to a bug, but several
> packages came to depend on it, so AC_PROG_LEX still does this if
> neither the yywrap nor the noyywrap option is given.
>
> Usage of AC_PROG_LEX without choosing one of the yywrap or noyywrap
> options is deprecated. It is usually better to use noyywrap and define
> the yywrap function yourself, as this almost always renders the LEXLIB
> unnecessary.

The behaviour of the argument on autoconf < 2.70 is to ignore the
argument, so there are no issues with adding the option.

[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Particular-Programs.html#Particular-Programs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=824b3d4551e6c19e34e31bedb6f8843cfda35ca0
---

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d57114af22..a82c956c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ AC_PROG_EGREP
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
 AM_PROG_AS
-AC_PROG_LEX
+AC_PROG_LEX([noyywrap])
 AC_PROG_YACC
 
 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])



More information about the vlc-commits mailing list