Skip to content

Commit 8a0d7d0

Browse files
committed
Added --disable-option-checking (autoconf compat no-op)
1 parent 9a014e9 commit 8a0d7d0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ while [[ ! -z $@ ]]; do
105105
arg="$1"
106106
shift
107107

108-
if [[ -z $arg ]]; then
108+
if [[ -z $arg && $reqarg != '\*' ]]; then
109109
mkl_err "Missing argument to option --$name $reqarg"
110110
exit 1
111111
fi

mklove/modules/configure.base

+8-2
Original file line numberDiff line numberDiff line change
@@ -2173,11 +2173,13 @@ $1"
21732173
# Arguments:
21742174
# option group ("Standard", "Cross-Compilation", etc..)
21752175
# variable name
2176-
# option ("--foo=feh")
2176+
# option ("--foo", "--foo=*", "--foo=args_required")
21772177
# help
21782178
# default (optional)
21792179
# assignvalue (optional, default:"y")
21802180
# function block (optional)
2181+
#
2182+
# If option takes the form --foo=* then arguments are optional.
21812183
function mkl_option {
21822184
local optgroup=$1
21832185
local varname=$2
@@ -2209,6 +2211,10 @@ function mkl_option {
22092211
if [[ $3 == *=* ]]; then
22102212
optname="${optname%=*}"
22112213
optval="${3#*=}"
2214+
if [[ $optval == '*' ]]; then
2215+
# Avoid globbing of --foo=* optional arguments
2216+
optval='\*'
2217+
fi
22122218
fi
22132219

22142220
safeopt=$(mkl_env_esc $optname)
@@ -2285,7 +2291,7 @@ function mkl_option {
22852291
# Arguments:
22862292
# option group ("Standard", ..)
22872293
# variable name (WITH_FOO)
2288-
# option (--enable-foo)
2294+
# option (--enable-foo, --enable-foo=*, or --enable-foo=req)
22892295
# help ("foo.." ("Enable" and "Disable" will be prepended))
22902296
# default (y or n)
22912297

mklove/modules/configure.builtin

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ mkl_option "Compatibility" "mk:COMPAT_DISABLE_DEP_TRACK" "--disable-dependency-t
5050
mkl_option "Compatibility" "mk:COMPAT_DISABLE_SILENT_RULES" "--disable-silent-rules" "Verbose build output (no-op)"
5151
mkl_option "Compatibility" "mk:COMPAT_SILENT" "--silent" "Less verbose build output (no-op)"
5252
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)"
5354

5455

5556
mkl_option "Dependency" env:MKL_INSTALL_DEPS "--install-deps" "Attempt to install missing dependencies"

0 commit comments

Comments
 (0)