summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rwxr-xr-xpump.in3
2 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index b3589f4..cf76dbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,19 +221,25 @@ AC_ARG_VAR(PYTHON, [Python interpreter])
if ! "$PYTHON" -V 2>&1 | grep "^Python" >/dev/null; then
TEST_PYTHON=""
INCLUDESERVER_PYTHON=""
+ PYTHON_RELATIVE_LIB=""
elif "$PYTHON" -V 2>&1 | grep "^Python 2.1" >/dev/null; then
TEST_PYTHON=""
INCLUDESERVER_PYTHON=""
+ PYTHON_RELATIVE_LIB=""
elif "$PYTHON" -V 2>&1 | grep "^Python 2.[[23]]" >/dev/null; then
TEST_PYTHON="$PYTHON"
INCLUDESERVER_PYTHON=""
+ PYTHON_RELATIVE_LIB=""
else
TEST_PYTHON="$PYTHON"
INCLUDESERVER_PYTHON="$PYTHON"
+ PYTHON_RELATIVE_LIB=`"$PYTHON" -c \
+ "import distutils.sysconfig;\
+ print distutils.sysconfig.get_python_lib(prefix=\"\")"`
fi
AC_SUBST(TEST_PYTHON)
AC_SUBST(INCLUDESERVER_PYTHON)
-
+AC_SUBST(PYTHON_RELATIVE_LIB)
AC_C_INLINE
AC_C_BIGENDIAN
diff --git a/pump.in b/pump.in
index 375e3aa..8249079 100755
--- a/pump.in
+++ b/pump.in
@@ -12,6 +12,7 @@
# TODO(klarlund): Rid this script of bash-isms.
PYTHON=@PYTHON@
+PYTHON_RELATIVE_LIB=@PYTHON_RELATIVE_LIB@
usage_string=\
'Usage:
@@ -127,7 +128,7 @@ Initialize() {
# set when the 'pump' script is made from 'pump.in'. Use this value in the
# formation of the relative path that takes us from the 'bin' directory of an
# installation to the 'include_server' directory.
- include_server_relative="../lib/$(basename $PYTHON)/site-packages/include_server"
+ include_server_relative="../$PYTHON_RELATIVE_LIB/include_server"
# We use a little heuristic to determine whether this pump script is part of
# an installation. Specifically, we check whether we're a bin directory, and