xref: /minix3/crypto/external/bsd/heimdal/dist/cf/broken2.m4 (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambucdnl Id
2*ebfedea0SLionel Sambucdnl
3*ebfedea0SLionel Sambucdnl AC_BROKEN but with more arguments
4*ebfedea0SLionel Sambuc
5*ebfedea0SLionel Sambucdnl AC_BROKEN2(func, includes, arguments)
6*ebfedea0SLionel SambucAC_DEFUN([AC_BROKEN2],
7*ebfedea0SLionel Sambuc[AC_MSG_CHECKING([for $1])
8*ebfedea0SLionel SambucAC_CACHE_VAL(ac_cv_func_[]$1,
9*ebfedea0SLionel Sambuc[AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[
10*ebfedea0SLionel Sambuc/* The GNU C library defines this for functions which it implements
11*ebfedea0SLionel Sambuc    to always fail with ENOSYS.  Some functions are actually named
12*ebfedea0SLionel Sambuc    something starting with __ and the normal name is an alias.  */
13*ebfedea0SLionel Sambuc#if defined (__stub_$1) || defined (__stub___$1)
14*ebfedea0SLionel Sambucchoke me
15*ebfedea0SLionel Sambuc#else
16*ebfedea0SLionel Sambuc$1($3);
17*ebfedea0SLionel Sambuc#endif
18*ebfedea0SLionel Sambuc]])], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])])
19*ebfedea0SLionel Sambucif eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
20*ebfedea0SLionel Sambuc  AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
21*ebfedea0SLionel Sambuc  AC_MSG_RESULT(yes)
22*ebfedea0SLionel Sambucelse
23*ebfedea0SLionel Sambuc  AC_MSG_RESULT(no)
24*ebfedea0SLionel Sambuc  rk_LIBOBJ($1)
25*ebfedea0SLionel Sambucfi])
26