From fa8cf23b2e04435cfae06caae4c522f27eeea013 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 4 Jun 2011 19:17:26 +0200 Subject: 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" diff --git a/configure b/configure index d0c032a..55638bb 100755 --- a/configure +++ b/configure @@ -215,9 +215,8 @@ has_or_abort() { local var ver err kconfig if ! check_for "$@"; then + printf " * A mandatory dependency is missing, or version mis-match\n" printf " * ${err:-${prog}${inc}${lib}: none found}\n" - printf " * Either you are missing entirely the needed tool,\n" - printf " * or the version you have is too old.\n" if [ -n "${var}" ]; then printf " * --> You can give the path to this tool using: --with-${var}=PATH\n" fi @@ -243,7 +242,7 @@ has_or_warn() { local var ver err kconfig if ! check_for "$@"; then - printf " * optional dependency is missing, some features will be disabled\n" + printf " * An optional dependency is missing, some features will be disabled\n" printf "${err:+ * ${err}\n}" if [ -n "${var}" ]; then printf " * --> You can give the path to this tool using: --with-${var}=PATH\n" @@ -428,14 +427,14 @@ ncurses_libs="$( for l in ncursesw ncurses curses; do \ done \ )" has_or_abort lib="${ncurses_libs}" \ - err="'ncurses' library was not found" + err="The 'ncurses' library is needed fo the menuconfig frontend" stdcxx_libs="$( for x in so dylib a; do \ printf "libstdc++.$x "; \ done \ )" has_or_abort lib="${stdcxx_libs}" \ - err="'libstdc++' shared library was not found" + err="The 'libstdc++' library is needed to build gcc" # Yes, we may be checking twice for libstdc++.a # The first is because we need one instance of libstdc++ (shared or static) -- cgit v0.10.2-6-g49f6