1 dnl $Id: have-type.m4,v 1.5 1999/12/31 03:10:22 assar Exp $
3 dnl check for existance of a type
5 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
6 AC_DEFUN(AC_HAVE_TYPE, [
7 AC_REQUIRE([AC_HEADER_STDC])
8 cv=`echo "$1" | sed 'y%./+- %__p__%'`
9 AC_MSG_CHECKING(for $1)
10 AC_CACHE_VAL([ac_cv_type_$cv],
12 [#include <sys/types.h>
19 eval "ac_cv_type_$cv=yes",
20 eval "ac_cv_type_$cv=no"))dnl
21 AC_MSG_RESULT(`eval echo \\$ac_cv_type_$cv`)
22 if test `eval echo \\$ac_cv_type_$cv` = yes; then
23 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
24 dnl autoheader tricks *sigh*
25 define(foo,translit($1, [ ], [_]))
27 @@@funcs="$funcs foo"@@@
30 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)