Commit e7ec1645 authored by Tijl Coosemans's avatar Tijl Coosemans Committed by Alexandre Julliard

configure: Detect resolver functionality on FreeBSD.

On FreeBSD this is part of libc.
parent 07898fe2
......@@ -9977,12 +9977,12 @@ esac
fi
RESOLVLIBS=""
if test "$ac_cv_header_resolv_h" = "yes"
then
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lresolv"
for lib in '' -lresolv
do
LIBS="$lib $ac_save_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_NETINET_IN_H
......@@ -9992,7 +9992,7 @@ then
int
main ()
{
res_init();
res_query("foo",ns_c_in,0,0,0);
;
return 0;
}
......@@ -10001,10 +10001,15 @@ if ac_fn_c_try_link "$LINENO"; then :
$as_echo "#define HAVE_RESOLV 1" >>confdefs.h
RESOLVLIBS="-lresolv"
RESOLVLIBS="$lib"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "${RESOLVLIBS+set}" = set; then
break
fi
done
LIBS="$ac_save_LIBS"
fi
......
......@@ -1266,17 +1266,22 @@ WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],
dnl **** Check for resolver library ***
AC_SUBST(RESOLVLIBS,"")
if test "$ac_cv_header_resolv_h" = "yes"
then
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lresolv"
for lib in '' -lresolv
do
LIBS="$lib $ac_save_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <resolv.h>]],[[res_init();]])],
#include <resolv.h>]],[[res_query("foo",ns_c_in,0,0,0);]])],
[AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
RESOLVLIBS="-lresolv"])
AC_SUBST(RESOLVLIBS,"$lib")])
if test "${RESOLVLIBS+set}" = set; then
break
fi
done
LIBS="$ac_save_LIBS"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment