configure: rationalise error messages with meaningful texts
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jun 04 19:17:26 2011 +0200 (2011-06-04)
changeset 25062ab553e37517
parent 2505 f87f02b00cc7
child 2507 a5856225d851
configure: rationalise error messages with meaningful texts

Currently, error messages just state the obvious: a required
component is required. While in some cases, there is not much
else to say, in some other cases we could tell much more.

For example, a missing libstdc++ means no static toolchain.

Also, format error and warning messages in a similar fashion,
with a {error,warning} intro, followed by the message specified
by the caller.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
configure
     1.1 --- a/configure	Sat Jun 04 17:43:49 2011 +0200
     1.2 +++ b/configure	Sat Jun 04 19:17:26 2011 +0200
     1.3 @@ -215,9 +215,8 @@
     1.4      local var ver err kconfig
     1.5  
     1.6      if ! check_for "$@"; then
     1.7 +        printf " * A mandatory dependency is missing, or version mis-match\n"
     1.8          printf " * ${err:-${prog}${inc}${lib}: none found}\n"
     1.9 -        printf " * Either you are missing entirely the needed tool,\n"
    1.10 -        printf " * or the version you have is too old.\n"
    1.11          if [ -n "${var}" ]; then
    1.12              printf " * --> You can give the path to this tool using: --with-${var}=PATH\n"
    1.13          fi
    1.14 @@ -243,7 +242,7 @@
    1.15      local var ver err kconfig
    1.16  
    1.17      if ! check_for "$@"; then
    1.18 -        printf " * optional dependency is missing, some features will be disabled\n"
    1.19 +        printf " * An optional dependency is missing, some features will be disabled\n"
    1.20          printf "${err:+ * ${err}\n}"
    1.21          if [ -n "${var}" ]; then
    1.22              printf " * --> You can give the path to this tool using: --with-${var}=PATH\n"
    1.23 @@ -428,14 +427,14 @@
    1.24                   done                                   \
    1.25                 )"
    1.26  has_or_abort lib="${ncurses_libs}"                  \
    1.27 -             err="'ncurses' library was not found"
    1.28 +             err="The 'ncurses' library is needed fo the menuconfig frontend"
    1.29  
    1.30  stdcxx_libs="$( for x in so dylib a; do \
    1.31                     printf "libstdc++.$x "; \
    1.32                 done \
    1.33               )"
    1.34  has_or_abort lib="${stdcxx_libs}" \
    1.35 -             err="'libstdc++' shared library was not found"
    1.36 +             err="The 'libstdc++' library is needed to build gcc"
    1.37  
    1.38  # Yes, we may be checking twice for libstdc++.a
    1.39  # The first is because we need one instance of libstdc++ (shared or static)