[Commits] [SCM] claws branch, master, updated. 4.1.0-13-g79abcb428

paul at claws-mail.org paul at claws-mail.org
Wed May 18 12:49:20 CEST 2022


The branch, master has been updated
       via  79abcb428ce2794c1224a41118490a158c548001 (commit)
      from  bb6c9a43926b1932df48c92fb6f7f604fa66b8df (commit)

Summary of changes:
 configure.ac              | 10 ----------
 m4/check-type.m4          |  9 ++++-----
 m4/gnupg-check-typedef.m4 |  6 +++---
 m4/gnupg.m4               |  5 ++---
 m4/intmax.m4              |  4 ++--
 m4/inttypes-pri.m4        |  4 ++--
 m4/inttypes.m4            |  6 ++----
 m4/inttypes_h.m4          |  8 ++------
 m4/longdouble.m4          |  5 ++---
 m4/signed.m4              |  2 +-
 m4/spamassassin.m4        | 35 ++++++++++-------------------------
 m4/stdint_h.m4            |  8 ++------
 m4/wchar_t.m4             |  5 ++---
 13 files changed, 34 insertions(+), 73 deletions(-)


- Log -----------------------------------------------------------------
commit 79abcb428ce2794c1224a41118490a158c548001
Author: Paul <paul at claws-mail.org>
Date:   Wed May 18 11:49:16 2022 +0100

    modernise autotools

diff --git a/configure.ac b/configure.ac
index 291d6a939..bbd87a2fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -443,16 +443,6 @@ AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 AC_STRUCT_TM
 
-dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
-dnl may be defined only in wchar.h (this happens with gcc-2.96).
-dnl So we need to use this extended macro.
-CLAWS_CHECK_TYPE(wint_t, unsigned int,
-[
-#if HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
-
 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
 AC_CHECK_SIZEOF(unsigned short, 2)
 AC_CHECK_SIZEOF(unsigned int, 4)
diff --git a/m4/check-type.m4 b/m4/check-type.m4
index b5ac51d60..7ea7c89e8 100644
--- a/m4/check-type.m4
+++ b/m4/check-type.m4
@@ -10,20 +10,19 @@ dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([CLAWS_CHECK_TYPE],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
+[AC_MSG_CHECKING(for $1)
 AC_CACHE_VAL(claws_cv_type_$1,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 $3
-], [
+]], [[
 #undef $1
 int a = sizeof($1);
-], claws_cv_type_$1=yes, claws_cv_type_$1=no)])dnl
+]])],[claws_cv_type_$1=yes],[claws_cv_type_$1=no])])dnl
 AC_MSG_RESULT($claws_cv_type_$1)
 if test $claws_cv_type_$1 = no; then
   AC_DEFINE($1, $2, $4)
diff --git a/m4/gnupg-check-typedef.m4 b/m4/gnupg-check-typedef.m4
index bd7d6c400..7e41cf05d 100644
--- a/m4/gnupg-check-typedef.m4
+++ b/m4/gnupg-check-typedef.m4
@@ -8,11 +8,11 @@ dnl
 AC_DEFUN([GNUPG_CHECK_TYPEDEF],
   [ AC_MSG_CHECKING(for $1 typedef)
     AC_CACHE_VAL(gnupg_cv_typedef_$1,
-    [AC_TRY_COMPILE([#include <stdlib.h>
-    #include <sys/types.h>], [
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+    #include <sys/types.h>]], [[
     #undef $1
     int a = sizeof($1);
-    ], gnupg_cv_typedef_$1=yes, gnupg_cv_typedef_$1=no )])
+    ]])],[gnupg_cv_typedef_$1=yes],[gnupg_cv_typedef_$1=no ])])
     AC_MSG_RESULT($gnupg_cv_typedef_$1)
     if test "$gnupg_cv_typedef_$1" = yes; then
         AC_DEFINE($2, 1, $3)
diff --git a/m4/gnupg.m4 b/m4/gnupg.m4
index 5f1cffc24..0b0420277 100644
--- a/m4/gnupg.m4
+++ b/m4/gnupg.m4
@@ -17,7 +17,7 @@ dnl of the usual 2.
 AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG],
 [AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h)
 AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
@@ -27,8 +27,7 @@ AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
 #endif
 #ifdef HAVE_DIRECT_H
 # include <direct.h>
-#endif], [mkdir ("foo", 0);],
-        gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
+#endif]], [[mkdir ("foo", 0);]])],[gnupg_cv_mkdir_takes_one_arg=no],[gnupg_cv_mkdir_takes_one_arg=yes])])
 if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
   AC_DEFINE(MKDIR_TAKES_ONE_ARG,1,
             [Defined if mkdir() does not take permission flags])
