]> git.ipfire.org Git - thirdparty/newt.git/blobdiff - configure.ac
add python3 support (#963839)
[thirdparty/newt.git] / configure.ac
index 02f9d6d698805ca48fc8cc9a3845a640a66e5e8d..6da98996ccb2be12c23929d777b34cf896c0416e 100644 (file)
@@ -60,7 +60,7 @@ if test "x$with_python" = "xno"; then
   AC_MSG_RESULT([skipped])
   PYTHONVERS=
 else
-  PYTHONVERS=$(ls /usr/include/python2.*/Python.h 2> /dev/null | sed 's|/usr/include/\([[^/]]*\)/Python.h|\1|g' | tr '\n' ' ')
+  PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed 's|.*\(python[[0-9]]*\.[[0-9]]*\).*|\1|g' | tr '\n' ' ')
   AC_MSG_RESULT([$PYTHONVERS])
 fi
 AC_SUBST([PYTHONVERS])