<br><br><div class="gmail_quote">On Mon, May 4, 2009 at 2:22 PM, Louis Lagendijk <span dir="ltr">&lt;<a href="mailto:louis@lagendijk.xs4all.nl">louis@lagendijk.xs4all.nl</a>&gt;</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">&gt; &gt; &gt; canon_dr.c picks the wrong saneopts.h (from /usr/local/sane). possibly<br>
&gt; &gt; &gt; other sources do the same, but I for now simply removed the old sane<br>
&gt; &gt; &gt; includes<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; most backends seem to include the system sane files instead of the src<br>
&gt; &gt; ones. perhaps we should change that at some point?<br>
&gt; &gt;<br>
&gt; I didn&#39;t worry about this because I assumed our -I options should<br>
&gt; always force it to look for internal versions first.<br>
&gt;<br>
&gt; AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I<br>
&gt; $(top_srcdir)/include -DLIBDIR=&quot;$(libdir)/sane&quot;<br>
&gt;<br>
&gt; Somehow your still getting -I/usr/local/include with higher priority.<br>
&gt; How was that specified?  &quot;./configure CPPFLAGS=-I/usr/local/include&quot;?<br>
&gt;<br>
&gt; Can you look at what command line options are being used to compile?<br>
&gt; You will need to edit backend/Makefile and remove the &quot;--silent&quot; from<br>
&gt; $LIBTOOL.<br>
<br>
</div>&gt; 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&#39;<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=&quot;/usr/local/lib/sane&quot; -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>
&#39;dll-s.c&#39; || echo &#39;./&#39;`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 &lt;sane/getopts.h&gt;<br>
#include &quot;sane/getopts.h&quot;<br>#include &quot;../include/sane/getopts.h&quot;<br><br>I had trouble finding an official definition of difference between &lt;&gt; and&quot;&quot; but I finally found in GNU&#39;s cpp manual that &lt;&gt; means look in -I places and then standard system header places as a fall back.<br>
<br>It then says that &quot;&quot; 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 &quot;sane/getopts.h&quot; and also better to align with just 1 way to do it such as also getting rid of all #include &lt;sane/getopts.h&gt; as well.<br>
<br>I can align this soon if someone else doesn&#39;t want to take that up themselves.<br><br><br></div></div><br>