Re: [gtk-list] includedir -vs- glib.h



Tom Tromey <tromey@creche.cygnus.com> writes:
> Right now glib.h is installed in $(includedir).  glib.h also has some
> of the results from configure embedded in it.
> 
> This is wrong.  The contents of includedir should be shareable across
> a heterogenous network.
> 
> Either glib.h should be installed elsewhere (somewhere beneath
> $exec_prefix), or glib.h should not include the configuration
> information.

I guess part of the problem is that there is no standard place under
$(exec_prefix) to put include files.  Options are:

	$(exec_prefix)/$(target_triplet)/include [call it `toolinclude']
	$(exec_prefix)/$(target_alias)/include   [call it `gcceinclude']
	$(exec_prefix)/include			 [call it `execinclude']

`toolinclude':
+ seems somewhat standard for Cygnus tools
+ is normally used by `GNU libio' for its _G_config.h (?)

`gcceinclude': (Pretty similar to `toolinclude')
+ if GCC was configured with the same `exec_prefix' as GTk, then no need
   to add directory in INCLUDES

`execinclude':
+ for `prefix' == `exec_prefix', a very common case, users find no
   difference.  The current hack of alway putting $(includedir) into
   INCLUDES in all GIMP/GTk `Makefile.am's will still work for this
   specific case.

The problem with all three is that there are cases where is one more
directory has to be put in INCLUDES.  This can be solved by a autoconf
macro that figures out GTK_INCS and GTK_LIBS.

So, any change that puts `glib.h' or some configuration specific parts
of it into $(exec_prefix) should be accompanied by a `gtk_paths.m4' for
autoconf. 

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



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