4 dnl Look for function in any of the specified libraries
7 dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
8 AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
10 AC_MSG_CHECKING([for $1])
11 AC_CACHE_VAL(ac_cv_funclib_$1,
13 if eval "test \"\$ac_cv_func_$1\" != yes" ; then
21 *) ac_lib="-l$ac_lib" ;;
23 LIBS="$6 $ac_lib $5 $ac_save_LIBS"
24 AC_LINK_IFELSE([AC_LANG_PROGRAM([[char $1 (void);]],[[$1()]])],[eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break])
26 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
31 eval "ac_res=\$ac_cv_funclib_$1"
35 dnl AC_CHECK_LIBS($2, foo)
38 eval "ac_tr_func=HAVE_[]upcase($1)"
39 eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
44 eval "ac_cv_func_$1=yes"
46 AC_DEFINE_UNQUOTED($ac_tr_func)
50 eval "ac_cv_func_$1=no"
55 eval "ac_cv_func_$1=yes"
56 AC_DEFINE_UNQUOTED($ac_tr_func)
57 AC_DEFINE_UNQUOTED($ac_tr_lib)
58 AC_MSG_RESULT([yes, in $ac_res])