autoconf madness

Nils Goroll slink at schokola.de
Wed Dec 7 22:08:28 CET 2016


I'm stuck with this:

to run 32 bit tests on the solaris box, I set CFLAGS externally:

export
PATH=/opt/local/gcc47/bin:/opt/local/gnu/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin
export MESSAGE=32_gcc4.7
export CPPFLAGS="-I/opt/local32/include"
export CFLAGS="-m32"
export LDFLAGS="-m32 -L/opt/local32/lib -R/opt/local32/lib"
runtest &

runtest basically just calls vtest

Now for reasons which I do not understand, autoconf seems to create an
environment where the second (inner) configure called via make distcheck gets
passed the CFLAGS determined during the first (outer) configure run.

The effect is that basic configure tests fail because of the clags being to
strict for the code used by configure itself.

e.g.:

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/vtest.build.32_gcc4.7/varnish-trunk/_build':
configure: error: C compiler cannot create executables
See `config.log' for more details
Makefile:737: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1

caused by conftest.c failing on -Wstrict-prototypes


Read more here: http://www.varnish-cache.org/vtest/bugs_distcheck.html#7fb8751

I understand that outer CFLAGS need to be passed to the inner configure for it
to work, but why should the other configure need pass the CFLAGS it has itself
determined?

Any ideas?



More information about the varnish-dev mailing list