summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2015-03-26 12:09:50 +0100
committerKarel Zak2015-03-26 12:09:50 +0100
commitb2ae8c571bcfeaa4e373352debd7c30f68c907db (patch)
treefc2679539f4d1b15df3f5d28c19f919a4a0f02af /configure.ac
parentbuild-sys: ncurses is optional, don't fail when missing (diff)
downloadkernel-qcow2-util-linux-b2ae8c571bcfeaa4e373352debd7c30f68c907db.tar.gz
kernel-qcow2-util-linux-b2ae8c571bcfeaa4e373352debd7c30f68c907db.tar.xz
kernel-qcow2-util-linux-b2ae8c571bcfeaa4e373352debd7c30f68c907db.zip
build-sys: python is optional, don't fail when missing
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 29ec86d76..b278eacc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1789,6 +1789,7 @@ AC_ARG_WITH([python],
)
have_python=no
+have_libpython=no
AS_IF([test "x$with_python" != xno], [
# We follow distributions default and look for PKG module name "python"
# (minimal version is 2) but if major version is explicitly specified by
@@ -1796,14 +1797,18 @@ AS_IF([test "x$with_python" != xno], [
# "python3".
AS_IF([test "x$withval" != xno -a "x$withval" != xyes -a "x$withval" != xcheck],
[pymajor="$withval"; PYTHON=python${pymajor}], [pymajor="2"])
+
+ # check for python interpreter
AM_PATH_PYTHON([$pymajor], [have_python=yes], [have_python=no])
AS_CASE([$with_python:$have_python],
[yes:no],
- [AC_MSG_ERROR([python selected but libpython not found])],
+ [AC_MSG_ERROR([python selected but python interpreter not found])],
[check:no],
- [AC_MSG_WARN([libpython not found, do not build python bindings])],
+ [AC_MSG_WARN([python interpreter not found, do not build python bindings])],
[*:yes],
- [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION])]
+ # check for python development stuff
+ [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],
+ [have_libpython=yes], [have_libpython=no])]
)
])
@@ -1813,7 +1818,7 @@ AC_ARG_ENABLE([pylibmount],
[], [UL_DEFAULT_ENABLE([pylibmount], [check])]
)
UL_BUILD_INIT([pylibmount])
-UL_REQUIRES_HAVE([pylibmount], [python], [libpython])
+UL_REQUIRES_HAVE([pylibmount], [libpython], [libpython])
UL_REQUIRES_BUILD([pylibmount], [libmount])
AM_CONDITIONAL([BUILD_PYLIBMOUNT], [test "x$build_pylibmount" = "xyes"])