Merge from vendor branch OPENSSL:
[dragonfly.git] / crypto / heimdal / cf / broken2.m4
1 dnl $Id: broken2.m4,v 1.4 2002/05/19 22:16:46 joda Exp $
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_TRY_LINK([$2],
10 [
11 /* The GNU C library defines this for functions which it implements
12     to always fail with ENOSYS.  Some functions are actually named
13     something starting with __ and the normal name is an alias.  */
14 #if defined (__stub_$1) || defined (__stub___$1)
15 choke me
16 #else
17 $1($3)
18 #endif
19 ], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])])
20 if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
21   AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
22   AC_MSG_RESULT(yes)
23 else
24   AC_MSG_RESULT(no)
25   rk_LIBOBJ($1)
26 fi])