← Back to team overview

ecryptfs-devel team mailing list archive

[PATCH] Correctly detect Python version for pywrap

 

The configure script fails if the installed Python version is less
than 2.5. This patch allows the configure script to detect the version
of Python installed and decide if pywrap should be enabled, without
causing the configure script to exit with an error.

Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxxxxxxx>
---
 configure.ac |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 389aeda..202f3b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,11 +17,7 @@ AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
 AC_CONFIG_SRCDIR([src/libecryptfs])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
-
 AC_DISABLE_STATIC
-AM_PATH_PYTHON(2.5)
-AC_PROG_SWIG(1.3.31)
-SWIG_PYTHON
 
 LIBECRYPTFS_LT_CURRENT="0"
 LIBECRYPTFS_LT_REVISION="0"
@@ -233,15 +229,13 @@ CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"
 AC_CHECK_HEADER([openssl/rsa.h],, [have_openssl="no"])
 CFLAGS="${OLD_CFLAGS}"
 
-have_python="no"
-have_swig="no"
-
-if test "x${PYTHON_VERSION}" != "x" ; then
-   have_python="yes"
-fi
-
+AM_PATH_PYTHON([2.5], [have_python="yes"], [have_python="no"])
+AC_PROG_SWIG(1.3.31)
+SWIG_PYTHON
 if test "x${SWIG}" != "x" ; then
    have_swig="yes"
+else
+   have_swig="no"
 fi
 
 if test "${enable_pywrap}" = "detect" ; then
-- 
1.6.0