--- ./gdb/configure_orig	2022-11-14 12:48:04 +0000
+++ ./gdb/configure	2022-11-14 12:50:00 +0000
@@ -10794,6 +10794,7 @@
       fi
     fi
     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
+    python_libs=`echo $python_libs | /usr/bin/sed 's/Modules\/python.exp/\/opt\/freeware\/lib64\/python3.7\/config-3.7m\/python.exp/g'`
     if test $? != 0; then
       have_python_config=failed
       if test "${with_python}" != auto; then