diff --git a/m4/intmax.m4 b/m4/intmax.m4
index d99c999fd..5c5c8b555 100644
--- a/m4/intmax.m4
+++ b/m4/intmax.m4
@@ -13,7 +13,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
   AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
-    [AC_TRY_COMPILE([
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #if HAVE_STDINT_H_WITH_UINTMAX
@@ -22,7 +22,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
 #if HAVE_INTTYPES_H_WITH_UINTMAX
 #include <inttypes.h>
 #endif
-], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+]], [[intmax_t x = -1;]])],[gt_cv_c_intmax_t=yes],[gt_cv_c_intmax_t=no])])
   if test $gt_cv_c_intmax_t = yes; then
     AC_DEFINE(HAVE_INTMAX_T, 1,
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
index 4d56a9ad3..268ceb8dd 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/inttypes-pri.m4
@@ -16,11 +16,11 @@ AC_DEFUN([gt_INTTYPES_PRI],
     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
       gt_cv_inttypes_pri_broken,
       [
-        AC_TRY_COMPILE([#include <inttypes.h>
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <inttypes.h>
 #ifdef PRId32
 char *p = PRId32;
 #endif
-], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+]], [[]])],[gt_cv_inttypes_pri_broken=no],[gt_cv_inttypes_pri_broken=yes])
       ])
   fi
   if test "$gt_cv_inttypes_pri_broken" = yes; then
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 779bcea05..9987a5427 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -13,10 +13,8 @@ AC_DEFUN([gt_HEADER_INTTYPES_H],
 [
   AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
   [
-    AC_TRY_COMPILE(
-      [#include <sys/types.h>
-#include <inttypes.h>],
-      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <inttypes.h>]], [[]])],[gt_cv_header_inttypes_h=yes],[gt_cv_header_inttypes_h=no])
   ])
   if test $gt_cv_header_inttypes_h = yes; then
     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index a5d075d96..33809d8b1 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -12,12 +12,8 @@ dnl From Paul Eggert.
 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 [
   AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <inttypes.h>],
-    [uintmax_t i = (uintmax_t) -1;],
-    gl_cv_header_inttypes_h=yes,
-    gl_cv_header_inttypes_h=no)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <inttypes.h>]], [[uintmax_t i = (uintmax_t) -1;]])],[gl_cv_header_inttypes_h=yes],[gl_cv_header_inttypes_h=no])])
   if test $gl_cv_header_inttypes_h = yes; then
     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
index 40cd7ce02..bf10d7876 100644
--- a/m4/longdouble.m4
+++ b/m4/longdouble.m4
@@ -14,13 +14,12 @@ AC_DEFUN([gt_TYPE_LONGDOUBLE],
     [if test "$GCC" = yes; then
        gt_cv_c_long_double=yes
      else
-       AC_TRY_COMPILE([
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
          /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
          long double foo = 0.0;
          /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
          int array [2*(sizeof(long double) >= sizeof(double)) - 1];
-         ], ,
-         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+         ]], [[]])],[gt_cv_c_long_double=yes],[gt_cv_c_long_double=no])
      fi])
   if test $gt_cv_c_long_double = yes; then
     AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
diff --git a/m4/signed.m4 b/m4/signed.m4
index 048f59369..881247ebf 100644
--- a/m4/signed.m4
+++ b/m4/signed.m4
@@ -9,7 +9,7 @@ dnl From Bruno Haible.
 AC_DEFUN([bh_C_SIGNED],
 [
   AC_CACHE_CHECK([for signed], bh_cv_c_signed,
-   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char x;]])],[bh_cv_c_signed=yes],[bh_cv_c_signed=no])])
   if test $bh_cv_c_signed = no; then
     AC_DEFINE(signed, ,
               [Define to empty if the C compiler doesn't support this keyword.])
diff --git a/m4/spamassassin.m4 b/m4/spamassassin.m4
index c70228ca6..ea4bacf70 100644
--- a/m4/spamassassin.m4
+++ b/m4/spamassassin.m4
@@ -12,12 +12,9 @@ AC_CHECK_HEADERS(time.h sysexits.h sys/socket.h netdb.h netinet/in.h)
 
 AC_CACHE_CHECK([for SHUT_RD],
        spamassassin_cv_has_shutrd, [
-                AC_TRY_COMPILE([#include <sys/types.h>
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
 #include <stdio.h>
-#include <sys/socket.h>],
-                        [printf ("%d", SHUT_RD); return 0;],
-                                        [spamassassin_cv_has_shutrd=yes],
-                                        [spamassassin_cv_has_shutrd=no]),
+#include <sys/socket.h>]], [[printf ("%d", SHUT_RD); return 0;]])],[spamassassin_cv_has_shutrd=yes],[spamassassin_cv_has_shutrd=no]),
        ])
 if test $spamassassin_cv_has_shutrd = yes ; then
   AC_DEFINE(HAVE_SHUT_RD, 1, HAVE_SHUT_RD)
@@ -31,12 +28,9 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for h_errno],
         spamassassin_cv_has_herrno, [
-                AC_TRY_COMPILE([#include <netdb.h>
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>
 #include <stdio.h>
-],
-                        [printf ("%d", h_errno); return 0;],
-                                        [spamassassin_cv_has_herrno=yes],
-                                        [spamassassin_cv_has_herrno=no]),
+]], [[printf ("%d", h_errno); return 0;]])],[spamassassin_cv_has_herrno=yes],[spamassassin_cv_has_herrno=no]),
         ])
 if test $spamassassin_cv_has_herrno = yes ; then
   AC_DEFINE(HAVE_H_ERRNO, 1, HAVE_H_ERRNO)
