Hi Thomas, On Tue, May 21, 2024 at 03:06:00PM -0400, Thomas Dickey wrote: > hmm - there are two sets of changes - I don't see a reason for the > change to the curses function checks.
Thank you for reviewing my patch. The curses function check change does have a reason. It can be solved differently in principle. When I ran autoheader, config.hin would lack all the defines that should have come from CF_CURSES_FUNCS while the relevant HAVE_* defines would still show up in config.log after running configure and therefore the resulting dlg_config.h would also lack them. That meant that dialog would perceive a very dysfunctional curses and its shim would fail to compile. Quite clearly, we shouldn't assume a crippled curses and config.hin should contain the relevant templates. As it turns out, autoheader interprets the m4 files and collects the AC_DEFINE and AC_DEFINE_UNQUOTED invocations, well some of them actually. The AC_CHECK_FUNCS would be collected whereas CF_CURSES_FUNCS not, even though both seemed quite similar. The subtle difference is that AC_CHECK_FUNCS uses AS_FOR (a loop that is evaluated using m4) whereas CF_CURSES_FUNCS uses a shell for loop. Thus, autoheader would only see a single, bogus AC_DEFINE_UNQUOTED for all of CF_CURSES_FUNCS and ignore that. Avoiding this shell loop is key here and I went for manually unrolling it, because AS_FOR didn't work out initially and unrolling seemed workable to me. The crucial bit here is that you cannot use shell for control flow here. If you prefer AS_FOR or some other working mechanism, that's fine. Just do something about it to avoid dialog failing to build when we remove libtool-bin from Debian. Helmut