Re: [gtk-list] Re: Using autoconf with GTK



On Tue, 27 Jul 1999 08:43:04 -0400 (EDT), Trevor Johnson wrote:
> Erik Mouw wrote:
>> Except for GTK, which can be detected with the following macro:
>> 
>>   AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(foobar needs GTK 1.2.x, sorry))
> 
> You have to have the macro first though.  I doubt it comes with m4, and
> the FAQ doesn't mention where to find it, but the GIMP has it in its
> aclocal.m4.  I snarfed the stuff from the GIMP for my much smaller
> project:  http://jpj.net/~trevor/aumix/alpha/aumix-9907240048.tar.gz . 

It is in the file gtk.m4 which comes with GTK+. On a Linux system, it is
automatically installed in /usr/share/aclocal. GIMP has it in its
aclocal.m4 file because that's the way how automake packages are
distributed. If your aclocal script can't find gtk.m4, you can use the
"-I /path/to/directory/with/gtk.m4/file" flag with aclocal, or you can
append gtk.m4 to acinclude.m4. After you run aclocal, autoconf and
automake are able to find the macros.

If you bug me long enough with this, I'll write a FAQ entry before I go on
holidays ;-).

> The configure script and makefiles are working with Linux but not with
> FreeBSD because gtk-config is called gtk10-config, gtk11-config or
> gtk12-config instead (under FreeBSD).  A look at

This is in my opinion a "deliberately broken package". They'd better
install the binary (because that's exactly what the gtk-config script is)
in a separate --exec-prefix'ed directory and document that you should use
the "--with-gtk-exec-prefix" flag to specify which version to use. For
convenience, you could even set a softlink to the most used GTK version.
Been there, done that (on IRIX 5.3 and 6.[2345]).

> http://www.math.utah.edu/docs/info/autoconf_4.html suggests that the
> AC_CHECK_PROGS macro could find which door it's behind. :) 

That doesn't help. AM_PATH_GTK just tries to find gtk-config, there's no
way to specify that the config script has another name.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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