1 dnl $Heimdal: have-type.m4 14166 2004-08-26 12:35:42Z joda $
4 dnl check for existance of a type
6 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
7 AC_DEFUN([AC_HAVE_TYPE], [
8 AC_REQUIRE([AC_HEADER_STDC])
9 cv=`echo "$1" | sed 'y%./+- %__p__%'`
10 AC_MSG_CHECKING(for $1)
11 AC_CACHE_VAL([ac_cv_type_$cv],
12 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
13 #include <sys/types.h>
20 [eval "ac_cv_type_$cv=yes"],
21 [eval "ac_cv_type_$cv=no"]))dnl
22 ac_foo=`eval echo \\$ac_cv_type_$cv`
23 AC_MSG_RESULT($ac_foo)
24 if test "$ac_foo" = yes; then
25 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
29 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])