proto-compat.m4 revision 55682
1dnl $Id: proto-compat.m4,v 1.3 1999/03/01 13:03:48 joda Exp $
2dnl
3dnl
4dnl Check if the prototype of a function is compatible with another one
5dnl
6
7dnl AC_PROTO_COMPAT(includes, function, prototype)
8
9AC_DEFUN(AC_PROTO_COMPAT, [
10AC_CACHE_CHECK([if $2 is compatible with system prototype],
11ac_cv_func_$2_proto_compat,
12AC_TRY_COMPILE([$1],
13[$3;],
14eval "ac_cv_func_$2_proto_compat=yes",
15eval "ac_cv_func_$2_proto_compat=no"))
16define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
17if test "$ac_cv_func_$2_proto_compat" = yes; then
18	AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
19	$3])
20fi
21undefine([foo])
22])