1.1 --- a/configure Wed May 25 21:21:03 2011 +0200
1.2 +++ b/configure Thu May 26 18:40:53 2011 +0200
1.3 @@ -97,13 +97,13 @@
1.4 # optional, defaults to: '${prog}: none found'
1.5 # eg: err="'bash' 3.x or above was not found"
1.6 check_for() {
1.7 - local prog inc lib
1.8 - local var ver err
1.9 local val
1.10 local item
1.11 local where
1.12 local status
1.13
1.14 + # Note: prog/inc/lib and var/ver/err are set here,
1.15 + # but declared by the caller (because it needs it)
1.16 for item in "${@}"; do
1.17 case "${item}" in
1.18 prog=*|inc=*|lib=*|var=*|ver=*|err=*)
1.19 @@ -170,13 +170,6 @@
1.20 esac
1.21
1.22 if [ -z "${status}" ]; then
1.23 - printf "\n${err:-${prog}${inc}${lib}: none found}\n\n"
1.24 - printf "Either you are missing entirely the needed tool,\n"
1.25 - printf "or the version you have is too old.\n"
1.26 - if [ -n "${var}" ]; then
1.27 - printf "You can give the path to this tool using: --with-${var}=PATH\n"
1.28 - fi
1.29 - printf "\n"
1.30 return 1
1.31 fi
1.32
1.33 @@ -191,10 +184,21 @@
1.34 # This function checks for a tool, and aborts if not found
1.35 # See check_for(), above, for how to call has_or_abort
1.36 has_or_abort() {
1.37 + # We declare these 6 variables here, although they are
1.38 + # set in check_for(), called below
1.39 + local prog inc lib
1.40 + local var ver err
1.41 +
1.42 if ! check_for "$@"; then
1.43 - # FORCE can be set in the environment
1.44 + printf "\n${err:-${prog}${inc}${lib}: none found}\n\n"
1.45 + printf "Either you are missing entirely the needed tool,\n"
1.46 + printf "or the version you have is too old.\n"
1.47 + if [ -n "${var}" ]; then
1.48 + printf "You can give the path to this tool using: --with-${var}=PATH\n"
1.49 + fi
1.50 + printf "\n"
1.51 + # Bail out if --force is not specified
1.52 [ -z "${FORCE}" ] && do_error "Bailing out..."
1.53 - printf "\n"
1.54 printf "<* *>\n"
1.55 printf "<* FORCE in action: *>\n"
1.56 printf "<* Continuing despite missing pre-requisite *>\n"