comparison m4/ax_python.m4 @ 226:bfc35fd55254 stable-0-6-41

fix python autoconf macros
author Carl Byington <carl@five-ten-sg.com>
date Tue, 23 Jun 2009 20:22:42 -0700
parents d9ba8fa961e7
children 115b871c61a1
comparison
equal deleted inserted replaced
225:9859474779da 226:bfc35fd55254
54 # Macro released by the Autoconf Macro Archive. When you make and 54 # Macro released by the Autoconf Macro Archive. When you make and
55 # distribute a modified version of the Autoconf Macro, you may extend this 55 # distribute a modified version of the Autoconf Macro, you may extend this
56 # special exception to the GPL to apply to your modified version as well. 56 # special exception to the GPL to apply to your modified version as well.
57 57
58 AC_DEFUN([AX_PYTHON], 58 AC_DEFUN([AX_PYTHON],
59 [AC_MSG_CHECKING(for python build information) 59 [
60 AC_MSG_CHECKING(for python build information)
60 AC_MSG_RESULT([]) 61 AC_MSG_RESULT([])
61 for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do 62 for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
62 AC_CHECK_PROGS(PYTHON_BIN, [$python]) 63 AC_CHECK_PROGS(PYTHON_BIN, [$python])
63 ax_python_bin=$PYTHON_BIN 64 ax_python_bin=$PYTHON_BIN
64 if test x$ax_python_bin != x; then 65 if test x$ax_python_bin != x; then
65 AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no) 66 AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no)
66 AC_CHECK_HEADER([$ax_python_bin/Python.h], 67 AC_CHECK_HEADER([$ax_python_bin/Python.h],
67 [[ax_python_header=$includedir/$ax_python_bin]], 68 ax_python_header=yes,
68 ax_python_header=no) 69 ax_python_header=no)
69 if test $ax_python_lib != no; then 70 if test $ax_python_lib != no; then
70 if test $ax_python_header != no; then 71 if test $ax_python_header != no; then
71 break; 72 break;
72 fi 73 fi
84 fi 85 fi
85 86
86 AC_MSG_RESULT([ results of the Python check:]) 87 AC_MSG_RESULT([ results of the Python check:])
87 AC_MSG_RESULT([ Binary: $ax_python_bin]) 88 AC_MSG_RESULT([ Binary: $ax_python_bin])
88 AC_MSG_RESULT([ Library: $ax_python_lib]) 89 AC_MSG_RESULT([ Library: $ax_python_lib])
89 AC_MSG_RESULT([ Include Dir: $ax_python_header])
90 90
91 if test x$ax_python_header != xno; then
92 PYTHON_INCLUDE_DIR=$ax_python_header
93 AC_SUBST(PYTHON_INCLUDE_DIR)
94 fi
95 if test x$ax_python_lib != xno; then 91 if test x$ax_python_lib != xno; then
96 PYTHON_LIB=$ax_python_lib 92 PYTHON_LIB=$ax_python_lib
97 AC_SUBST(PYTHON_LIB) 93 AC_SUBST(PYTHON_LIB)
98 fi 94 fi
99 ])dnl 95 ])dnl