Bug #1835
closed
AC_ARG_ENABLE usage is incorrect
Added by Daniel Weeks over 8 years ago.
Updated over 5 years ago.
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.
Can you be more specific about which ones are incorrect?
- 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 :)
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.
- 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
- Related to Bug #2468: The autoconf process fails when some options are disabled added
- Related to Bug #2473: Please allow disabling every option (add --without-{option}) added
- Is duplicate of Bug #2797: configure.ac: broken --{enable,disable}-xxx options added
- Status changed from Assigned to Closed
- Assignee deleted (
Andreas Herz)
- Priority changed from High to Normal
- Target version deleted (
70)
Also available in: Atom
PDF