From b55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 6 Jul 2022 07:30:16 +0200 Subject: Unify DLSUFFIX on Darwin macOS has traditionally used extension .dylib for shared libraries (used at build time) and .so for dynamically loaded modules (used by dlopen()). This complicates the build system a bit. Also, Meson uses .dylib for both, so it would be worth unifying this in order to be able to get equal build output. There doesn't appear to be any reason to use any particular extension for dlopened modules, since dlopen() will accept anything and PostgreSQL is well-factored to be able to deal with any extension. Other software packages that I have handy appear to be about 50/50 split on which extension they use for their plugins. So it seems possible to change this safely. Discussion: https://www.postgresql.org/message-id/flat/bcc45f78-e3c3-8fb3-7c42-5371b48b5266%40enterprisedb.com --- configure | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fb07cd27d99..da177403ef2 100755 --- a/configure +++ b/configure @@ -10570,16 +10570,11 @@ else found_shlib=0 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib do - # Note: DLSUFFIX is for loadable modules, not shared - # libraries, so cannot be used here portably. Just - # check all known possibilities. - for e in .so .dll .dylib .sl; do - if test -e "$d/lib${ldlibrary}$e"; then - python_libdir="$d" - found_shlib=1 - break 2 - fi - done + if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then + python_libdir="$d" + found_shlib=1 + break 2 + fi 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 -- cgit v1.2.3