build-sys: fix option handling

Explicit --enable-pidwait wasn't setting ENABLE_PIDWAIT. Fix that by moving the ENABLE_PIDWAIT handling outside of AC_ARG_ENABLE.

While here, fix all the other AC_* calls to correctly set enable_XYZ or with_XYZ to avoid other problems, otherwise they'd be left unset if enabled rather than set to the correct value (yes or no).

Bug: https://bugs.gentoo.org/959706

Merge request reports

Loading