1*ebfedea0SLionel Sambucdnl Id 2*ebfedea0SLionel Sambucdnl 3*ebfedea0SLionel Sambucdnl 4*ebfedea0SLionel Sambucdnl Check if the prototype of a function is compatible with another one 5*ebfedea0SLionel Sambucdnl 6*ebfedea0SLionel Sambuc 7*ebfedea0SLionel Sambucdnl AC_PROTO_COMPAT(includes, function, prototype) 8*ebfedea0SLionel Sambuc 9*ebfedea0SLionel SambucAC_DEFUN([AC_PROTO_COMPAT], [ 10*ebfedea0SLionel SambucAC_CACHE_CHECK([if $2 is compatible with system prototype], 11*ebfedea0SLionel Sambucac_cv_func_$2_proto_compat, 12*ebfedea0SLionel SambucAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],[[$3]])], 13*ebfedea0SLionel Sambuc[eval "ac_cv_func_$2_proto_compat=yes"], 14*ebfedea0SLionel Sambuc[eval "ac_cv_func_$2_proto_compat=no"])) 15*ebfedea0SLionel Sambucdefine([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE]) 16*ebfedea0SLionel Sambucif test "$ac_cv_func_$2_proto_compat" = yes; then 17*ebfedea0SLionel Sambuc AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with 18*ebfedea0SLionel Sambuc $3]) 19*ebfedea0SLionel Sambucfi 20*ebfedea0SLionel Sambucundefine([foo]) 21*ebfedea0SLionel Sambuc])