Commit 2d6d4e96 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

dnsapi: Add a configure check for the resolver library and header.

parent 975899aa
......@@ -279,6 +279,43 @@ AC_CHECK_HEADERS(\
)
AC_HEADER_STAT()
dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
[#include <sys/types.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif])
AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif])
AC_CHECK_HEADERS([resolv.h],,,
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#if HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif])
AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
[#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/types.h>
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif])
dnl Check for broken kernel header that doesn't define __user
AC_CHECK_HEADERS([linux/capi.h],,,[#define __user])
......@@ -538,6 +575,15 @@ then
LIBS="$saved_libs"
fi
dnl **** Check for resolver library ***
AC_SUBST(RESOLVLIBS,"")
if test "$ac_cv_header_resolv_h" = "yes"
then
AC_CHECK_LIB(resolv, res_query,
[AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
RESOLVLIBS="-lresolv"])
fi
dnl **** Check for LittleCMS ***
AC_SUBST(LCMSLIBS,"")
if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
......@@ -1215,42 +1261,6 @@ AC_CHECK_FUNCS(\
waitpid \
)
dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
[#include <sys/types.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif])
AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif])
AC_CHECK_HEADERS([resolv.h],,,
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#if HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif])
AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
[#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/types.h>
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif])
dnl **** Check for types ****
......
......@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = dnsapi.dll
IMPORTLIB = libdnsapi.$(IMPLIBEXT)
IMPORTS = kernel32
EXTRALIBS = $(LIBUNICODE)
EXTRALIBS = $(LIBUNICODE) @RESOLVLIBS@
C_SRCS = \
main.c \
......
......@@ -524,6 +524,9 @@
/* Define to 1 if the system has the type `request_sense'. */
#undef HAVE_REQUEST_SENSE
/* Define if you have the resolver library and header */
#undef HAVE_RESOLV
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
......
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