diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/configure.in b/configure.in index a3aabfdf..cdfa79dc 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -52,8 +52,7 @@ AC_SUBST(PYTHON) PYTHON=$with_python AC_MSG_RESULT($PYTHON) -# See if Python is new enough. 2.1 or better is required, with 2.1.3 -# recommended. +# See if Python is new enough. AC_MSG_CHECKING(Python version) changequote(,) cat > conftest.py <<EOF @@ -62,8 +61,7 @@ try: v = sys.hexversion except AttributeError: v = 0 -# int of hexversion 0x2010000 -if v >= 0x2010000: +if v >= 0x2040000: s = sys.version.split()[0] else: s = "" @@ -80,11 +78,46 @@ then AC_MSG_ERROR([ ***** $PYTHON is too old (or broken) -***** Python 2.1 or newer is required -***** Python 2.1.3 or better is recommended]) +***** Python 2.4 or newer is required]) fi AC_MSG_RESULT($version) +# Check the email package version. +AC_MSG_CHECKING(Python's email package) +changequote(,) +cat > conftest.py <<EOF +import sys +try: + import email +except ImportError: + res = "not ok" +else: + provided = (2, 5, 8) + version = tuple(int(v) for v in email.__version__.split('.')) + if provided > version: + res = "not ok" + else: + res = "ok" +fp = open("conftest.out", "w") +fp.write("%s\n" % res) +fp.close() +EOF +changequote([, ]) +$PYTHON conftest.py +needemailpkg=`cat conftest.out` +rm -f conftest.out conftest.py + +# Should we rely on Python's own email package or use the pre-packaged version? +AC_SUBST(EMAILPKG) +if test "$needemailpkg" = "ok" +then + EMAILPKG="" +else + EMAILPKG=email-2.5.8 +fi +AC_MSG_RESULT($needemailpkg) + + # Make sure distutils is available. Some Linux Python packages split # distutils into the "-devel" package, so they need both. AC_MSG_CHECKING(that Python has a working distutils) @@ -216,7 +249,7 @@ else fi # new macro for finding group names -AC_DEFUN(MM_FIND_GROUP_NAME, [ +AC_DEFUN([MM_FIND_GROUP_NAME], [ # $1 == variable name # $2 == user id to check for AC_SUBST($1) @@ -248,7 +281,7 @@ rm -f conftest.out conftest.py]) # new macro for finding UIDs -AC_DEFUN(MM_FIND_USER_NAME, [ +AC_DEFUN([MM_FIND_USER_NAME], [ # $1 == variable name # $2 == user id to check for AC_SUBST($1) @@ -489,6 +522,7 @@ else fi AC_MSG_RESULT($with_urlhost) + changequote(,) cat > conftest.py <<EOF # python @@ -549,7 +583,7 @@ AC_CHECK_FUNCS(vsnprintf) dnl Expand PYTHON path in the scripts, output into build/scriptname -AC_DEFUN(MM_SCRIPTS, [dnl +AC_DEFUN([MM_SCRIPTS], [dnl bin/add_members \ bin/arch \ bin/change_pw \ |