From 0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Mon, 26 Feb 2018 11:23:00 +0100 Subject: Initial commit for sylpheed 3.7.0 --- ac/check-type.m4 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ac/check-type.m4 (limited to 'ac/check-type.m4') diff --git a/ac/check-type.m4 b/ac/check-type.m4 new file mode 100644 index 0000000..e65ea03 --- /dev/null +++ b/ac/check-type.m4 @@ -0,0 +1,27 @@ +dnl SYLPHEED_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES, COMMENT]) +dnl +dnl Like AC_CHECK_TYPE, but in addition to `sys/types.h', `stdlib.h' and +dnl `stddef.h' checks files included by INCLUDES, which should be a +dnl series of #include statements. If TYPE is not defined, define it +dnl to DEFAULT. +dnl +AC_DEFUN([SYLPHEED_CHECK_TYPE], +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(sylpheed_cv_type_$1, +[AC_TRY_COMPILE([ +#include +#if STDC_HEADERS +#include +#include +#endif +$3 +], [ +#undef $1 +int a = sizeof($1); +], sylpheed_cv_type_$1=yes, sylpheed_cv_type_$1=no)])dnl +AC_MSG_RESULT($sylpheed_cv_type_$1) +if test $sylpheed_cv_type_$1 = no; then + AC_DEFINE($1, $2, $4) +fi +]) -- cgit v1.3