When running ./configure, check for the {n,}curses headers.

-------- diffstat follows --------
 /trunk/configure |   66    39    27     0 +++++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 39 insertions(+), 27 deletions(-)
This commit is contained in:
Yann E. MORIN" 2009-05-02 18:23:58 +00:00
parent 2d7f8ef60f
commit 66be9f5713

36
configure vendored
View File

@ -101,6 +101,7 @@ has_or_abort() {
local item local item
local where local where
local version local version
local status
for item in "${@}"; do for item in "${@}"; do
case "${item}" in case "${item}" in
@ -124,21 +125,37 @@ has_or_abort() {
fi fi
where="$( which "${item}" 2>/dev/null )" where="$( which "${item}" 2>/dev/null )"
if [ -z "${where}" ]; then if [ -z "${where}" ]; then
printf "not found\n" printf "no\n"
continue continue
elif [ -n "${ver}" ]; then elif [ -n "${ver}" ]; then
version=$( ${where} --version 2>&1 ) version=$( ${where} --version 2>&1 )
str=$( echo "${version}" |grep -E "${ver}" |head -n 1 ) str=$( echo "${version}" |grep -E "${ver}" |head -n 1 )
if [ -z "${str}" ]; then if [ -z "${str}" ]; then
printf "not found\n" printf "no\n"
unset where unset where
continue continue
fi fi
fi fi
status="${where}"
break break
done done
if [ -z "${where}" ]; then ;;
printf "\n${err:-${prog}: none found}\n\n" :?*:)
for item in ${inc}; do
printf "Checking for '${item}'... "
if printf "#include \"${item}\"" |gcc -x c -c - -o /dev/null >/dev/null 2>&1; then
where="${item}"
status=yes
break;
fi
printf "no\n"
done
;;
::?*)
;;
esac
if [ -z "${status}" ]; then
printf "\n${err:-${prog}${inc}${lib}: none found}\n\n"
printf "Either you are missing entirely the needed tool,\n" printf "Either you are missing entirely the needed tool,\n"
printf "or the version you have is too old.\n" printf "or the version you have is too old.\n"
if [ -n "${var}" ]; then if [ -n "${var}" ]; then
@ -154,19 +171,13 @@ has_or_abort() {
printf "<* *>\n" printf "<* *>\n"
printf "\n" printf "\n"
else else
printf "${where}" printf "${status}"
if [ -n "${var}" ]; then if [ -n "${var}" ]; then
eval ${var}='"'"${where}"'"' eval ${var}='"'"${where}"'"'
add_to_var_list "${var}" add_to_var_list "${var}"
fi fi
printf "\n" printf "\n"
fi fi
;;
:?*:)
;;
::?*)
;;
esac
} }
do_help() { do_help() {
@ -325,7 +336,8 @@ has_or_abort prog=gzip
has_or_abort prog=bzip2 has_or_abort prog=bzip2
has_or_abort prog=lzma has_or_abort prog=lzma
#has_or_abort inc="ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h" err="'ncurses' headers files were not found" has_or_abort inc="ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h" \
err="'ncurses' headers files were not found"
#has_or_abort lib="ncursesw ncurses curses" err="'ncurses' library was not found" #has_or_abort lib="ncursesw ncurses curses" err="'ncurses' library was not found"
#--------------------------------------------------------------------- #---------------------------------------------------------------------