On 1/30/2012 4:02 AM, Rainer Jung wrote: > > We add apu-1-confg --includes to CPPFLAGS and then use CPP and apu_version.h > to detect > which version we have. That works for most gcc versions, but recent gcc > chokes, because > apu_version.h includes apr_version.h, which can not be found due to our > setting of > CPPFLAGS. gcc 4.6.2 based cpp then aborts parsing apu_version.h and our > version check fails. > > Adding apu-1-confg --includes *plus* apr-1-confg --includes to CPPFLAGS > before the version > check fixes this.
That is a bug in apu-1-config; which must include the apr-1 path in its reported --includes (and --libs). An apu which isn't usable because it doesn't resolve apr is worthless. That's how all .pc and other include/lib resolvers are supposed to behave. The same must be true for the linker.