From: Karl Fleischmann Date: Wed, 27 Jul 2022 13:50:48 +0000 (+0200) Subject: m4: dovecot.m4 - Make C standard check aware of autoconf version X-Git-Tag: 2.4.0~3725 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5488b9012ac44cbfa62de1865fbf15ebfd4afba;p=thirdparty%2Fdovecot%2Fcore.git m4: dovecot.m4 - Make C standard check aware of autoconf version Version 2.70 of autoconf deprecated AC_PROG_CC_C99 in favor of using different cache veriables that are set by AC_PROG_CC. This commit uses the appropriate mechanism depending on the m4 version used. --- diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index fdcca09c7d..aeff3b802b 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -6,7 +6,7 @@ dnl This file is free software; the authors give dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. -# serial 36 +# serial 37 dnl dnl Check for support for D_FORTIFY_SOURCE=2 @@ -30,8 +30,9 @@ AC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[ dnl * gcc specific options AC_DEFUN([DC_DOVECOT_CFLAGS],[ - AC_PROG_CC_C99 - AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [ + m4_version_prereq(2.70, [AC_PROG_CC], [AC_PROG_CC_C99]) + + AS_IF([test "$ac_prog_cc_stdc" = "c89" || test "$ac_prog_cc_std" = "no" || test "$ac_cv_prog_cc_c99" = "no"], [ AC_MSG_ERROR(C99 capable compiler required) ])