aboutsummaryrefslogtreecommitdiff
path: root/ac/gnupg-check-typedef.m4
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-12 11:22:08 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-12 11:22:08 +0000
commitb9ca7b1ef5cd1f96ae6e28ae78d12c1e3258c23f (patch)
tree1203adec5f70af1ddd49868528d8d3a5b9004329 /ac/gnupg-check-typedef.m4
Initial import of Sylpheed (GTK2 version).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'ac/gnupg-check-typedef.m4')
-rw-r--r--ac/gnupg-check-typedef.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/ac/gnupg-check-typedef.m4 b/ac/gnupg-check-typedef.m4
new file mode 100644
index 00000000..4f782a6a
--- /dev/null
+++ b/ac/gnupg-check-typedef.m4
@@ -0,0 +1,16 @@
+dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME [, COMMENT])
+dnl Check whether a typedef exists and create a #define $2 if it exists
+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>], [
+ #undef $1
+ int a = sizeof($1);
+ ], 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)
+ fi
+ ])