File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ while [[ ! -z $@ ]]; do
105
105
arg=" $1 "
106
106
shift
107
107
108
- if [[ -z $arg ]]; then
108
+ if [[ -z $arg && $reqarg != ' \* ' ]]; then
109
109
mkl_err " Missing argument to option --$name $reqarg "
110
110
exit 1
111
111
fi
Original file line number Diff line number Diff line change @@ -2173,11 +2173,13 @@ $1"
2173
2173
# Arguments:
2174
2174
# option group ("Standard", "Cross-Compilation", etc..)
2175
2175
# variable name
2176
- # option ("--foo=feh ")
2176
+ # option ("--foo", "--foo=*", "--foo=args_required ")
2177
2177
# help
2178
2178
# default (optional)
2179
2179
# assignvalue (optional, default:"y")
2180
2180
# function block (optional)
2181
+ #
2182
+ # If option takes the form --foo=* then arguments are optional.
2181
2183
function mkl_option {
2182
2184
local optgroup=$1
2183
2185
local varname=$2
@@ -2209,6 +2211,10 @@ function mkl_option {
2209
2211
if [[ $3 == * = * ]]; then
2210
2212
optname=" ${optname% =* } "
2211
2213
optval=" ${3#* =} "
2214
+ if [[ $optval == ' *' ]]; then
2215
+ # Avoid globbing of --foo=* optional arguments
2216
+ optval=' \*'
2217
+ fi
2212
2218
fi
2213
2219
2214
2220
safeopt=$( mkl_env_esc $optname )
@@ -2285,7 +2291,7 @@ function mkl_option {
2285
2291
# Arguments:
2286
2292
# option group ("Standard", ..)
2287
2293
# variable name (WITH_FOO)
2288
- # option (--enable-foo)
2294
+ # option (--enable-foo, --enable-foo=*, or --enable-foo=req )
2289
2295
# help ("foo.." ("Enable" and "Disable" will be prepended))
2290
2296
# default (y or n)
2291
2297
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ mkl_option "Compatibility" "mk:COMPAT_DISABLE_DEP_TRACK" "--disable-dependency-t
50
50
mkl_option " Compatibility" " mk:COMPAT_DISABLE_SILENT_RULES" " --disable-silent-rules" " Verbose build output (no-op)"
51
51
mkl_option " Compatibility" " mk:COMPAT_SILENT" " --silent" " Less verbose build output (no-op)"
52
52
mkl_toggle_option " Compatibility" " mk:COMPAT_ENABLE_SHARED" " --enable-shared" " Build shared library (no-op)"
53
+ mkl_toggle_option " Compatibility" " mk:COMPAT_DISABLE_OPT_CHECK" ' --enable-option-checking=*' " Disable configure option checking (no-op)"
53
54
54
55
55
56
mkl_option " Dependency" env:MKL_INSTALL_DEPS " --install-deps" " Attempt to install missing dependencies"
You can’t perform that action at this time.
0 commit comments