From ec3ecf1b7cff226b6dc2d26604b1d234b262d8d5 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 6 Feb 2023 14:01:29 -0800 Subject: Call AC_PROG_CC instead of AC_PROG_CC_C99 if autoconf >= 2.70 Clears up deprecation warnings: configure.ac:38: warning: The macro `AC_PROG_CC_C99' is obsolete. configure.ac:38: You should run autoupdate. ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... aclocal.m4:2959: XORG_COMPILER_BRAND is expanded from... aclocal.m4:3078: XORG_COMPILER_FLAGS is expanded from... aclocal.m4:3267: XORG_DEFAULT_OPTIONS is expanded from... configure.ac:38: the top level ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... aclocal.m4:2990: XORG_TESTSET_CFLAG is expanded from... aclocal.m4:3082: XORG_COMPILER_FLAGS is expanded from... aclocal.m4:3254: XORG_DEFAULT_OPTIONS is expanded from... configure.ac:28: the top level Signed-off-by: Alan Coopersmith --- xorg-macros.m4.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 8d57724..cf4bac2 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1533,7 +1533,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) AC_DEFUN([XORG_COMPILER_BRAND], [ AC_LANG_CASE( [C], [ - AC_REQUIRE([AC_PROG_CC_C99]) + dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC + dnl and complains that AC_PROG_CC_C99 is obsolete + m4_version_prereq([2.70], + [AC_REQUIRE([AC_PROG_CC])], + [AC_REQUIRE([AC_PROG_CC_C99])]) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) @@ -1565,7 +1569,11 @@ AC_LANG_COMPILER_REQUIRE AC_LANG_CASE( [C], [ - AC_REQUIRE([AC_PROG_CC_C99]) + dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC + dnl and complains that AC_PROG_CC_C99 is obsolete + m4_version_prereq([2.70], + [AC_REQUIRE([AC_PROG_CC])], + [AC_REQUIRE([AC_PROG_CC_C99])]) define([PREFIX], [C]) define([CACHE_PREFIX], [cc]) define([COMPILER], [$CC]) -- cgit v1.2.3