]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4: dovecot.m4 - Make C standard check aware of autoconf version
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Wed, 27 Jul 2022 13:50:48 +0000 (15:50 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 3 Aug 2022 10:47:29 +0000 (10:47 +0000)
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.

m4/dovecot.m4

index fdcca09c7d40a9355d14880edaf7536907413612..aeff3b802bba6f836e9697c9b25a6784abced6dd 100644 (file)
@@ -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)
   ])