[sane-devel] frontends and GIMP

Major A andras@users.sourceforge.net
Tue, 22 Oct 2002 10:51:26 +0100


> > When I replied to the previous email, I thought of the trouble I had
> > myself when I tried to build SANE myself on a machine where GIMP was
> > installed in /usr/local/gimp. The sane-frontends configure script only
> > looks for header files but does not allow the specification of a
> > directory to look in, or at least it isn't straight-forward.
> 
> configure uses the prepocessor, so the standard include directories
> are checked. If it's a default install in /usr/local/include, it
> should be found.

That is precisely what causes problems. When someone installs
something in /usr/local/XXX, more often than not they create symlinks
for the programs in /usr/local/XXX/bin only. It is often undesirable
and inconventient to link the headers and libraries (or even modify
LIBRARY_PATH or /etc/ld.so.conf), especially if there is a program
XXX-config that tells you exactly where to find them.

As SANE is today, it takes a bit of tweaking to build the frontends
with GIMP support under these circumstances.

> > My suggestion is therefore to use gimp-config in the configure script,
> > this should be quite robust (GIMP came with it even in 1.0, I
> > think). Even if the headers and libraries haven't got any symlinks in
> > standard places, gimp-config is usually linked to /usr/local/bin. It
> > will also deal with GTK as a bonus.
> 
> Patches are welcome. We should also make sure that gtk version is
> <=1.2.something, because gtk 2.0 won't work. What about neewer gimp
> versions?

There are some important issues we have to face at some stage -- the
code should be easily ported to GTK 2.0, but GIMP 1.2 also still uses
GTK 1.2, and GIMP 1.3 (which uses GTK 2.0) probably has a new
API... (I haven't even been able to build it from CVS yet!)

How about checking the GTK version and placing #ifdefs inside the code
for incompatible differences?

BTW, gimp-config would be very useful once again because it tells you
which version of GTK to use, and I don't think you have a choice when
you build a GIMP plugin.

  Andras

===========================================================================
Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/
===========================================================================