bpo-43103: Fix build failure with macOS framework builds. (GH-24676)

diff --git a/configure b/configure
index 2d5a61e..acb400f 100755
--- a/configure
+++ b/configure
@@ -17810,7 +17810,7 @@
 fi
 
 LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
-if test "$PY_ENABLE_SHARED" = 1; then
+if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
     LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
     if test "$STATIC_LIBPYTHON" = 1; then
         LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"