Skip to content

Commit

Permalink
Fix libcares.pc generation for static MingW* cross builds
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed May 25, 2012
1 parent 9bd38a4 commit 1972aad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configure.ac
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libcares.pc.in
Expand Up @@ -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@

0 comments on commit 1972aad

Please sign in to comment.