From f50419ac79ae94969e43d5bd1c6eb2ed63767099 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 11 Sep 2025 18:10:59 +0200
Subject: [PATCH 177/N] Work around broken pc file

https://github.com/python/cpython/issues/138800
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 4745388..62a9dcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6748,6 +6748,10 @@ LIBPYTHON=''
 if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin" || test "$MACHDEP" = "win32"); then
   MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
   LIBPYTHON="\$(BLDLIBRARY)"
+  LIBPYTHON="$BLDLIBRARY"
+  LIBPYTHON=$(echo "$LIBPYTHON" | sed "s/\$(LDVERSION)/$LDVERSION/g")
+  LIBPYTHON=$(echo "$LIBPYTHON" | sed "s/\$(VERSION)/$VERSION/g")
+  LIBPYTHON=$(echo "$LIBPYTHON" | sed "s/\$(ABIFLAGS)/$ABIFLAGS/g")
 fi
 
 # On iOS the shared libraries must be linked with the Python framework
