mirror of
https://github.com/postgres/postgres.git
synced 2025-06-07 11:02:12 +03:00
Fix shared libpython detection on OS X
Apparently, looking for an appropriately named file doesn't work on some older versions, so put the back the explicit platform detection.
This commit is contained in:
parent
0fd764647a
commit
010aa420b9
35
configure
vendored
35
configure
vendored
@ -7542,23 +7542,28 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# We need libpython as a shared library. With Python >=2.5, we check
|
# We need libpython as a shared library. With Python >=2.5, we
|
||||||
# the Py_ENABLE_SHARED setting. OS X does supply a .dylib even
|
# check the Py_ENABLE_SHARED setting. On Debian, the setting is not
|
||||||
# though Py_ENABLE_SHARED does not get set. On Debian, the setting
|
# correct before the jessie release (http://bugs.debian.org/695979).
|
||||||
# is not correct before the jessie release
|
# We also want to support older Python versions. So as a fallback
|
||||||
# (http://bugs.debian.org/695979). We also want to support older
|
# we see if there is a file that is named like a shared library.
|
||||||
# Python versions. So as a fallback we see if there is a file that
|
|
||||||
# is named like a shared library.
|
|
||||||
|
|
||||||
if test "$python_enable_shared" != 1; then
|
if test "$python_enable_shared" != 1; then
|
||||||
# We don't know the platform shared library extension here yet, so
|
# OS X does supply a .dylib even though Py_ENABLE_SHARED does not
|
||||||
# we try some candidates.
|
# get set. The file detection logic below doesn't succeed on
|
||||||
for dlsuffix in .so .dll .dylib .sl; do
|
# older OS X versions, so make it explicit.
|
||||||
if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
|
if test "$PORTNAME" = darwin; then
|
||||||
python_enable_shared=1
|
python_enable_shared=1
|
||||||
break
|
else
|
||||||
fi
|
# We don't know the platform shared library extension here yet,
|
||||||
done
|
# so we try some candidates.
|
||||||
|
for dlsuffix in .so .dll .sl; do
|
||||||
|
if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
|
||||||
|
python_enable_shared=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$python_enable_shared" != 1; then
|
if test "$python_enable_shared" != 1; then
|
||||||
|
35
configure.in
35
configure.in
@ -902,23 +902,28 @@ if test "$with_python" = yes; then
|
|||||||
PGAC_PATH_PYTHON
|
PGAC_PATH_PYTHON
|
||||||
PGAC_CHECK_PYTHON_EMBED_SETUP
|
PGAC_CHECK_PYTHON_EMBED_SETUP
|
||||||
|
|
||||||
# We need libpython as a shared library. With Python >=2.5, we check
|
# We need libpython as a shared library. With Python >=2.5, we
|
||||||
# the Py_ENABLE_SHARED setting. OS X does supply a .dylib even
|
# check the Py_ENABLE_SHARED setting. On Debian, the setting is not
|
||||||
# though Py_ENABLE_SHARED does not get set. On Debian, the setting
|
# correct before the jessie release (http://bugs.debian.org/695979).
|
||||||
# is not correct before the jessie release
|
# We also want to support older Python versions. So as a fallback
|
||||||
# (http://bugs.debian.org/695979). We also want to support older
|
# we see if there is a file that is named like a shared library.
|
||||||
# Python versions. So as a fallback we see if there is a file that
|
|
||||||
# is named like a shared library.
|
|
||||||
|
|
||||||
if test "$python_enable_shared" != 1; then
|
if test "$python_enable_shared" != 1; then
|
||||||
# We don't know the platform shared library extension here yet, so
|
# OS X does supply a .dylib even though Py_ENABLE_SHARED does not
|
||||||
# we try some candidates.
|
# get set. The file detection logic below doesn't succeed on
|
||||||
for dlsuffix in .so .dll .dylib .sl; do
|
# older OS X versions, so make it explicit.
|
||||||
if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
|
if test "$PORTNAME" = darwin; then
|
||||||
python_enable_shared=1
|
python_enable_shared=1
|
||||||
break
|
else
|
||||||
fi
|
# We don't know the platform shared library extension here yet,
|
||||||
done
|
# so we try some candidates.
|
||||||
|
for dlsuffix in .so .dll .sl; do
|
||||||
|
if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
|
||||||
|
python_enable_shared=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$python_enable_shared" != 1; then
|
if test "$python_enable_shared" != 1; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user