Add some additional support to configure.inc added for new feature check in configure that has now been abandoned.

This commit is contained in:
Adam Sutton 2012-09-06 15:35:33 +01:00
parent 7cd0a15527
commit 00fa2f44ee

View file

@ -119,6 +119,13 @@ function enabled
[ "$val" == "yes" ] && return 0 || return 1
}
# Check if disabled
function disabled
{
local val=$(_enabled $1)
[ "$val" == "no" ] && return 0 || return 1
}
# Check if enabled (or auto)
function enabled_or_auto
{
@ -126,6 +133,13 @@ function enabled_or_auto
[ "$val" == "yes" -o "$val" == "auto" ] && return 0 || return 1
}
# Check if disabled (or auto)
function disabled_or_auto
{
local val=$(_enabled $1)
[ "$val" == "no" -o "$val" == "auto" ] && return 0 || return 1
}
# ###########################################################################
# Command Line
# ###########################################################################
@ -266,6 +280,25 @@ function check_cc_header
fi
}
# Check some compiler snippet
function check_cc_snippet
{
local nam=$1
local snp=$2
local opt=$3
echo -ne "checking for cc $nam ...${TAB}"
# Check if supported
if check_cc "$snp" "$opt"; then
echo "ok"
enable $nam
else
echo "fail"
return 1
fi
}
# Check compiler option
function check_cc_option
{