Home | History | Annotate | Line # | Download | only in cf
broken2.m4 revision 1.1.1.2
      1 dnl Id
      2 dnl
      3 dnl AC_BROKEN but with more arguments
      4 
      5 dnl AC_BROKEN2(func, includes, arguments)
      6 AC_DEFUN([AC_BROKEN2],
      7 [AC_MSG_CHECKING([for $1])
      8 AC_CACHE_VAL(ac_cv_func_[]$1,
      9 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[
     10 /* The GNU C library defines this for functions which it implements
     11     to always fail with ENOSYS.  Some functions are actually named
     12     something starting with __ and the normal name is an alias.  */
     13 #if defined (__stub_$1) || defined (__stub___$1)
     14 choke me
     15 #else
     16 $1($3);
     17 #endif
     18 ]])], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])])
     19 if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
     20   AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
     21   AC_MSG_RESULT(yes)
     22 else
     23   AC_MSG_RESULT(no)
     24   rk_LIBOBJ($1)
     25 fi])
     26