@@ -902,23 +902,28 @@ if test "$with_python" = yes; then
902
902
PGAC_PATH_PYTHON
903
903
PGAC_CHECK_PYTHON_EMBED_SETUP
904
904
905
- # We need libpython as a shared library. With Python >=2.5, we check
906
- # the Py_ENABLE_SHARED setting. OS X does supply a .dylib even
907
- # though Py_ENABLE_SHARED does not get set. On Debian, the setting
908
- # is not correct before the jessie release
909
- # (http://bugs.debian.org/695979). We also want to support older
910
- # Python versions. So as a fallback we see if there is a file that
911
- # is named like a shared library.
905
+ # We need libpython as a shared library. With Python >=2.5, we
906
+ # check the Py_ENABLE_SHARED setting. On Debian, the setting is not
907
+ # correct before the jessie release (http://bugs.debian.org/695979).
908
+ # We also want to support older Python versions. So as a fallback
909
+ # we see if there is a file that is named like a shared library.
912
910
913
911
if test "$python_enable_shared" != 1; then
914
- # We don't know the platform shared library extension here yet, so
915
- # we try some candidates.
916
- for dlsuffix in .so .dll .dylib .sl; do
917
- if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
918
- python_enable_shared=1
919
- break
920
- fi
921
- done
912
+ # OS X does supply a .dylib even though Py_ENABLE_SHARED does not
913
+ # get set. The file detection logic below doesn't succeed on
914
+ # older OS X versions, so make it explicit.
915
+ if test "$PORTNAME" = darwin; then
916
+ python_enable_shared=1
917
+ else
918
+ # We don't know the platform shared library extension here yet,
919
+ # so we try some candidates.
920
+ for dlsuffix in .so .dll .sl; do
921
+ if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
922
+ python_enable_shared=1
923
+ break
924
+ fi
925
+ done
926
+ fi
922
927
fi
923
928
924
929
if test "$python_enable_shared" != 1; then
0 commit comments