summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-08 21:46:41 +0800
committerruki <[email protected]>2023-01-08 21:46:41 +0800
commit476f1c3592aa55cd10a6986c045f1be834cf2a83 (patch)
tree5348e4860896eabc6b464d36c5474170421c8e3c
parentfa875a5699cb5292a60fcd308c5e50c294da9ad0 (diff)
improve configure
-rwxr-xr-xconfigure21
1 files changed, 15 insertions, 6 deletions
diff --git a/configure b/configure
index 2b692d54e..1fa23c80e 100755
--- a/configure
+++ b/configure
@@ -3290,12 +3290,21 @@ _check_cxxsnippets() {
# check option
_check_option() {
local name="${1}"
- _get_option_item "${name}" "before_check"; local before_check="${_ret}"
- if test_nz "${before_check}"; then
- eval ${before_check}
- fi
- if _check_csnippets "${name}" && _check_cxxsnippets "${name}"; then
- return 0
+ _get_option_value "${name}"; local value="${_ret}"
+ if test_nz "${value}"; then
+ if _is_enabled "${value}"; then
+ return 0
+ else
+ return 1
+ fi
+ else
+ _get_option_item "${name}" "before_check"; local before_check="${_ret}"
+ if test_nz "${before_check}"; then
+ eval ${before_check}
+ fi
+ if _check_csnippets "${name}" && _check_cxxsnippets "${name}"; then
+ return 0
+ fi
fi
return 1
}