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