Subject: Re: imlib-config borken...
To: Juan RP <juan@xtraeme.unixbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/06/2003 17:54:55
On Sun, 7 Dec 2003, Juan RP wrote:
> It seems gtk-config was added to the gtk's buildlink, which I think
> it's wrong IMHO... why was it made?
>
> ----------------------------
> revision 1.9
> date: 2003/12/03 01:37:57; author: reed; state: Exp; lines: +3 -2
> Make sure the *-config scripts are buildlinked too.
> (As discussed on tech-pkg in late October; okay'd by wiz then.)
As you can see, I did this.
In this mailing list in October there were a few examples, of why this was
needed. The main problem is that gtk-config could be installed multiple
times in the path. This hit me in November 2002. So imlib (then) was using
the wrong gtk-config and had the wrong information and the imlib build
failed.
What prompted this was that some users in October and September were
linking against wrong freetype-config (I think).
> I've found two fixes for this problem:
>
> 1) Add to imlib's Makefile CONFIGURE_ENV+= GTK_CONFIG="${PREFIX}/bin/gtk-config"
> 2) Remove (again) gtk-config from its buildlink.
Is it normal for imlib-config (or any *-config) script to figure out there
settings dynamically like this?
I see gimp-config does same. I wonder if there is a problem there too.
And orbit-config also runs glib-config. And smpeg-config runs sdl-config.
And xslt-config runs xml2-config. And gdk-pixbuf-config runs gtk-config.
And gnome-config runs gtk-config (and others). And oaf-config runs
orbit-config. And xmms-config runs gtk-config. And orbit2-config runs
pkg-config. Okay ... I do see it is normal.
Luckily, I didn't patch all of these like was suggested in October.
Either my change can be reverted. Or maybe define GTK_CFLAGS and GTK_LIBS
ahead of time and:
$NetBSD$
--- imlib-config.in.orig 2001-03-27 19:18:40.000000000 -0800
+++ imlib-config.in
@@ -55,7 +55,7 @@ while test $# -gt 0; do
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
- echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
+ echo @GTK_CFLAGS@ $includes @X_CFLAGS@
;;
--libs)
libdirs=-L@libdir@
@@ -63,7 +63,7 @@ while test $# -gt 0; do
;;
--libs-gdk)
libdirs=-L@libdir@
- echo $libdirs -lgdk_imlib$gdk_gx_libs `@GTK_CONFIG@ --libs` $gdk_libs
+ echo $libdirs -lgdk_imlib$gdk_gx_libs @GTK_LIBS@ $gdk_libs
;;
*)
echo "${usage}" 1>&2
Jeremy C. Reed
http://www.reedmedia.net/