]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
fix configure to work with multiple python versions (#737998)
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Nov 2011 16:21:40 +0000 (17:21 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Nov 2011 16:21:40 +0000 (17:21 +0100)
configure.ac

index b972805f426d80f178dbe281d27da30cf59e2417..ff78d2bb1f72e83e8df3d49583d0b38699d99577 100644 (file)
@@ -59,7 +59,7 @@ if test "x$with_python" = "xno"; then
   AC_MSG_RESULT([skipped])
   PYTHONVERS=
 else
-  PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
+  PYTHONVERS=$(ls /usr/include/python2.*/Python.h 2> /dev/null | sed 's|/usr/include/\([[^/]]*\)/Python.h|\1|g' | tr '\n' ' ')
   AC_MSG_RESULT([$PYTHONVERS])
 fi
 AC_SUBST([PYTHONVERS])