configure: Detect resolver functionality on FreeBSD.

Alexandre Julliard julliard at winehq.org
Thu Sep 23 09:07:37 CDT 2010


Tijl Coosemans <tijl at coosemans.org> writes:

> @@ -1270,13 +1270,12 @@ AC_SUBST(RESOLVLIBS,"")
>  if test "$ac_cv_header_resolv_h" = "yes"
>  then
>      ac_save_LIBS="$LIBS"
> -    LIBS="$LIBS -lresolv"
> -    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
> -#include <netinet/in.h>
> -#endif
> -#include <resolv.h>]],[[res_init();]])],
> -        [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
> -         RESOLVLIBS="-lresolv"])
> +    AC_SEARCH_LIBS(res_init, resolv,
> +        AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header]))
> +    case "$ac_cv_search_res_init" in
> +      no*) ;;
> +      *)   RESOLVLIBS="$ac_cv_search_res_init" ;;
> +    esac

This breaks on Linux. res_init() can be a macro.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list