gtk-config (ick)



Can we ditch gtk-config? Why should the library "know" where it has
been installed? I'd much rather specify X_CFLAGS and X_LIBS on the
command-line to "configure" to instruct any toolkit using gtk as to
where to locate include files and libraries. At Abbott, out software
directory looks as follows:
	/app/abt/nosw/[Application]-[Version]/[Arch]/[Install tree]
	/app/abt/nosw/lib
	/app/abt/nosw/include

When I install gtk+-0.99.21, I install it in:
	/app/abt/nosw/gtk+-0.99.21/sparc-sun-solaris2.5.1

For library files, I create links from
	/app/abt/nosw/lib/(libgtk*,libgdk*,...)
to the lib directory under the above

For include files, I create links from
	/app/abt/nosw/include/(gdk,glib.h,gtk)
to the include directory under the above

Now, gtk-config comes into play. I configure gtk with:
	CFLAGS=-O ./configure \
	--prefix=/app/abt/nosw/gtk+-1.0/sparc-sun-solaris2.5.1 \
	--disable-xim --with-xinput=no --cache-file=/dev/null

Gtk compiles fine then I try to compile gimp. Now I run into problems
(and I presume with any other app that will use gtk). For one,
'gtk-config --libs' is not entirely correct (for gtk it's mostly
correct). For Solaris, I need to insert -R so I rebuild gtk as
follows:
	X_LIBS=-R/app/abt/nosw/lib CFLAGS=-O ./configure \
	--prefix=/app/abt/nosw/gtk+-1.0/sparc-sun-solaris2.5.1 \
	--disable-xim --with-xinput=no --cache-file=/dev/null

And I recompile gimp again. I recompile gimp as follows:
	CFLAGS="-O -I/app/abt/nosw/include" \
	LDFLAGS="-L/app/abt/nosw/lib -R/app/abt/nosw/lib" ./configure \
	--prefix=/app/abt/nosw/gimp-1.0/sparc-sun-solaris2.5.1 \
	--cache-file=/dev/null

Now, I'm use to specifying certain options with CFLAGS and others with
X_CFLAGS (maybe it's just me) but now I need to add
-I/app/abt/nosw/include to CFLAGS so include files for jpeg, tiff,
png, etc. are found. So, gtk-config hasn't really bought me much (how
about others?). If gtk-config is to specify more than --clfags and
--libs, maybe there's a need. Or, have it specify things specific to
gtk rather than the location of files and libraries.

IMHO, people compiling gimp should know where all the necessary
include files and libraries are and not have this info buried in any
configuration file.

-- 
albert chin (china@pprd.abbott.com)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]