summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-21 15:19:51 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:02 +0100
commit4e25ea3001805c9d3b573627d8d388d5d0a9b53b (patch)
tree102e2542d66e19d3affc4ecf8e3ef8cb6d8d9c2d /source4
parent218fef224c558c2c6be8e67c3275c8cc27dead7e (diff)
downloadsamba-4e25ea3001805c9d3b573627d8d388d5d0a9b53b.tar.gz
samba-4e25ea3001805c9d3b573627d8d388d5d0a9b53b.tar.bz2
samba-4e25ea3001805c9d3b573627d8d388d5d0a9b53b.zip
r26098: Make missing python no longer fatal.
(This used to be commit 9af2aeb22500baf65c11bc46c0051385911a8d67)
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/config.m417
1 files changed, 12 insertions, 5 deletions
diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4
index 36bf8a6049..0b5e174590 100644
--- a/source4/scripting/python/config.m4
+++ b/source4/scripting/python/config.m4
@@ -5,10 +5,8 @@ AC_ARG_VAR([PYTHON_VERSION],[The installed Python
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
+ working_python=no
AC_MSG_WARN([No python found])
- SMB_ENABLE(LIBPYTHON,NO)
-else
- SMB_ENABLE(LIBPYTHON,YES)
fi
#
@@ -19,8 +17,8 @@ ac_supports_python_ver=`$PYTHON -c "import sys, string; \
ver = string.split(sys.version)[[0]]; \
print ver >= '2.1.0'"`
if test "$ac_supports_python_ver" != "True"; then
+ working_python=no
AC_MSG_RESULT([no])
- AC_MSG_ERROR([No recent version of python found])
else
AC_MSG_RESULT([yes])
fi
@@ -32,9 +30,10 @@ AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
+ working_python=yes
else
AC_MSG_RESULT([no])
- AC_MSG_ERROR([distutils not available])
+ working_python=no
fi
#
@@ -115,3 +114,11 @@ AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
SMB_EXT_LIB(LIBPYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CPPFLAGS])
+
+if test x$working_python = xyes
+then
+ SMB_ENABLE(LIBPYTHON,YES)
+else
+ SMB_ENABLE(LIBPYTHON,NO)
+fi
+