[squid-dev] [PATCH] search for header files in well-known local directories
Amos Jeffries
squid3 at treenet.co.nz
Mon Jan 4 12:25:10 UTC 2016
On 4/01/2016 10:57 p.m., Kinkie wrote:
> On Mon, Jan 4, 2016 at 6:38 AM, Amos Jeffries wrote:
>
>> The auto-conf design for using custom directories (such as these /opt
>> areas) is that the builder supplies the pth parameter
>> (--with-gnutls=/opt/local/gnutls) when such local customized installs
>> are to be used.
>
> There is a problem with this: our automated tests do not allow for
> setting these parameters, except by going through some hoops.
> The code is already in configure.ac, just documented as '--without-gnutls'.
Those hoops will apply whenever the library is in a non-standard
location anyway. Which is also a common case. So we have to jump through
them anyway.
Not jumping hoops correctly is the bug, /opt support comes with fixing it...
> But I believe I found the actual issue, fixed by the attached patch.
> There's two problems:
> - headers are checked before PKG_CHECK_MODULES
> - PKG_CHECK_MODULES sets include-related flags in CFLAGS, but then
> AC_CHECK_HEADERS uses CPPFLAGS, not CFLAGS.
Arg. Bug in PKG_CHECK_MODULES. It should be setting both.
Maybe we should follow William Pursell's method as outlined in his
comment to the question
<http://stackoverflow.com/questions/10220946/pkg-check-modules-considered-harmful>.
>
> The patch addresses both by:
> - calling PKG_CHECK_MODULES before AC_CHECK_HEADERS
> - extending SQUID_STATE_* macros to also cover CPPFLAGS
> - manually setting CPPFLAGS for the benefit of AC_CHECK_HEADERS (and
> rolling it back once the check is done).
>
+1 on this new patch.
Also need to check and fix the OpenSSL use of PKG_CHECK_MODULES which is
probably suffering in the same way.
The krb5 libraries might be too, but do not use AC_CHECK_HEADERS in the
same way.
Amos
More information about the squid-dev
mailing list