summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-03-17 08:23:13 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-03-17 08:23:13 +0000
commit06364ae74981795abe35f85e0acd8f37e055be90 (patch)
treefecd1799f8fb860ecc8b3879df55541583643433 /configure.ac
parentbb5cd94cad82ff3f5d7643f4df563707d98e8a16 (diff)
parent40f711d11e0c5cbcb59d82aa7d7d0073501f7e8a (diff)
downloadswig-06364ae74981795abe35f85e0acd8f37e055be90.tar.gz
Merge remote-tracking branch 'wsfulton/appveyor-vs2022'
* wsfulton/appveyor-vs2022: Cygwin testing - test python3 (3.9) instead of python-2.7 Last resort to use /usr/lib in python linking mingw - install python from pacman Fix detection of python .lib file for 2 digits in minor version cpp11_result_of testcase and result_of deprecation in c++17 Testcase correction for using declaration and members Fix compiler warning using Java std::wstring Appveyor changes to use Visual Studio 2022 image
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 640c4de0f..a7f41a3ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ else
AC_MSG_CHECKING(for Python library directory)
if test -d $PYPREFIX/libs; then
PYLIB=$PYPREFIX/libs
- PYLINKFILE=`ls $PYLIB/python*.lib | grep "python[[0-9]][[0-9]]\.lib"`
+ PYLINKFILE=`ls $PYLIB/python*.lib | grep "python[[0-9]][[0-9]]\+\.lib"`
if test -r "$PYLINKFILE"; then
PYLINK=-l`basename $PYLINKFILE | sed -e 's/\.lib$//'`
else
@@ -864,7 +864,7 @@ else
AC_MSG_CHECKING(for Python 3.x library directory)
if test -d $PY3PREFIX/libs; then
PY3LIB=$PY3PREFIX/libs
- PY3LINKFILE=`ls $PY3LIB/python*.lib | grep "python[[0-9]][[0-9]]\.lib"`
+ PY3LINKFILE=`ls $PY3LIB/python*.lib | grep "python[[0-9]][[0-9]]\+\.lib"`
if test -r "$PY3LINKFILE"; then
PY3LINK=-l`basename $PY3LINKFILE | sed -e 's/\.lib$//'`
else
@@ -927,6 +927,12 @@ else
fi
done
if test -z "$PY3LIB"; then
+ # Last resort
+ if test -d $PY3EPREFIX/$PY3LIBDIR; then
+ PY3LIB="$PY3EPREFIX/$PY3LIBDIR"
+ fi
+ fi
+ if test -z "$PY3LIB"; then
AC_MSG_RESULT([Not found])
else
AC_MSG_RESULT($PY3LIB)
@@ -946,6 +952,7 @@ else
# Cygwin (Windows) needs the library for dynamic linking
case $host in
*-*-cygwin* | *-*-mingw*)
+ # PYTHON3DYNAMICLINKING ought to be replaced by $PY3CONFIG --ldflags
PYTHON3DYNAMICLINKING="-L$PY3LIB $PY3LINK"
DEFS="-DUSE_DL_IMPORT $DEFS"
;;