Make top-level configure python checks python 3 ready
print <value> syntax does not work in python 3. Add round braces to call it like any other function. Tested with python-2.4 and 3.1. NOTE: Only fixes the configure check, mod_python does NOT build with python 3.x! Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
0f45b8badd
commit
836804707a
10
configure.in
10
configure.in
|
@ -871,7 +871,7 @@ then
|
|||
if test "$python_has_distutils" != "no" ; then
|
||||
AC_MSG_CHECKING([location of site-packages])
|
||||
|
||||
PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`"
|
||||
PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
|
||||
|
||||
if test -z "$PYTHON_SITE_DIR" ; then
|
||||
AC_MSG_ERROR([Unable to detect python site-packages path])
|
||||
|
@ -884,10 +884,10 @@ then
|
|||
#
|
||||
# python distutils found, get settings from python directly
|
||||
#
|
||||
PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
|
||||
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
|
||||
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`"
|
||||
PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`"
|
||||
PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));'`"
|
||||
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
|
||||
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
|
||||
PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
|
||||
|
||||
# handle python being installed into /usr/local
|
||||
AC_MSG_CHECKING([python libdir])
|
||||
|
|
Loading…
Reference in New Issue