1135446Strhodesdnl $Id: proto-compat.m4 14166 2004-08-26 12:35:42Z joda $ 2193149Sdougbdnl 3135446Strhodesdnl 4193149Sdougbdnl Check if the prototype of a function is compatible with another one 5193149Sdougbdnl 6193149Sdougb 7193149Sdougbdnl AC_PROTO_COMPAT(includes, function, prototype) 8193149Sdougb 9193149SdougbAC_DEFUN([AC_PROTO_COMPAT], [ 10193149SdougbAC_CACHE_CHECK([if $2 is compatible with system prototype], 11193149Sdougbac_cv_func_$2_proto_compat, 12193149SdougbAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],[[$3]])], 13193149Sdougb[eval "ac_cv_func_$2_proto_compat=yes"], 14193149Sdougb[eval "ac_cv_func_$2_proto_compat=no"])) 15193149Sdougbdefine([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE]) 16193149Sdougbif test "$ac_cv_func_$2_proto_compat" = yes; then 17135446Strhodes AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with 18135446Strhodes $3]) 19193149Sdougbfi 20135446Strhodesundefine([foo]) 21135446Strhodes])