-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure.ac: Fix AC_ARG_ENABLE/AC_ARG_WITH macros
Multiple tests in configure.ac are flawed: [--snip--] AC_ARG_ENABLE([pthreads], [AS_HELP_STRING([--disable-pthreads], [Disable support for pthreads])], [pthreads_on=1], [pthreads_on=0]) [--snip--] The third argument is "action-if-given" and the fourth argument is "action-if-not-given" [0]. Which means that, whether you pass --enable-pthreads or --disable-pthreads, the third argument will be executed, that is "pthreads_on=1". And if you pass neither, the fourth argument will be executed, i.e. "pthreads_on=0". We want `--enable-pthreads` and `--disable-pthreads` flags to do their job. The right way to do that will be to eliminate "action-if-given" and replace the user-defined `FEATURE_on=0|1` shell variables with the `enable_FEATURE` and `with_PACKAGE` shell variables provided by Autotools. [0] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/autoconf.html#Package-Options Signed-off-by: Aleksandr Makarov <[email protected]>
- Loading branch information
Aleksandr Makarov
committed
Jul 15, 2020
1 parent
017155b
commit 9a76187
Showing
1 changed file
with
30 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters