diff --git a/acx_python.m4 b/acx_python.m4 index 2940971f1..a84daa035 100644 --- a/acx_python.m4 +++ b/acx_python.m4 @@ -58,6 +58,11 @@ $ac_distutils_result]) AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) + if test -z "$PYTHON_LIBDIR"; then + PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \ + print(get_config_var('LIBDIR'));"` + fi + # # Check for site packages # diff --git a/configure b/configure index 595c156b8..fb1ce374e 100755 --- a/configure +++ b/configure @@ -17329,6 +17329,11 @@ $as_echo_n "checking for Python library path... " >&6; } $as_echo "$PYTHON_LDFLAGS" >&6; } + if test -z "$PYTHON_LIBDIR"; then + PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \ + print(get_config_var('LIBDIR'));"` + fi + # # Check for site packages # @@ -17434,6 +17439,15 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h else CPPFLAGS="$PYTHON_CPPFLAGS" fi + if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then + + if test "x$enable_rpath" = xyes; then + if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then + RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR" + fi + fi + + fi ub_have_python=yes if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5 diff --git a/configure.ac b/configure.ac index e71bc5888..f96a24ef2 100644 --- a/configure.ac +++ b/configure.ac @@ -678,6 +678,9 @@ if test x_$ub_test_python != x_no; then else CPPFLAGS="$PYTHON_CPPFLAGS" fi + if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then + ACX_RUNTIME_PATH_ADD([$PYTHON_LIBDIR]) + fi ub_have_python=yes PKG_CHECK_EXISTS(["python${PY_MAJOR_VERSION}"], [PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"], diff --git a/doc/Changelog b/doc/Changelog index 8125b87ea..796c587e2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +20 April 2020: Wouter + - Fix #222: --with-rpath, fails to rpath python lib. + 17 April 2020: George - Add SNI support on more TLS connections (fixes #193). - Add SNI support to unbound-anchor.