From: Miroslav Lichvar Date: Wed, 16 May 2018 14:53:20 +0000 (+0200) Subject: allow python versions to be specified with --with-python option X-Git-Tag: r0-52-21~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4feae867000d6369ee036b71ad0b3ac04561bda7;p=thirdparty%2Fnewt.git allow python versions to be specified with --with-python option https://pagure.io/newt/issue/3 --- 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])