[PATCH] Configure: introduced --with-*-module-opt option
Maxim Dounin
mdounin at mdounin.ru
Wed May 10 16:46:11 UTC 2023
Hello!
On Wed, May 10, 2023 at 12:00:35AM -0700, Dmitry Volyntsev wrote:
> # HG changeset patch
> # User Dmitry Volyntsev <xeioex at nginx.com>
> # Date 1683701820 25200
> # Tue May 09 23:57:00 2023 -0700
> # Node ID 85643f113750f1c49a7ea3dea568da4e3137ec4b
> # Parent b71e69247483631bd8fc79a47cc32b762625b1fb
> Configure: introduced --with-*-module-opt option.
>
> --with-*-module-opt provides a generic way to pass arbitrary configure
> options to an nginx addon configure script.
>
> For example when --with-foo-module-opt=value is provided the following
> variable is defined: $NGX_FOO_MODULE_OPT.
>
> While $NGX_FOO_MODULE_OPT can be provided as an environment variable it
> is inconsistent with other similar options like --with-pcre-opt or
> --with-openssl-opt. Also the introduced option enforces a unified named
> convention for opt variables for nginx addons.
>
> diff --git a/auto/options b/auto/options
> --- a/auto/options
> +++ b/auto/options
> @@ -343,6 +343,11 @@ use the \"--with-mail_ssl_module\" optio
>
> --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
> --add-dynamic-module=*) DYNAMIC_ADDONS="$DYNAMIC_ADDONS $value" ;;
> + --with-*-module-opt=*)
> + mod=`echo "$option" | sed -e 's/--with-//' -e 's/-module-opt.*//' \
> + | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
> + eval "NGX_${mod}_MODULE_OPT"="$value"
> + ;;
>
> --with-compat) NGX_COMPAT=YES ;;
>
I don't think I like this approach. It's hardly different from
the environment variable approach suggested previously, and
provides no syntax checking and/or error reporting.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list