Bug #1835
closedAC_ARG_ENABLE usage is incorrect
Description
In several locations in configure.ac the AC_ARG_ENABLE usage is incorrect or at least non-standard. Whether --enable-<feature> or --disable-<feature> flag is passed to configure it is treated as if the feature is enabled. The only way to disable a feature is to not pass either option to configure. A user that explicitly disables a feature because a dependency is not available will be met with a unexpected error.
Updated by Victor Julien over 8 years ago
Can you be more specific about which ones are incorrect?
Updated by Andreas Herz over 8 years ago
- Tracker changed from Bug to Optimization
- Assignee set to Andreas Herz
- Target version set to TBD
We will try to improve the whole configure.ac file to be more consistent so we can address that within the general rework. But yes, please provide more details so we can take that into account :)
Updated by Daniel Weeks over 8 years ago
I originally discovered it in the hiredis option but I can see at a glance the same structure exists with the nflog, nfqueue, dag, napatech, and lua options. It appears the form assumed in configure.ac is AC_ARG_ENABLE(..., [action-if-disabled], [action-if-enabled]) when in fact it is AC_ARG_ENABLE(..., [action-if-given], [action-if-not-given]). This leads to configure checking for libraries after the feature has been disabled because /some/ option has been supplied.
Also, in my opinion, this is a clear bug, not an optimization. When a user explicitly sets a feature to be disabled, they expect that to be honored. It is not in these cases.
Updated by Victor Julien almost 8 years ago
- Tracker changed from Optimization to Bug
- Status changed from New to Assigned
- Priority changed from Normal to High
- Target version changed from TBD to 70
Updated by Victor Julien almost 7 years ago
- Related to Bug #2468: The autoconf process fails when some options are disabled added
Updated by Victor Julien over 6 years ago
- Related to Bug #2473: Please allow disabling every option (add --without-{option}) added
Updated by Victor Julien almost 6 years ago
- Is duplicate of Bug #2797: configure.ac: broken --{enable,disable}-xxx options added
Updated by Victor Julien almost 6 years ago
- Status changed from Assigned to Closed
- Assignee deleted (
Andreas Herz) - Priority changed from High to Normal
- Target version deleted (
70)
Fixed in #2797