coin-or-tools / BuildTools

Macros and patches for GNU autotools
https://coin-or-tools.github.io/BuildTools/
Other
3 stars 7 forks source link

refine when to print big warning #150

Closed svigerske closed 3 years ago

svigerske commented 3 years ago

When using the new AC_COIN_CHK_LIBHDR without default_skip in the 8th argument, one gets a big warning in the configure output when the check fails.

For example,

AC_COIN_CHK_LIBHDR(Cplex,[OsiCpxLib OsiTest],[-lcplex -lpthread -lm -ldl],[],[], ...)

generates

checking for library Cplex with link check... no (bare link)
configure: WARNING:
Linker flags are "-lcplex -lpthread -lm -ldl". If you expected this test to
succeed, check that they are correct. You can supply correct values using
--with-cplex-lflags.

The content of the warning isn't wrong, so I was in a struggle with myself for a while on whether to ask this, but could we not print this big warning with the capital WARNING if the user didn't specify any of the libs lflags or cflags?
I'm just worried that users may get confused and think that something is going wrong. In some places, I already worked around this by changing to default_skip (so I get

checking for library SoPlex with combined link and compile check... skipping (default)

) but we probably don't want this everywhere.

tkralphs commented 3 years ago

I was actually going to suggest the same thing. Right now, when you build with coinbrew, the only output of configure that you see are these warnings, so it is really stark and looks like it must be a problem, even though the build goes through. This will inevitably confuse many people.