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

index e4466c435a8482fa219a57910877057f154a8580..4ef6124f7adfd68f6a2bdb6d25bc18e9e2cb9944 100644 (file)
@@ -1,19 +1,19 @@
 AC_DEFUN([DOVECOT_C_STATIC_ARRAY], [
   AC_CACHE_CHECK([if we can use C99 static in array sizes],i_cv_c99_static_arrays,[
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       void foo(unsigned char arr[static 20]);
-    ][
-    ][
+    ]], [[
+    ]])],[
       i_cv_c99_static_arrays=yes
-    ], [
+    ],[
       i_cv_c99_static_arrays=no
     ])
   ])
 
-  if test $i_cv_c99_static_arrays = yes; then
+  AS_IF([test $i_cv_c99_static_arrays = yes], [
     static_value=static
-  else
+  ], [
     static_value=
-  fi
+  ])
   AC_DEFINE_UNQUOTED(STATIC_ARRAY, $static_value, [C99 static array])
 ])