check_python.m4 - Raise the minimum python version up to 2.4
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Feb 2010 16:48:44 +0000 (17:48 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Feb 2010 16:53:10 +0000 (17:53 +0100)
This is needed since we at the s4 side have some code which requires this. I
think everybody should be fine since we got no complaints on the mailing list
about this change.

Patch template: Jelmer Vernooij <jelmer@samba.org>

m4/check_python.m4

index 15f04afb4bda14c53e9787d375b91c2ab7e69d25..8ca0ead18983fc50392a7bc801a1626e3e640ccc 100644 (file)
@@ -76,6 +76,11 @@ AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
 
        if test x$PYTHON != x
        then
 
        if test x$PYTHON != x
        then
+               if `$PYTHON -c "import sys; sys.exit(sys.version_info.__getslice__(0, 2) >= (2, 4))"`
+               then
+                       AC_MSG_ERROR([Python ($PYTHON) is too old. At least version 2.4 is required])
+               fi
+
                DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; \
                                              print '-I%s -I%s %s' % ( \
                                                        sysconfig.get_python_inc(), \
                DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; \
                                              print '-I%s -I%s %s' % ( \
                                                        sysconfig.get_python_inc(), \