[glade--]Re: Gnomemm-2 support in glade--



Hi, Christof

I'm posting my latest patches to try to get gnomemm2 support.
I have set myself the task of getting a Gnome App widget working.
It's a challenge...

A number of issues occur to me.
First and foremost, how to support different Gnome versions?

In Gnome 2, the "gnomemm" libraries have been split considerably.
There is libgnomemm, libgnomeuimm, libbonobomm, libbonobouimm,
libgnomecanvasmm, gconfmm - at least; as well as gtkmm itself.

This makes sense from the developer's perspective. However, if
glade-- is to automatically determine its target, we have to
cope with the situation when the user has inconsistent versions
of the libraries installed. It comes back to the question often
asked "how do i find out what version of GNOME I have installed"...
There is no simple answer when each library has its own versioning
scheme.

I see that the first routine called in glade-- is "call_gtkmm_config".
I split this into two parts, one which uses "pkg-config" style checks
as in Gnome 2; the other using "gtk-config" and "gnome-config" checks
as in Gnome 1. At present an environment variable GLADEMM_GNOME_VERSION
is used to select which of these sections is executed. If you set
GLADEMM_GNOME_VERSION to 0 both sections are executed, and the latest
version of each package is detected. This may leave you with
inconsistent versions - however at this stage we don't know if this
is a problem. For example, the user may be building a GTK-only
application, and then it doesn't matter if he has GTK 2 with Gnome 1.

The Gnome 2 detection however will become increasingly messy if we
add checks for all the new component libraries... Maybe we need to
simplify with a simple Gnome2/Gnome1 option - I'd really appreciate your
thoughts on the way you want to go with this.

BTW, there's also a patch in here I called "glademm.utsname.patch".
This is a configure problem I had with the code which tries to
get utsname by #defining _GNU_SOURCE or __USE_GNU.
(I'm using Red Hat 7.2 with updates).

g++ -DHAVE_CONFIG_H -I. -I. -I.. -ISourceWriter -Iwriters -I.    -g -O2
-c -o glade--.o `test -f 'glade--.cc' || echo './'`glade--.cc
In file included from /usr/include/g++-3/cstdio:6,
                 from glade--.cc:28:
/usr/include/stdio.h:241: type specifier omitted for parameter
/usr/include/stdio.h:241: parse error before `)'
make[3]: *** [glade--.o] Error 1

The problem is that confdefs.h contains #include <stdlib.h>, and
this is included BEFORE any #define lines in the test program
conftest.cc. As a result, <stdlib.h> and the files it #includes
will not be #included again, so the macro set in conftest.cc may
not take effect. Thus, _GNU_SOURCE is supposed to give utsname,
but the test does not detect this. You need to #define it before
#including any headers... Actually __USE_GNU is supposed to be
set automatically when you define _GNU_SOURCE, #defining it
directly is unsupported and evil.

Sometimes autoconf drives me mad...

> 
> 
-- 
       Home:                           Work:
Email: prw wainpr demon co uk          peter wainwright nrpb org
Fax:   +44-870-0523185                 +44-1235-822656
Web:   http://www.wainpr.demon.co.uk   http://www.nrpb.org

Attachment: PATCHES.bz2
Description: application/bzip



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