summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Eriksson <jonas.eriksson@enea.com>2014-03-06 09:13:17 +0100
committerDaniel Veillard <veillard@redhat.com>2014-06-10 14:44:03 +0800
commitfcb1bb56ff21c6fe5c1dfd49b99445f6128b94e4 (patch)
treec78cc6c2fcc6af904ba80fffc0616438253ee482
parentacace88c4ab87fb2cdd811b0f1b5e73f3d2a1b0e (diff)
downloadlibxml2-fcb1bb56ff21c6fe5c1dfd49b99445f6128b94e4.tar.gz
configure: Add --with-python-install-dir
Cross-compiling the python bindings is a bit difficult today, as the configure script will figure out the site packages dir (PYTHON_SITE_PACKAGES) by either: - Generating the path to the site-package target directories using libdir, and see if it exists. As it is not possible to point to the full path of the sysroot, since that will yield the wrong install path, and that the directory does not neccessarily exist on the host, this approach will not work. - Fetch the site packages dir from the python interpreter as pointed to by --with-python. Since this python interpreter will point to the sysroot, the install dir generated will be inside the sysroot and thus not work. This patch approaches the problem by adding the possibility of explicitly stating the install dir of the python packages, leaving it up to the cross-compilation environment to specify it. The patch does not affect the default case (non-cross compilation). Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
-rw-r--r--configure.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index ecaa403b..21ad1e7d 100644
--- a/configure.in
+++ b/configure.in
@@ -148,6 +148,9 @@ AC_ARG_WITH(push,
[ --with-push add the PUSH parser interfaces (on)])
AC_ARG_WITH(python,
[ --with-python[[=DIR]] build Python bindings if found])
+AC_ARG_WITH(python_install_dir,
+[ --with-python-install-dir=DIR
+ install Python bindings in DIR])
AC_ARG_WITH(reader,
[ --with-reader add the xmlReader parsing interface (on)])
AC_ARG_WITH(readline,
@@ -866,6 +869,10 @@ if test "$with_python" != "no" ; then
fi
fi
fi
+ if test "$with_python_install_dir" != ""
+ then
+ PYTHON_SITE_PACKAGES="$with_python_install_dir"
+ fi
if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
then
if test -d $libdir/python$PYTHON_VERSION/site-packages