From 8a9a4ad14de0d084c0c9a3a8087af775bfde15f6 Mon Sep 17 00:00:00 2001 From: Brad House Date: Sun, 28 Jan 2024 12:38:54 -0500 Subject: [PATCH] attempt to fix pkgconfig on windows for static builds --- ares-cvs | 1 + configure.ac | 2 ++ libcares.pc.in | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 120000 ares-cvs diff --git a/ares-cvs b/ares-cvs new file mode 120000 index 00000000..a4aa4ace --- /dev/null +++ b/ares-cvs @@ -0,0 +1 @@ +ares-cvs \ No newline at end of file diff --git a/configure.ac b/configure.ac index f820d37d..05b6f0f6 100644 --- a/configure.ac +++ b/configure.ac @@ -200,6 +200,7 @@ if test "x$enable_shared" = "xno" -a "x$enable_static" = "xyes" ; then AC_MSG_CHECKING([whether we need CARES_STATICLIB definition]) if test "$ac_cv_native_windows" = "yes" ; then AX_APPEND_FLAG([-DCARES_STATICLIB], [AM_CPPFLAGS]) + PKGCONFIG_CFLAGS="-DCARES_STATLICLIB" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -906,6 +907,7 @@ AM_CONDITIONAL(BUILD_TESTS, test "x$build_tests" = "xyes") AC_SUBST(AM_CFLAGS) AC_SUBST(AM_CPPFLAGS) +AC_SUBST(PKGCONFIG_CFLAGS) AC_SUBST(BUILD_SUBDIRS) AC_CONFIG_FILES([Makefile \ diff --git a/libcares.pc.in b/libcares.pc.in index 54f6d68b..36c7c8cf 100644 --- a/libcares.pc.in +++ b/libcares.pc.in @@ -17,6 +17,6 @@ Description: asynchronous DNS lookup library Version: @VERSION@ Requires: Requires.private: -Cflags: -I${includedir} +Cflags: -I${includedir} @PKGCONFIG_CFLAGS@ Libs: -L${libdir} -lcares Libs.private: @CARES_PRIVATE_LIBS@