Mention more NEWS items.
[rsync.git] / m4 / have_type.m4
blob704ca33b5d7cd8668da48f0b265338445819b04d
1 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
2 AC_DEFUN([AC_HAVE_TYPE], [
3 AC_REQUIRE([AC_HEADER_STDC])
4 cv=`echo "$1" | sed 'y%./+- %__p__%'`
5 AC_MSG_CHECKING(for $1)
6 AC_CACHE_VAL([ac_cv_type_$cv],
7 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8 AC_INCLUDES_DEFAULT
9 $2]],
10 [[$1 foo;]])],
11 [eval "ac_cv_type_$cv=yes"],
12 [eval "ac_cv_type_$cv=no"]))dnl
13 ac_foo=`eval echo \\$ac_cv_type_$cv`
14 AC_MSG_RESULT($ac_foo)
15 if test "$ac_foo" = yes; then
16   ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
17 if false; then
18         AC_CHECK_TYPES($1)
20   AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])