On 10/17/2012 02:15 PM, Sergio Belkin wrote: > Hi folks, > > I've found in AC_SEARCH_LIBS functions ac_lib and ac_res what do they do? They aren't documented in the manual, so you can assume that they are used internally for implementing the actual search, and that you can (and should!) safely ignore them. If you're still more curious than that, then read the source code: ac_lib is the shell variable that loops over the 2nd argument passed to the AC_SEARCH_LIBS macro, and ac_res is the shell variable that tracks which -l library, if any, was needed to make the link succeed. AC_DEFUN([AC_SEARCH_LIBS], [AS_VAR_PUSHDEF([ac_Search], [ac_cv_search_$1])dnl AC_CACHE_CHECK([for library containing $1], [ac_Search], [ac_func_search_save_LIBS=$LIBS AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])]) for ac_lib in '' $2; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS" fi AC_LINK_IFELSE([], [AS_VAR_SET([ac_Search], [$ac_res])]) AS_VAR_SET_IF([ac_Search], [break]) done -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf