From: Mark Wielaard Date: Sat, 28 Jan 2023 20:11:35 +0000 (+0100) Subject: configure.ac: Update AC_PROG_CC checks X-Git-Tag: VALGRIND_3_21_0~196 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=092d9085442a2519d7b1bdbc79334a307ad55574;p=thirdparty%2Fvalgrind.git configure.ac: Update AC_PROG_CC checks AM_PROG_CC_C_O has been obsolete since automake 1.14. AC_PROG_CC does the same check. 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. --- diff --git a/configure.ac b/configure.ac index 47b2a5fe8f..625063beb4 100755 --- a/configure.ac +++ b/configure.ac @@ -50,8 +50,11 @@ CXXFLAGS="$CXXFLAGS" #---------------------------------------------------------------------------- AC_PROG_LN_S -AC_PROG_CC -AM_PROG_CC_C_O +m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99]) +# Make sure we can compile in C99 mode. +if test "$ac_cv_prog_cc_c99" = "no"; then + AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99]) +fi AC_PROG_CPP AC_PROG_CXX # AC_PROG_OBJC apparently causes problems on older Linux distros (eg. with @@ -136,12 +139,6 @@ else fi rm $tmpfile -# Make sure we can compile in C99 mode. -AC_PROG_CC_C99 -if test "$ac_cv_prog_cc_c99" = "no"; then - AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99]) -fi - # We don't want gcc < 3.0 AC_MSG_CHECKING([for a supported version of gcc])