URL: https://github.com/freeipa/freeipa/pull/599 Author: lslebodn Title: #599: CONFIGURE: Improve error messages for optional dependencies Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/599/head:pr599 git checkout pr599
From 9bfd00b011432de9d03ffa6264ecd41e0c9255fe Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <lsleb...@redhat.com> Date: Wed, 15 Mar 2017 13:45:21 +0100 Subject: [PATCH] CONFIGURE: Improve error messages for optional dependencies https://www.redhat.com/archives/freeipa-devel/2017-March/msg00307.html --- configure.ac | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index 4d7a846..d47421e 100644 --- a/configure.ac +++ b/configure.ac @@ -381,25 +381,19 @@ AC_SUBST([i18ntests]) AM_CONDITIONAL([WITH_POLINT], [test "x${enable_i18ntests}" == "xyes"]) AC_ARG_ENABLE([pylint], - AS_HELP_STRING([--enable-pylint], - [Require pylint. Default is autodetection with - "python -m pylint".]), + AS_HELP_STRING([--disable-pylint], + [skip Pylint in make lint target +This feature is optional and aimed for checking issues in python code. +You can skip this check wich configure time option --disable-pylint.]), [PYLINT=$enableval], - [PYLINT=check] + [PYLINT=yes] ) - if test x$PYLINT != xno; then AC_MSG_CHECKING([for Pylint]) $PYTHON -m pylint --version >/dev/null 2>&1 if test "$?" != "0"; then - if test x$PYLINT = xcheck; then - PYLINT=no - AC_MSG_NOTICE([cannot find optional pylint for $PYTHON]) - else - AC_MSG_ERROR([cannot find pylint for $PYTHON]) - fi + AC_MSG_ERROR([cannot find pylint for $PYTHON]) else - PYLINT=yes AC_MSG_RESULT([yes]) fi fi @@ -409,29 +403,16 @@ AM_CONDITIONAL([WITH_PYLINT], [test "x${PYLINT}" != "xno"]) AC_ARG_WITH([jslint], AS_HELP_STRING([--with-jslint=[FILE]], - [path to JavaScript linter. Default is autodetection of - utility "jsl" ]), - [JSLINT="$withval"], - [JSLINT=check] -) - -AS_CASE([$JSLINT], - [yes], [AC_PATH_PROG([JSLINT], [jsl], [missing]) - if test $JSLINT = missing; then - AC_MSG_FAILURE([jsl is missing]) - fi], - [no], [], - [check], [AC_PATH_PROG([JSLINT], [jsl], [no])], - dnl user setting - [if ! test -f "$JSLINT"; then - AC_MSG_RESULT([$JSLINT non-existing]) - AC_MSG_FAILURE([invalid value $JSLINT for jsl]) - fi - if ! test -x "$JSLINT"; then - AC_MSG_RESULT([$JSLINT non-executable]) - AC_MSG_FAILURE([invalid value $JSLINT for jsl]) - fi] + [path to JavaScript linter. +This feature is optional and aimed for web ui developers. +You can skip this check wich configure time option --without-jslint]), +dnl --without-jslint will set JSLINT=no + [JSLINT=$with_jslint], + [AC_PATH_PROG([JSLINT], [jsl])] ) +if test "x${JSLINT}" == "x"; then + AC_MSG_ERROR([cannot find JS lint]) +fi AC_SUBST([JSLINT]) AM_CONDITIONAL([WITH_JSLINT], [test "x${JSLINT}" != "xno"])
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code