Home | History | Annotate | Line # | Download | only in cf
      1  1.1.1.2     elric dnl Id
      2      1.1     elric dnl
      3      1.1     elric dnl
      4      1.1     elric dnl Check if the prototype of a function is compatible with another one
      5      1.1     elric dnl
      6      1.1     elric 
      7      1.1     elric dnl AC_PROTO_COMPAT(includes, function, prototype)
      8      1.1     elric 
      9      1.1     elric AC_DEFUN([AC_PROTO_COMPAT], [
     10      1.1     elric AC_CACHE_CHECK([if $2 is compatible with system prototype],
     11      1.1     elric ac_cv_func_$2_proto_compat,
     12      1.1     elric AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],[[$3]])],
     13      1.1     elric [eval "ac_cv_func_$2_proto_compat=yes"],
     14      1.1     elric [eval "ac_cv_func_$2_proto_compat=no"]))
     15      1.1     elric define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
     16      1.1     elric if test "$ac_cv_func_$2_proto_compat" = yes; then
     17      1.1     elric 	AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
     18      1.1     elric 	$3])
     19      1.1     elric fi
     20      1.1     elric undefine([foo])
     21  1.1.1.4  christos ])