From a2f9903a7443671b1aa4f3f94b9d51328c950fdf Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sat, 25 Aug 2012 01:42:42 +0200 Subject: [PATCH] Add Mac OS X 10.4 kluge for Python detection. --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 717a3dd..4bb64c9 100644 --- a/configure.ac +++ b/configure.ac @@ -531,6 +531,20 @@ fi AM_PATH_PYTHON([2.2], [has_python="yes"], [AC_MSG_WARN([Python >= 2.2 not found. Python >= 2.2 is required to build python binding. Python can be obtained from http://www.python.org])]) + +# It would really be weired if Python has not been found, as barely every system has Python. Maybe +# it was not found because the autoconf is so old, and in an early version of the AM_PATH_PYTHON +# there were no [Action-if-found] and [Action-if-not-found] arguments, hence $has_python is possibly +# badly set. However, the Python executable and version should be set correctly, and we can test +# for this to see whether Python is really there or not. +if test "x$has_python" = "xno"; then + AM_PYTHON_CHECK_VERSION([$PYTHON], [${PYTHON_VERSION}], + [has_python="yes" + AC_MSG_NOTICE([Wow! You're running a pretty old system. Found Python nevertheless:-)])], + [AC_MSG_WARN([Python not found.])]) +fi + +# If we have Python then verify the presence of the header and set some flags if test "x$has_python" = "xyes"; then # Set opening and closing symbols to make setup.py compatible for versions 2 and 3 -- libgit2 0.21.4