Statistics
| Revision:

root / ac / gnupg-check-typedef.m4 @ 1

History | View | Annotate | Download (530 Bytes)

1
dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME [, COMMENT])
2
dnl Check whether a typedef exists and create a #define $2 if it exists
3
dnl
4
AC_DEFUN(GNUPG_CHECK_TYPEDEF,
5
  [ AC_MSG_CHECKING(for $1 typedef)
6
    AC_CACHE_VAL(gnupg_cv_typedef_$1,
7
    [AC_TRY_COMPILE([#include <stdlib.h>
8
    #include <sys/types.h>], [
9
    #undef $1
10
    int a = sizeof($1);
11
    ], gnupg_cv_typedef_$1=yes, gnupg_cv_typedef_$1=no )])
12
    AC_MSG_RESULT($gnupg_cv_typedef_$1)
13
    if test "$gnupg_cv_typedef_$1" = yes; then
14
        AC_DEFINE($2, 1, $3)
15
    fi
16
  ])