From 4c3586560fe91ad16bb665f490e51afb1a8f10d6 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 15 Dec 2000 14:27:33 +0000 Subject: [PATCH] new variant of broken with includes and arguments git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9396 ec53bebd-3082-4978-b11e-865c3cabbd6b --- cf/broken2.m4 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cf/broken2.m4 diff --git a/cf/broken2.m4 b/cf/broken2.m4 new file mode 100644 index 000000000..425e6524e --- /dev/null +++ b/cf/broken2.m4 @@ -0,0 +1,35 @@ +dnl $Id$ +dnl +dnl AC_BROKEN but with more arguments + +dnl AC_BROKEN2(func, includes, arguments) +AC_DEFUN(AC_BROKEN2, +[for ac_func in $1 +do +AC_MSG_CHECKING([for $ac_func]) +AC_CACHE_VAL(ac_cv_func_$ac_func, +[AC_TRY_LINK([$2], +[ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$1) || defined (__stub___$1) +choke me +#else +$ac_func($3) +#endif +], [eval "ac_cv_func_$ac_func=yes"], [eval "ac_cv_func_$ac_func=no"])]) +if eval "test \"\${ac_cv_func_$ac_func}\" = yes"; then + ac_tr_func=HAVE_[]upcase($ac_func) + AC_DEFINE_UNQUOTED($ac_tr_func) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + LIBOBJS[]="$LIBOBJS ${ac_func}.o" +fi +done +if false; then + AC_CHECK_FUNCS($1) +fi +AC_SUBST(LIBOBJS)dnl +])