4.0.1rc1 fails to configure with `--enable-watch8bit` and `--with-ncurses`
Commit 81286418 intented to forbid configuring a build with --enable-watch8bit
but --without-ncurses
, but it causes an error when you explicitly pass --with-ncurses
:
./configure --build=x86_64-pc-linux-musl --host=x86_64-pc-linux-musl --prefix=/usr/x86_64-pc-linux-musl --bindir=/usr/x86_64-pc-linux-m
usl/bin --sbindir=/usr/x86_64-pc-linux-musl/bin --libdir=/usr/x86_64-pc-linux-musl/lib --datadir=/usr/share --datarootdir=/usr/share --
docdir=/usr/share/doc/procps-4.0.1rc1 --infodir=/usr/share/info --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var/lib --di
sable-dependency-tracking --disable-silent-rules --enable-fast-install --enable-modern-top --enable-nls --enable-pidof --enable-sigwinc
h --enable-watch8bit --disable-harden-flags --disable-libselinux --disable-skill --disable-kill --disable-static --with-ncurses --disab
le-w --without-systemd
[...]
Cannot have both --enable-watch8bit and --without-ncurses
The third argument to AC_ARG_WITH
is executed when either --with-OPT
or --without-OPT
was given:
AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
If the user gave configure the option --with-package or --without-package, run shell commands action-if-given. If neither option was given, run shell commands action-if-not-given. The name package indicates another software package that this program should work with. It should consist only of alphanumeric characters and dashes.
The option's argument is available to the shell commands action-if-given in the shell variable withval, which is actually just the value of the shell variable with_package, with any - characters changed into ‘_’. You may use that variable instead, if you wish.
[1]
So $withval
needs to be checked to see if --with-OPT
or --without-OPT
was specified in https://gitlab.com/procps-ng/procps/-/blob/newlib/configure.ac#L222 or the error needs to be moved to https://gitlab.com/procps-ng/procps/-/blob/newlib/configure.ac#L227 where with_ncurses == no
is handled afaict
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html