[SSSD] [PATCH] BUILD: Write hints about optional python bindings

Lukas Slebodnik lslebodn at redhat.com
Tue Apr 14 11:57:30 UTC 2015


ehlo,

attached patch should fix issue with Pavel R. mentioned in mail[1]
I thought it would be fixed as part of CI patches, becuase there were some
related changes.

But It takes ages. So Attached is a patch.

LS

[1] https://lists.fedorahosted.org/pipermail/sssd-devel/2015-February/022731.html
-------------- next part --------------
>From 1599ce86bafe56d4fe33702e78f63fd62991dec4 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 14 Apr 2015 13:19:22 +0200
Subject: [PATCH] BUILD: Write hints about optional python bindings

---
 configure.ac | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e30405f3a17ffd2c9899b6eb17af85ec9bc15234..1f9c6f86772890bb0e269287d58aa6ea46e59ee1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,8 +248,22 @@ AM_CONDITIONAL([HAVE_PROFILE_CATALOGS], [test "x$HAVE_PROFILE_CATALOGS" != "x"])
 AM_CONDITIONAL([HAVE_MANPAGES], [test "x$HAVE_MANPAGES" != "x"])
 AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
 
+AC_CHECK_PROG(HAVE_PYTHON2, python2, yes, no)
+AS_IF([test x$HAVE_PYTHON2 = xyes],
+      [AC_PATH_PROG(PYTHON2, python2)])
+
+AC_CHECK_PROG(HAVE_PYTHON3, python3, yes, no)
+AS_IF([test x$HAVE_PYTHON3 = xyes],
+      [AC_PATH_PROG(PYTHON3, python3)])
+
 if test x$HAVE_PYTHON2_BINDINGS = x1; then
-    AC_PATH_PROG(PYTHON2, python2)
+    AS_IF([test x$HAVE_PYTHON2 != xyes],
+          [AC_MSG_ERROR([
+The program python2 was not found in search path.
+Please ensure that it is installed and its directory is included in the search
+path. It is required for building python2 bindings. If you do not want to build
+them please use argument --without-python2-bindings when running configure.])])
+
     PYTHON=$PYTHON2
     AM_PATH_PYTHON([2.6])
     AM_PYTHON_CONFIG([python2])
@@ -270,7 +284,13 @@ if test x$HAVE_PYTHON2_BINDINGS = x1; then
 fi
 
 if test x$HAVE_PYTHON3_BINDINGS = x1; then
-    AC_PATH_PROG(PYTHON3, python3)
+    AS_IF([test x$HAVE_PYTHON3 != xyes],
+          [AC_MSG_ERROR([
+The program python3 was not found in search path.
+Please ensure that it is installed and its directory is included in the search
+path. It is required for building python3 bindings. If you do not want to build
+them please use argument --without-python3-bindings when running configure.])])
+
     PYTHON=$PYTHON3
     AM_PATH_PYTHON([3.3])
     AM_PYTHON_CONFIG([python3])
-- 
2.3.5



More information about the sssd-devel mailing list