This commit was manufactured by cvs2svn to create tag
[heimdal.git] / cf / broken2.m4
blob425e6524ef9d17057a966b1b378a69def3fc01a3
1 dnl $Id$
2 dnl
3 dnl AC_BROKEN but with more arguments
5 dnl AC_BROKEN2(func, includes, arguments)
6 AC_DEFUN(AC_BROKEN2,
7 [for ac_func in $1
8 do
9 AC_MSG_CHECKING([for $ac_func])
10 AC_CACHE_VAL(ac_cv_func_$ac_func,
11 [AC_TRY_LINK([$2],
13 /* The GNU C library defines this for functions which it implements
14     to always fail with ENOSYS.  Some functions are actually named
15     something starting with __ and the normal name is an alias.  */
16 #if defined (__stub_$1) || defined (__stub___$1)
17 choke me
18 #else
19 $ac_func($3)
20 #endif
21 ], [eval "ac_cv_func_$ac_func=yes"], [eval "ac_cv_func_$ac_func=no"])])
22 if eval "test \"\${ac_cv_func_$ac_func}\" = yes"; then
23   ac_tr_func=HAVE_[]upcase($ac_func)
24   AC_DEFINE_UNQUOTED($ac_tr_func)
25   AC_MSG_RESULT(yes)
26 else
27   AC_MSG_RESULT(no)
28   LIBOBJS[]="$LIBOBJS ${ac_func}.o"
30 done
31 if false; then
32         AC_CHECK_FUNCS($1)
34 AC_SUBST(LIBOBJS)dnl