[DTrace-devel] [PATCH v2] configure: add support for --disable-option-checking

Eugene Loh eugene.loh at oracle.com
Thu Feb 19 18:15:45 UTC 2026


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>

On 2/19/26 10:56, Kris Van Hees wrote:
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
>   configure | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/configure b/configure
> index a3107fd0..cb2f585a 100755
> --- a/configure
> +++ b/configure
> @@ -101,6 +101,7 @@ EOF
>           cat >&2 <<'EOF'
>   Optional features:
>   
> +--disable-option-checking	Ignore unrecognized --enable/--with options
>   --disable-dependency-tracking	Suppress automatic dependency tracking
>   
>   Options controlling the compiler (pass on the command line):
> @@ -126,6 +127,11 @@ rm -rf build/.config.new build/.config-vars.mk.new
>   echo 'override CONFIGURED_VARS=' > build/.config-vars.mk.new
>   trap 'rm -rf build/.config.new build/.config-vars.mk.new' ERR
>   
> +# Should we report unknown --disable/enable/with/without-* options?
> +if echo " $@ " | grep ' --disable-option-checking ' &>/dev/null; then
> +   no_check_opts=t
> +fi
> +
>   for option in "$@"; do
>       case "$option" in
>           --help) help; exit 1;;
> @@ -177,6 +183,11 @@ for option in "$@"; do
>           HAVE_BPFMASM=*) write_config_var BPFMASM "$option";;
>           --disable-dependency-tracking) write_make_var WITHOUT_DEPENDENCIES "y";;
>           --enable-dependency-tracking) write_make_var WITHOUT_DEPENDENCIES "n";;
> +        --disable-*|--enable-*|--with-*|--without-*)
> +           if [[ -z $no_check_opts ]]; then
> +              echo "Unknown option $option" >&2
> +              exit 1
> +           fi;;
>           *) echo "Unknown option $option" >&2
>              exit 1;;
>       esac



More information about the DTrace-devel mailing list