Header names : config.h is overloaded

 A small technical point here. Suppose I want to write a Gnome application
with all the nice features like localization and so on, but this app is
not in the gnome source tree. Of course it has it's own configure stuff
and hence it's config.h for storing compile-time option detected by
autoconf. Now trying to follow the gnome-hello guidelines, I need to
do something like:

#include <config.h>
#include <gnome.h>

  With the config.h containing all the options for gnome. This mean that
I have to add all the Gnome configuration stuff and macro in my own
configure.in to be able to configure my app for gnome in a proper way.
  I would suggest another scheme where the gnome config.h is just
renamed (say gnome-config.h) and installed (during the make install step
or in the distribution packages). In that case my code turn out to be

#include <config.h>
#include <gnome-config.h>
#include <gnome.h>

(or even better include gnome-config.h from gnome.h) and I can keep
my own configure.in slim, and adding a gnome interface to an existing
program just by detecting it in the configure step become cheaper
from the programmer's point of view (as a programmer, let's say I hate
writing and debugging configure.in files :-) .

  What's wrong with my scheme ? If not what about moving Gnome config.h
to gnome-config.h (at least at make-install stage, to avoid changing
existing apps in the tree).


Daniel.Veillard@w3.org | W3C  MIT/LCS  NE43-344  | Today's Bookmarks :
Tel: +1 617 253 5884  | 545 Technology Square   | Linux, WWW, rpm2html,
Fax: +1 617 258 5999  | Cambridge, MA 02139 USA | badminton, Kaffe,
http://www.w3.org/People/W3Cpeople.html#Veillard | HTTP-NG and Amaya.

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