source: heimdal/trunk/cf/proto-compat.m4@ 4

Last change on this file since 4 was 1, checked in by Paul Smedley, 10 years ago

Initial commit of Heimdal 1.5.3

File size: 601 bytes
Line 
1dnl $Id$
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_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],[[$3]])],
13[eval "ac_cv_func_$2_proto_compat=yes"],
14[eval "ac_cv_func_$2_proto_compat=no"]))
15define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
16if test "$ac_cv_func_$2_proto_compat" = yes; then
17 AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
18 $3])
19fi
20undefine([foo])
21])
Note: See TracBrowser for help on using the repository browser.