Ignore:
Timestamp:
Dec 22, 2009, 9:29:51 AM (13 years ago)
Author:
Sam Hocevar
Message:

Start porting the Python interpreter to Python 2.4/2.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/configure.ac

    r4079 r4165  
    6767
    6868CACA="no"
    69 PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17,
     69PKG_CHECK_MODULES(CACA, caca >= 0.99.beta16,
    7070 [CACA="yes"],
    7171 [AC_MSG_RESULT(no)
     
    108108AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extentions])
    109109
    110 PYTHON3="yes"
     110PYTHON="no"
    111111if test "${enable_python}" != "no"; then
    112112PKG_CHECK_MODULES(PYTHON3, python3 >= 3.1,
    113  [PYTHON3="yes"  AC_DEFINE(USE_PYTHON, 1, [Define to 1 to use Python interpreter])],
    114  [AC_MSG_RESULT(you need Python 3.1 or later to compile the interpreter)
    115 ])
     113 [PYTHON="yes"
     114  PYTHON_CFLAGS="${PYTHON3_CFLAGS}"
     115  PYTHON_LIBS="${PYTHON3_LIBS}"
     116  AC_DEFINE(HAVE_PYTHON3, 1, [Define to 1 if Python 3 is present])],
     117 [AC_PATH_PROG(PYTHON_CONFIG, python2.5-config, no)
     118  if test "${PYTHON_CONFIG}" = "no"; then
     119    AC_PATH_PROG(PYTHON_CONFIG, python2.4-config, no)
     120  fi
     121  if test "${PYTHON_CONFIG}" != "no"; then
     122    PYTHON="yes"
     123    PYTHON_CFLAGS="`${PYTHON_CONFIG} --cflags`"
     124    PYTHON_LIBS="`${PYTHON_CONFIG} --libs`"
     125    AC_DEFINE(HAVE_PYTHON2, 1, [Define to 1 if Python 2 is present])
     126  fi])
     127  if test "${PYTHON}" = "yes"; then
     128    AC_DEFINE(USE_PYTHON, 1, [Define to 1 to use Python interpreter])
     129  else
     130    AC_MSG_RESULT(you need Python 2.5 or later to compile the interpreter)
     131  fi
    116132fi
     133
     134AC_SUBST(PYTHON_CFLAGS)
     135AC_SUBST(PYTHON_LIBS)
    117136
    118137# Optimizations / Profiling
Note: See TracChangeset for help on using the changeset viewer.