Skip to content

Commit 3cf6d7d

Browse files
committed
configure: Support --disable-option-checking
This is mirroring rust-lang/rust#31169. The RPM %configure macro sets a lot of useful paths for typical configure scripts, but some of these values are not recognized here in Cargo. It's nice to have an option to ignore those, rather than failing on `validate_opt`.
1 parent dc12479 commit 3cf6d7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ opt debug 1 "build with extra debug fun"
296296
opt optimize 1 "build with optimizations"
297297
opt nightly 0 "build nightly packages"
298298
opt verify-install 1 "verify installed binaries work"
299+
opt option-checking 1 "complain about unrecognized options in this configure script"
299300
opt cross-tests 1 "run cross-compilation tests"
300301
valopt prefix "/usr/local" "set installation prefix"
301302
valopt local-rust-root "" "set prefix for local rust binary"
@@ -337,8 +338,11 @@ then
337338
fi
338339

339340
# Validate Options
340-
step_msg "validating $CFG_SELF args"
341-
validate_opt
341+
if [ -z "$CFG_DISABLE_OPTION_CHECKING" ]
342+
then
343+
step_msg "validating $CFG_SELF args"
344+
validate_opt
345+
fi
342346

343347
step_msg "looking for build programs"
344348

0 commit comments

Comments
 (0)