@@ -48,11 +42,8 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for in_addr_t],
         spamassassin_cv_has_inaddrt, [
-                AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>],
-                        [in_addr_t foo; return 0;],
-                                        [spamassassin_cv_has_inaddrt=yes],
-                                        [spamassassin_cv_has_inaddrt=no]),
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <netinet/in.h>]], [[in_addr_t foo; return 0;]])],[spamassassin_cv_has_inaddrt=yes],[spamassassin_cv_has_inaddrt=no]),
         ])
 if test $spamassassin_cv_has_inaddrt = no ; then
   AC_CHECK_TYPE(in_addr_t, unsigned long)
@@ -62,11 +53,8 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for INADDR_NONE],
         spamassassin_cv_has_haveinaddrnone, [
-                AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>],
-                        [in_addr_t foo = INADDR_NONE; return 0;],
-                                        [spamassassin_cv_has_haveinaddrnone=yes],
-                                        [spamassassin_cv_has_haveinaddrnone=no]),
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <netinet/in.h>]], [[in_addr_t foo = INADDR_NONE; return 0;]])],[spamassassin_cv_has_haveinaddrnone=yes],[spamassassin_cv_has_haveinaddrnone=no]),
         ])
 if test $spamassassin_cv_has_haveinaddrnone = yes ; then
   AC_DEFINE(HAVE_INADDR_NONE, 1, HAVE_INADDR_NONE)
@@ -76,13 +64,10 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for EX__MAX],
         spamassassin_cv_has_haveexmax, [
-                AC_TRY_COMPILE([#ifdef HAVE_SYSEXITS_H
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYSEXITS_H
 #include <sysexits.h>
 #endif
-#include <errno.h>],
-                        [int foo = EX__MAX; return 0;],
-                                        [spamassassin_cv_has_haveexmax=yes],
-                                        [spamassassin_cv_has_haveexmax=no]),
+#include <errno.h>]], [[int foo = EX__MAX; return 0;]])],[spamassassin_cv_has_haveexmax=yes],[spamassassin_cv_has_haveexmax=no]),
         ])
 if test $spamassassin_cv_has_haveexmax = yes ; then
   AC_DEFINE(HAVE_EX__MAX, 1, HAVE_EX__MAX)
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index 3355f35aa..6e224c5a8 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -12,12 +12,8 @@ dnl From Paul Eggert.
 AC_DEFUN([gl_AC_HEADER_STDINT_H],
 [
   AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <stdint.h>],
-    [uintmax_t i = (uintmax_t) -1;],
-    gl_cv_header_stdint_h=yes,
-    gl_cv_header_stdint_h=no)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <stdint.h>]], [[uintmax_t i = (uintmax_t) -1;]])],[gl_cv_header_stdint_h=yes],[gl_cv_header_stdint_h=no])])
   if test $gl_cv_header_stdint_h = yes; then
     AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index cde2129a9..b023c3e17 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -11,9 +11,8 @@ dnl Prerequisite: AC_PROG_CC
 AC_DEFUN([gt_TYPE_WCHAR_T],
 [
   AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
-    [AC_TRY_COMPILE([#include <stddef.h>
-       wchar_t foo = (wchar_t)'\0';], ,
-       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';]], [[]])],[gt_cv_c_wchar_t=yes],[gt_cv_c_wchar_t=no])])
   if test $gt_cv_c_wchar_t = yes; then
     AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
   fi

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list