<br><br><div class="gmail_quote">On Mon, May 4, 2009 at 2:22 PM, Louis Lagendijk <span dir="ltr"><<a href="mailto:louis@lagendijk.xs4all.nl">louis@lagendijk.xs4all.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sat, 2009-05-02 at 15:59 -0500, Chris Bagwell wrote:<br>
</div><div class="im"><br>
</div><div class="im">> > > canon_dr.c picks the wrong saneopts.h (from /usr/local/sane). possibly<br>
> > > other sources do the same, but I for now simply removed the old sane<br>
> > > includes<br>
> > ><br>
> ><br>
> > most backends seem to include the system sane files instead of the src<br>
> > ones. perhaps we should change that at some point?<br>
> ><br>
> I didn't worry about this because I assumed our -I options should<br>
> always force it to look for internal versions first.<br>
><br>
> AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I<br>
> $(top_srcdir)/include -DLIBDIR="$(libdir)/sane"<br>
><br>
> Somehow your still getting -I/usr/local/include with higher priority.<br>
> How was that specified? "./configure CPPFLAGS=-I/usr/local/include"?<br>
><br>
> Can you look at what command line options are being used to compile?<br>
> You will need to edit backend/Makefile and remove the "--silent" from<br>
> $LIBTOOL.<br>
<br>
</div>> Generating umax1220u.conf from <a href="http://umax1220u.conf.in" target="_blank">umax1220u.conf.in</a><br>
Generating umax.conf from <a href="http://umax.conf.in" target="_blank">umax.conf.in</a><br>
Generating umax_pp.conf from <a href="http://umax_pp.conf.in" target="_blank">umax_pp.conf.in</a><br>
Generating v4l.conf from <a href="http://v4l.conf.in" target="_blank">v4l.conf.in</a><br>
Generating xerox_mfp.conf from <a href="http://xerox_mfp.conf.in" target="_blank">xerox_mfp.conf.in</a><br>
Generating dll.conf from <a href="http://dll.conf.in" target="_blank">dll.conf.in</a><br>
Generating saned.conf from <a href="http://saned.conf.in" target="_blank">saned.conf.in</a><br>
gmake all-am<br>
gmake[1]: Entering directory<br>
`/usr/ports/graphics/sane-backends/sane-backends/backend'<br>
rm -f dll-s.c<br>
ln -s ./stubs.c dll-s.c<br>
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.<br>
-I../include/sane -I/usr/local/include -I. -I. -I../include -I../include<br>
-DLIBDIR="/usr/local/lib/sane" -DBACKEND_NAME=dll -D_REENTRANT<br>
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d<br>
-DPATH_SANE_DATA_DIR=/usr/local/share<br>
-DPATH_SANE_LOCK_DIR=/usr/local/var/lock/sane -DV_MAJOR=1 -DV_MINOR=1<br>
-g -O2 -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations<br>
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes<br>
-pedantic -ansi -MT libsane_la-dll-s.lo -MD -MP<br>
-MF .deps/libsane_la-dll-s.Tpo -c -o libsane_la-dll-s.lo `test -f<br>
'dll-s.c' || echo './'`dll-s.c<br>
mkdir .libs<br>
</blockquote><div><br>The above confirms we are setting up -I options correctly.<br><br>I believe I see the issue now... We have 3 versions of including saneopts.h in various files.<br><br>#include <sane/getopts.h><br>
#include "sane/getopts.h"<br>#include "../include/sane/getopts.h"<br><br>I had trouble finding an official definition of difference between <> and"" but I finally found in GNU's cpp manual that <> means look in -I places and then standard system header places as a fall back.<br>
<br>It then says that "" looks in current directory but falls back to standard system header places. It makes no mention of referencing -I values. So that seems the issue.<br><br>We need to get rid of all #include "sane/getopts.h" and also better to align with just 1 way to do it such as also getting rid of all #include <sane/getopts.h> as well.<br>
<br>I can align this soon if someone else doesn't want to take that up themselves.<br><br><br></div></div><br>