No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / cf / have-type.m4
blobf91a6d1b4f1a57f290508bcffdd47e2a15770501
1 dnl $Heimdal: have-type.m4 14166 2004-08-26 12:35:42Z joda $
2 dnl $NetBSD$
3 dnl
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>
14 #if STDC_HEADERS
15 #include <stdlib.h>
16 #include <stddef.h>
17 #endif
18 $2]],
19 [[$1 foo;]])],
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____%'`
26 if false; then
27         AC_CHECK_TYPES($1)
29   AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])