]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4: dbqlk.m4 - Modernize m4 syntax
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 25 Apr 2022 17:28:19 +0000 (20:28 +0300)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Mon, 4 Jul 2022 09:43:26 +0000 (11:43 +0200)
m4/dbqlk.m4

index d030f8fa144692b7d53d3e2f2ae2c5d483f434c7..fe9d228f555c785419f4c5ab24675e60db6d8992 100644 (file)
@@ -1,39 +1,39 @@
 dnl * Check if we have struct dqblk.dqb_curblocks
 AC_DEFUN([DOVECOT_DQBLK_CURBLOCKS], [
   AC_CACHE_CHECK([if struct dqblk.dqb_curblocks exists],i_cv_have_dqblk_dqb_curblocks,[
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       #include <sys/types.h>
       #include "$srcdir/src/plugins/quota/quota-fs.h"
-    ][
+    ]], [[
       struct dqblk dqblk;
       unsigned int x = dqblk.dqb_curblocks;
-    ][
+    ]])],[
       i_cv_have_dqblk_dqb_curblocks=yes
     ], [
       i_cv_have_dqblk_dqb_curblocks=no
     ])
   ])
-  if test $i_cv_have_dqblk_dqb_curblocks = yes; then
+  AS_IF([test $i_cv_have_dqblk_dqb_curblocks = yes], [
     AC_DEFINE(HAVE_STRUCT_DQBLK_CURBLOCKS,, [Define if struct sqblk.dqb_curblocks exists])
-  fi
+  ])
 ])
 
 dnl * Check if we have struct dqblk.dqb_curspace
 AC_DEFUN([DOVECOT_DQBLK_CURSPACE], [
   AC_CACHE_CHECK([if struct dqblk.dqb_curspace exists],i_cv_have_dqblk_dqb_curspace,[
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       #include <sys/types.h>
       #include "$srcdir/src/plugins/quota/quota-fs.h"
-    ][
+    ]], [[
       struct dqblk dqblk;
       unsigned int x = dqblk.dqb_curspace;
-    ][
+    ]])],[
       i_cv_have_dqblk_dqb_curspace=yes
     ], [
       i_cv_have_dqblk_dqb_curspace=no
     ])
   ])
-  if test $i_cv_have_dqblk_dqb_curspace = yes; then
+  AS_IF([test $i_cv_have_dqblk_dqb_curspace = yes], [
     AC_DEFINE(HAVE_STRUCT_DQBLK_CURSPACE,, [Define if struct sqblk.dqb_curspace exists])
-  fi
+  ])
 ])