This commit was manufactured by cvs2svn to create tag
[heimdal.git] / cf / proto-compat.m4
blobd30d5893d3f18ecba3032581f638cd7381fc572d
1 dnl $Id$
2 dnl
3 dnl
4 dnl Check if the prototype of a function is compatible with another one
5 dnl
7 dnl AC_PROTO_COMPAT(includes, function, prototype)
9 AC_DEFUN([AC_PROTO_COMPAT], [
10 AC_CACHE_CHECK([if $2 is compatible with system prototype],
11 ac_cv_func_$2_proto_compat,
12 AC_TRY_COMPILE([$1],
13 [$3;],
14 eval "ac_cv_func_$2_proto_compat=yes",
15 eval "ac_cv_func_$2_proto_compat=no"))
16 define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
17 if test "$ac_cv_func_$2_proto_compat" = yes; then
18         AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
19         $3])
21 undefine([foo])