]> granicus.if.org Git - libnl/commitdiff
Fix python detection code
authorGilles Espinasse <g.esp@free.fr>
Tue, 4 Dec 2012 23:08:01 +0000 (00:08 +0100)
committerThomas Graf <tgraf@suug.ch>
Wed, 5 Dec 2012 06:55:44 +0000 (07:55 +0100)
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Compiling libnl versions that include doc or the git tree produce this
checking for python build information...
checking for python2.6... python2.6
checking for main in -lpython2.6... yes
checking python2.6/Python.h usability... yes
checking python2.6/Python.h presence... yes
checking for python2.6/Python.h... yes
./configure: line 4272: test: !=: unary operator expected
checking for python2.5... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
checking for python2.4... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
checking for python2.3... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
checking for python2.2... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
checking for python2.1... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
checking for python... (cached) python2.6
checking for main in -lpython2.6... (cached) yes
checking for python2.6/Python.h... (cached) yes
./configure: line 4272: test: !=: unary operator expected
  results of the Python check:
    Binary:      python2.6
    Library:     python2.6
    Include Dir: no

Fix the unary operator warning allow to break when one python version is found
Add the more recent python versions
Change send upstream as http://savannah.gnu.org/patch/index.php?7897
Signed-off-by: Thomas Graf <tgraf@suug.ch>
doc/m4/ax_python.m4

index 1bc9d8a203de072a4a3b4a2733a0f8657470ffad..f9a513591134c09bcc68ed8477927ad0ac74b4f6 100644 (file)
@@ -56,7 +56,7 @@
 AC_DEFUN([AX_PYTHON],
 [AC_MSG_CHECKING(for python build information)
 AC_MSG_RESULT([])
-for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
+for python in python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
 AC_CHECK_PROGS(PYTHON_BIN, [$python])
 ax_python_bin=$PYTHON_BIN
 if test x$ax_python_bin != x; then
@@ -64,8 +64,8 @@ if test x$ax_python_bin != x; then
    AC_CHECK_HEADER([$ax_python_bin/Python.h],
    [[ax_python_header=`locate $ax_python_bin/Python.h | sed -e s,/Python.h,,`]],
    ax_python_header=no)
-   if test $ax_python_lib != no; then
-     if test $ax_python_header != no; then
+   if test x$ax_python_lib != xno; then
+     if test x$ax_python_header != xno; then
        break;
      fi
    fi