mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Refactor DLSUFFIX handling
Move DLSUFFIX from makefiles into header files for all platforms. Move the DLSUFFIX assignment from src/makefiles/ to src/templates/, have configure read it, and then substitute it into Makefile.global and pg_config.h. This avoids the need for all makefile rules that need it to locally set CPPFLAGS. It also resolves an inconsistent setup between the two Windows build systems. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/2f9861fb-8969-9005-7518-b8e60f2bead9@enterprisedb.com
This commit is contained in:
14
configure
vendored
14
configure
vendored
@ -734,6 +734,7 @@ autodepend
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
DLSUFFIX
|
||||
TAS
|
||||
GCC
|
||||
CPP
|
||||
@ -3033,6 +3034,9 @@ PORTNAME=$template
|
||||
need_tas=no
|
||||
tas_file=dummy.s
|
||||
|
||||
# Default, works for most platforms, override in template file if needed
|
||||
DLSUFFIX=".so"
|
||||
|
||||
|
||||
|
||||
##
|
||||
@ -7688,6 +7692,12 @@ else
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DLSUFFIX "$DLSUFFIX"
|
||||
_ACEOF
|
||||
|
||||
|
||||
#
|
||||
# Set up pkg_config in case we need it below
|
||||
#
|
||||
@ -10560,7 +10570,9 @@ else
|
||||
found_shlib=0
|
||||
for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
|
||||
do
|
||||
# We don't know the platform DLSUFFIX here, so check 'em all.
|
||||
# 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"
|
||||
|
Reference in New Issue
Block a user