]> git.puffer.fish Git - matthieu/frr.git/commitdiff
build: work around AC_PROG_LEX deprecation warning
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 11 Nov 2021 10:57:59 +0000 (11:57 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 11 Nov 2021 10:58:50 +0000 (11:58 +0100)
`AC_PROG_LEX without either yywrap or noyywrap is obsolete`, says
autoconf 2.70.  Sadly, there is no transition window for this, in 2.69
the macro takes no arguments.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac

index c5e5d64aa05069c1544ad4bbdca4ca0674a50b7d..92a60ce818c75e5bb165285f8fb6b1d2f3e858a9 100644 (file)
@@ -2235,7 +2235,16 @@ dnl --------------------------------------
 dnl checking for flex and bison
 dnl --------------------------------------
 
-AM_PROG_LEX
+dnl autoconf 2.69 AC_PROG_LEX has no parameters
+dnl autoconf 2.70 AC_PROG_LEX prints a deprecation warning without params
+m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.70]), [-1], [dnl
+  dnl autoconf < 2.70
+  AC_PROG_LEX
+], [
+  dnl autoconf >= 2.70
+  AC_PROG_LEX([noyywrap])
+])
+
 AC_MSG_CHECKING([version of flex])
 frr_ac_flex_version="$(eval $LEX -V | grep flex | head -n 1)"
 frr_ac_flex_version="${frr_ac_flex_version##* }"