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>
This commit is contained in:
Yann E. MORIN" 2011-06-04 19:17:26 +02:00
parent 929fda76b8
commit fa8cf23b2e

9
configure vendored
View File

@ -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)