Commit a2f9903a7443671b1aa4f3f94b9d51328c950fdf

Authored by Jürgen Knödlseder
1 parent 26e2720a

Add Mac OS X 10.4 kluge for Python detection.

Initially, Python was not correctly detected on Mac OS X due to an old version of AM_PATH_PYTHON(bug #437). A kluge has been added that will detect Python nevertheless.
Showing 1 changed file with 14 additions and 0 deletions
configure.ac
... ... @@ -531,6 +531,20 @@ fi
531 531 AM_PATH_PYTHON([2.2],
532 532 [has_python="yes"],
533 533 [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])])
  534 +
  535 +# It would really be weired if Python has not been found, as barely every system has Python. Maybe
  536 +# it was not found because the autoconf is so old, and in an early version of the AM_PATH_PYTHON
  537 +# there were no [Action-if-found] and [Action-if-not-found] arguments, hence $has_python is possibly
  538 +# badly set. However, the Python executable and version should be set correctly, and we can test
  539 +# for this to see whether Python is really there or not.
  540 +if test "x$has_python" = "xno"; then
  541 + AM_PYTHON_CHECK_VERSION([$PYTHON], [${PYTHON_VERSION}],
  542 + [has_python="yes"
  543 + AC_MSG_NOTICE([Wow! You're running a pretty old system. Found Python nevertheless:-)])],
  544 + [AC_MSG_WARN([Python not found.])])
  545 +fi
  546 +
  547 +# If we have Python then verify the presence of the header and set some flags
534 548 if test "x$has_python" = "xyes"; then
535 549  
536 550 # Set opening and closing symbols to make setup.py compatible for versions 2 and 3
... ...