From 1972aad19ef2c78498cb5f08ec99f2c35779731d Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 25 May 2012 23:59:28 +0200 Subject: [PATCH] Fix libcares.pc generation for static MingW* cross builds --- configure.ac | 3 +++ libcares.pc.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2794cca..f220b43 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,7 @@ AC_PROG_LIBTOOL AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY]) use_cppflag_cares_building_library="no" use_cppflag_cares_staticlib="no" +CPPFLAG_CARES_STATICLIB="" case $host in *-*-mingw*) AC_MSG_RESULT(yes) @@ -139,6 +140,7 @@ case $host in then AC_MSG_RESULT(yes) use_cppflag_cares_staticlib="yes" + CPPFLAG_CARES_STATICLIB="-DCARES_STATICLIB" else AC_MSG_RESULT(no) fi @@ -149,6 +151,7 @@ case $host in esac AM_CONDITIONAL(USE_CPPFLAG_CARES_BUILDING_LIBRARY, test x$use_cppflag_cares_building_library = xyes) AM_CONDITIONAL(USE_CPPFLAG_CARES_STATICLIB, test x$use_cppflag_cares_staticlib = xyes) +AC_SUBST(CPPFLAG_CARES_STATICLIB) dnl ********************************************************************** dnl platform/compiler/architecture specific checks/flags diff --git a/libcares.pc.in b/libcares.pc.in index 42672bd..e757c1b 100644 --- a/libcares.pc.in +++ b/libcares.pc.in @@ -15,6 +15,6 @@ Description: asynchronous DNS lookup library Version: @VERSION@ Requires: Requires.private: -Cflags: -I${includedir} +Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ Libs: -L${libdir} -lcares Libs.private: @CARES_PRIVATE_LIBS@ -- 2.7.4