Skip to content
  • Alexandre Janniaux's avatar
    configure.ac: fix AC_PROG_LEX warning · 824b3d45
    Alexandre Janniaux authored
    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
    824b3d45