--- pyconfigure-0.2/src/m4/python.m4 2013-04-16 16:48:31.000000000 -0500 +++ be/m4/python.m4 2013-08-17 01:21:44.232316390 -0500 @@ -201,6 +201,7 @@ # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x reqver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] + reqver[[3]] = 0xF0 # denotes a final release reqverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(4)): @@ -228,13 +229,11 @@ AC_CACHE_CHECK([for $1 version], [pc_cv_python_version], [AC_LANG_PUSH(Python)[]dnl - AC_LANG_CONFTEST([ - AC_LANG_PROGRAM([dnl + AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys ], [dnl sys.stdout.write(sys.version[[:3]]) -])]) - pc_cv_python_version=`$PYTHON conftest.py` +])],[pc_cv_python_version=`./conftest`],[AC_MSG_FAILURE([failed to link python program])]) AC_LANG_POP(Python)[]dnl ]) AC_SUBST([PYTHON_VERSION], [$pc_cv_python_version]) @@ -255,11 +254,15 @@ pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl - pc_cv_python_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl + AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys -], [dnl - sys.exit(sys.prefix) -])]) +],[dnl + sys.stdout.write(sys.prefix) +])], [pc_cv_python_prefix=`./conftest`; + if test $? != 0; then + AC_MSG_FAILURE([could not determine python prefix]) + fi], + [AC_MSG_FAILURE([failed to link python program])]) AC_LANG_POP(Python)[]dnl fi]) AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])]) @@ -276,11 +279,16 @@ pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl - pc_cv_python_exec_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl + AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl import sys -], [dnl - sys.exit(sys.exec_prefix) -])]) +],[dnl + sys.stdout.write(sys.exec_prefix) +])], + [pc_cv_python_exec_prefix=`./conftest`; + if test $? != 0; then + AC_MSG_FAILURE([could not determine python exec_prefix]) + fi], + [AC_MSG_FAILURE([failed to link python program])]) AC_LANG_POP(Python)[]dnl fi ])