Control: severity -1 wishlist On Sun, Oct 01, 2017 at 03:57:54PM +0200, tho...@habets.se wrote: > 1a) Why not use `AC_TRY_LINK`?
That'd work as well. > 1b) Why not do the simplest change possible, and just `s/RUN/COMPILE/` > (or `LINK`) without further code change? AC_TRY_RUN and AC_TRY_COMPILE take different arguments. It's not that easy unfortunately. > 2) Indeed, why not use `AC_TRY_RUN` with third argument[1]? I think that using the third argument of AC_TRY_RUN is a bad thing in general. It encodes a guess on what is supposed to happen. The guess can be right or wrong, so using it makes the build less reproducible and we all want reproducible builds, right? > As for runtime property: Yeah, that's true. I've mostly fixed the > drawback of the false positive (turning runtime error when compile > time worked into a warning) with a commit just now[2]. Thank you. So if you insist on using RUN checks, I can add the relevant cache variables[1], even though I think this is a bad solution. Whenever we can reasonably do without RUN checks, we should. At least the two prototype checks clearly allow doing so. For CLOCK_MONOTONIC, both of our contradictory views make sense and we'll likely agree to disagree. I could be persuaded that falling back to AC_CHECK_DECL for cross builds only is reasonable. I see that you understand the issues at hand very well and ask you to implement the option you prefer (if any). My patch was meant as a convenience and demonstration, but there are more solutions as you figured. In any case, we should not let this bug languish but try to close it soonish with whatever resolution. If all else fails, the resolution is to let the builder set the cache variables. Helmut [1] Unlike many other upstreams, arping does provide cache variables for these things!