summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-06-09 09:01:13 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-06-20 18:08:23 +0200
commitb80e8b76ad377c24865bb2eb5931893279f1f042 (patch)
treed419958e60eaf79973de47f05d1f666b1be50349
parent7ecb5aea65cb1899f16e7a41bffa93d074defd4a (diff)
downloadsssd-b80e8b76ad377c24865bb2eb5931893279f1f042.tar.gz
sssd-b80e8b76ad377c24865bb2eb5931893279f1f042.tar.xz
sssd-b80e8b76ad377c24865bb2eb5931893279f1f042.zip
CONFIGURE: Prefer python2
The configure script failed with python3 checking for python... /usr/bin/python checking for python version... 3.3 checking for python platform... linux checking for python script directory... ${prefix}/lib/python3.3/site-packages checking for python extension module directory... ${exec_prefix}/lib64/python3.3/site-packages checking for headers required to compile python extensions... File "<string>", line 1 import sys; print sys.prefix ^ SyntaxError: invalid syntax File "<string>", line 1 import sys; print sys.exec_prefix ^ SyntaxError: invalid syntax not found configure: error: Could not find python headers Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Reichl <preichl@redhat.com>
-rw-r--r--configure.ac1
-rw-r--r--src/external/python.m42
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d603cda1a..dcf2494de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,7 @@ AM_CONDITIONAL([HAVE_MANPAGES], [test "x$HAVE_MANPAGES" != "x"])
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
if test x$HAVE_PYTHON_BINDINGS != x; then
+ PYTHON=python2
AM_PATH_PYTHON([2.4])
AM_CHECK_PYTHON_HEADERS([],
AC_MSG_ERROR([Could not find python headers]))
diff --git a/src/external/python.m4 b/src/external/python.m4
index cfe9961c7..b5d05e49e 100644
--- a/src/external/python.m4
+++ b/src/external/python.m4
@@ -9,7 +9,7 @@ AC_DEFUN([AM_PYTHON_CONFIG],
dnl We need to check for python build flags using distutils.sysconfig
dnl We cannot use python-config, as it was not available on older
dnl versions of python
- AC_PATH_PROG(PYTHON, python)
+ AC_PATH_PROG(PYTHON, python2)
AC_MSG_CHECKING([for working python])
if test -x "$PYTHON"; then
PYTHON_CFLAGS="`$PYTHON -c \"from distutils import sysconfig; \