[sane-devel] configure broken for gcc 4.0

Henning Meier-Geinitz henning at meier-geinitz.de
Mon Aug 1 18:00:37 UTC 2005


On Sun, Jul 31, 2005 at 09:01:28PM +0200, Julien BLACHE wrote:
> The configure script is broken for gcc 4.0, and will incorrectly
> report that gcc is unable to produce PIC shared libraries, or use the
> -o option, among other things.

Could you check again with latest CVS? Looks like disabling
compilation warnings has "fixed" that. At least I cannot reproduce it
with warnings disabled.

> The problem is that CPPFLAGS is defined before the libtool checks are
> performed, and that CPPFLAGS contains references to Makefile variables
> which are then passed as is to gcc.

... and which complains about them in a warning message because of one
of the warning options ...

> ---- 8< snip ----
> configure:13304: checking if i486-linux-gnu-gcc PIC flag -fPIC works 
> configure:13322: i486-linux-gnu-gcc -c -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prot\
> otypes -pedantic -ansi  -DPATH_SANE_CONFIG_DIR=$(configdir)       -DPATH_SANE_DATA_DIR=$(datadir)         -DPATH_SANE_LOCK_DIR=$(localstatedir)           -DV_MAJOR=1 -\
> DV_MINOR=0 -I/usr/include/gphoto2   -fPIC -DPIC conftest.c >&5 
> <command line>:1:22: warning: '$' in identifier or number 
> configure:13326: $? = 0 
> configure:13337: result: no 

What I don't understand is why the result is ok (0) but still
configure doesn't like it. Is this because of the warning?

> The fix would be to either undefine CPPFLAGS when libtool runs its
> checks, or run the libtool checks before setting CPPFLAGS.

I guess we'd better move the 
lines near to the end of configure.in. But I'd wait until after the
release if the current CVS works for you.


More information about the sane-devel mailing list