mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 02:54:20 +01:00
ssl-opt.sh: Add function extracting val or default val from config.h
This commit is contained in:
parent
dc1e950170
commit
7c48dd11db
@ -164,21 +164,22 @@ requires_config_disabled() {
|
||||
fi
|
||||
}
|
||||
|
||||
requires_config_value_at_least() {
|
||||
get_config_value_or_default() {
|
||||
NAME="$1"
|
||||
DEF_VAL=$( grep ".*#define.*${NAME}" ../include/mbedtls/config.h |
|
||||
sed 's/^.*\s\([0-9]*\)$/\1/' )
|
||||
VAL=$( ../scripts/config.pl get $NAME || echo "$DEF_VAL" )
|
||||
../scripts/config.pl get $NAME || echo "$DEF_VAL"
|
||||
}
|
||||
|
||||
requires_config_value_at_least() {
|
||||
VAL=$( get_config_value_or_default "$1" )
|
||||
if [ "$VAL" -lt "$2" ]; then
|
||||
SKIP_NEXT="YES"
|
||||
fi
|
||||
}
|
||||
|
||||
requires_config_value_at_most() {
|
||||
NAME="$1"
|
||||
DEF_VAL=$( grep ".*#define.*${NAME}" ../include/mbedtls/config.h |
|
||||
sed 's/^.*\s\([0-9]*\)$/\1/' )
|
||||
VAL=$( ../scripts/config.pl get $NAME || echo "$DEF_VAL" )
|
||||
VAL=$( get_config_value_or_default "$1" )
|
||||
if [ "$VAL" -gt "$2" ]; then
|
||||
SKIP_NEXT="YES"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user