summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-06 14:01:29 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-09 12:05:36 -0800
commitec3ecf1b7cff226b6dc2d26604b1d234b262d8d5 (patch)
tree4d411382c45da220bedfc27a6f1f5e825b7eead1
parent35cd00d70e541574f9f491225b30096c4e291827 (diff)
downloadxorg-util-macros-ec3ecf1b7cff226b6dc2d26604b1d234b262d8d5.tar.gz
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 <alan.coopersmith@oracle.com>
-rw-r--r--xorg-macros.m4.in12
1 files 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])