Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configure arg enable #1037

Open
wants to merge 2 commits into
base: master_devel
Choose a base branch
from

Conversation

jolivain
Copy link

The AC_ARG_ENABLE() autoconf macro is sometimes incorrect in mstflint.
See:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#Package-Options

A construct such as:

AC_ARG_ENABLE(fw-mgr,
             [  --enable-fw-mgr         Enable compiling mstfwmanager tool and features],
             [enable_fw_mgr="yes"],
             [enable_fw_mgr="no"])

sets the "action-if-given" to always forces the feature to "yes".
This can lead to the inverse of the desired effect. That is, calling:

./configure --disable-fw-mgr

or

./configure --enable-fw-mgr=no

will result to enable the feature. The only way to actually disable the
feature is to currently call "./configure" without the argument, to use
the default value set to "no".

This commit fixes the issue by consistently making all
"action-if-given" to use the quoted "$enableval".

Also, a second commit fixes minor "./configure --help" indentation issues by using AS_HELP_STRING().

The AC_ARG_ENABLE() autoconf macro is sometimes incorrect in mstflint.
See [1].

A construct such as:

    AC_ARG_ENABLE(fw-mgr,
                 [  --enable-fw-mgr         Enable compiling mstfwmanager tool and features],
                 [enable_fw_mgr="yes"],
                 [enable_fw_mgr="no"])

sets the "action-if-given" to always forces the feature to "yes".
This can lead to the inverse of the desired effect. That is, calling:

    ./configure --disable-fw-mgr

or

    ./configure --enable-fw-mgr=no

will result to enable the feature. The only way to actually disable the
feature is to currently call "./configure" without the argument, to use
the default value set to "no".

This commit fixes the issue by consistently making all
"action-if-given" to use the quoted "$enableval".

[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#Package-Options

Signed-off-by: Julien Olivain <[email protected]>
Several AC_ARG_ENABLE() usage are not using AS_HELP_STRING() to
format the argument help strings. This is resulting in incorrect
indentation of the output produced by calling:

    ./configure --help

This commit fixes the issue by adding the missing AS_HELP_STRING().

Signed-off-by: Julien Olivain <[email protected]>
@vjardin
Copy link

vjardin commented Nov 27, 2024

LGTM

@vjardin
Copy link

vjardin commented Dec 3, 2024

Please @ogalbxela , can you consider this topic too ?

@vjardin
Copy link

vjardin commented Jan 18, 2025

Please @ogalbxela ; why is it so slow to merge few obvious lines ? It does not seem to be an active open source project per se.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants