From 5c18feaa206bbaee692fc3640b7b79c8d9d6a638 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 11 Jan 2017 17:08:30 +0100 Subject: [PATCH] CONFIGURE: Fix detection of pylint If configure script was executed with --enable-pylint then it behaved the same as --disable-pylint. It does not make any sense. Resolves: https://fedorahosted.org/freeipa/ticket/6604 Reviewed-By: Christian Heimes Reviewed-By: Tomas Krizek --- configure.ac | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index e8a4701c1..c84c1bc37 100644 --- a/configure.ac +++ b/configure.ac @@ -446,16 +446,18 @@ AM_CONDITIONAL([WITH_POLINT], [test "x${enable_i18ntests}" == "xyes"]) AC_ARG_ENABLE([pylint], AS_HELP_STRING([--disable-pylint], [skip Pylint in make lint target]), - [PYLINT=no], - [PYLINT=yes - AC_MSG_CHECKING([for Pylint]) - $PYTHON -m pylint --version > /dev/null - if test "$?" != "0"; then - AC_MSG_ERROR([cannot find pylint for $PYTHON]) - fi - AC_MSG_RESULT([yes]) - ] + [PYLINT=$enableval], + [PYLINT=yes] ) +if test x$PYLINT != xno; then + AC_MSG_CHECKING([for Pylint]) + $PYTHON -m pylint --version > /dev/null + if test "$?" != "0"; then + AC_MSG_ERROR([cannot find pylint for $PYTHON]) + else + AC_MSG_RESULT([yes]) + fi +fi AC_SUBST([PYLINT]) AM_CONDITIONAL([WITH_PYLINT], [test "x${PYLINT}" != "xno"])