/crypto/heimdal/cf/broken2.m4

https://bitbucket.org/freebsd/freebsd-head/ · m4 · 25 lines · 21 code · 1 blank · 3 comment · 0 complexity · c954f77a23b7059d80f35aef5b160717 MD5 · raw file

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