This is an automated email from the ASF dual-hosted git repository. tuhaihe pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 64ca20e30cf1d2a657c13ec243d5301007289655 Author: Dianjin Wang <[email protected]> AuthorDate: Wed Aug 19 19:03:43 2026 +0800 config/python.m4: add Darwin .dylib fallback to Python shlib probe Commit de0e7a5b8d9 ("macOS: pin DLSUFFIX=.so for PG 16 compatibility") added a .dylib fallback to the Python shared-library probe directly in the generated configure, but did not make the matching change in config/python.m4. The two files thus diverged, and regenerating configure from configure.ac would silently drop the macOS fix. Port the same change into config/python.m4 so the source and the generated configure stay in sync. --- config/python.m4 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/config/python.m4 b/config/python.m4 index b295ad3d3a4..69d3a78de86 100644 --- a/config/python.m4 +++ b/config/python.m4 @@ -118,13 +118,24 @@ else fi # Search for a likely-looking file. found_shlib=0 + # On Darwin, Python ships its shared lib as .dylib regardless of + # what DLSUFFIX is set to for modules. Try .dylib in addition to + # the configured DLSUFFIX so this check still finds libpython. + if test "$PORTNAME" = darwin; then + python_shlib_suffixes="$DLSUFFIX .dylib" + else + python_shlib_suffixes="$DLSUFFIX" + fi for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib do - if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then - python_libdir="$d" - found_shlib=1 - break 2 - fi + for s in $python_shlib_suffixes + do + if test -e "$d/lib${ldlibrary}${s}"; then + python_libdir="$d" + found_shlib=1 + break 3 + fi + done done # Some platforms (OpenBSD) require us to accept a bare versioned shlib # (".so.n.n") as well. However, check this only after failing to find --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
