From 4feae867000d6369ee036b71ad0b3ac04561bda7 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 16 May 2018 16:53:20 +0200 Subject: [PATCH] allow python versions to be specified with --with-python option https://pagure.io/newt/issue/3 --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d33489d..67bcd23 100644 --- a/configure.ac +++ b/configure.ac @@ -59,12 +59,18 @@ fi AC_CHECK_HEADERS([popt.h libintl.h]) AC_MSG_CHECKING([for python versions]) -AC_ARG_WITH([python], [ --without-python do not compile python support]) +AC_ARG_WITH([python], [ --without-python do not compile python support], + [], [with_python="yes"]) 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|.*\(python[[0-9]]*\.[[0-9]]*\).*|\1|g' | tr '\n' ' ') + if test "x$with_python" = "xyes"; then + PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | \ + sed 's|.*\(python[[0-9]]*\.[[0-9]]*\).*|\1|g' | tr '\n' ' ') + else + PYTHONVERS="$with_python" + fi AC_MSG_RESULT([$PYTHONVERS]) fi AC_SUBST([PYTHONVERS]) -- 2.47.2