sync with 0.4.65 (now arrived at 0.4.66claws1)
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 1 May 2001 18:23:48 +0000 (18:23 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 1 May 2001 18:23:48 +0000 (18:23 +0000)
ac/Makefile.am
ac/check-type.m4 [new file with mode: 0644]

index 6a4b9b3..8eb0041 100644 (file)
@@ -1,5 +1,7 @@
 MACROS = \
        aclocal-include.m4 \
+       check-type.m4 \
+       gnupg-check-typedef.m4 \
        gpgme.m4
 
 EXTRA_DIST = $(MACROS)
diff --git a/ac/check-type.m4 b/ac/check-type.m4
new file mode 100644 (file)
index 0000000..1a71b6a
--- /dev/null
@@ -0,0 +1,27 @@
+dnl SYLPHEED_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES])
+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 <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#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)
+fi
+])