configure.ac: Update AC_PROG_CC and AC_PROG_LEX for autoconf 2.70
authorMark Wielaard <mark@klomp.org>
Sat, 22 Oct 2022 19:58:19 +0000 (21:58 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 27 Oct 2022 16:46:49 +0000 (18:46 +0200)
With autoconf 2.70 we must use AC_PROG_CC (which will check for c11
and c99), for earlier versions we'll use AC_PROG_CC_C99. Also use
AC_PROG_LEX([noyywrap]), the extra argument is ignored with earlier
versions, but required for 2.70.

Signed-off-by: Mark Wielaard <mark@klomp.org>
ChangeLog
configure.ac

index 6062418..ee566f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-22  Mark Wielaard  <mark@klomp.org>
+
+       * configure.ac: Use AC_PROG_CC with autoconf 2.70, or AC_PROG_CC_C99
+       for earlier versions. Use AC_PROG_LEX([noyywrap]).
+
 2022-09-13  Aleksei Vetrov  <vvvvvv@google.com>
 
        * NEWS (libdwfl): Add dwfl_report_offline_memory.
index 03b67a9..1084b46 100644 (file)
@@ -88,11 +88,11 @@ AS_IF([test "$use_locks" = yes],
 
 AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
 
-AC_PROG_CC_C99
+m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
 AC_PROG_CXX
 AC_PROG_RANLIB
 AC_PROG_YACC
-AM_PROG_LEX
+AC_PROG_LEX([noyywrap])
 # Only available since automake 1.12
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 AC_CHECK_TOOL([READELF], [readelf])