[comp.windows.x] structure of include files in the R4 source tree

dmh@goanna.oz.au (Darren Hosking) (01/10/90)

Many of the clients in contrib (from R4) include widget include files in
the following way (for example):-

#include <X11/Command.h>

But the structure of mit/X11 is such that Command.h is in a subdirectory (Xaw).

What is the correct layout of the include files in the source tree?

What is the layout of the include files once installed?

I assume the contributed clients would be buildable from the source tree
(since we are still running R3 until R4 is completely built) as in R3, but
it doesn't appear to be the case.

	Thanks in advance, dmh

Darren Hosking				ACSnet: dmh@goanna.oz	 
Department Of Computer Science		ARPA:   dmh%goanna.oz.au@uunet.uu.net
RMIT					CSNET:  dmh%goanna.oz.au@australia
GPO Box 2476V				UUCP:   ...!uunet!goanna.oz.au!dmh
Melbourne Vic., Australia 3001

moraes@cs.toronto.edu (Mark Moraes) (01/10/90)

dmh@goanna.oz.au (Darren Hosking) writes:
>I assume the contributed clients would be buildable from the source tree
>(since we are still running R3 until R4 is completely built) as in R3, but
>it doesn't appear to be the case.

In general, for any X distribution so far, programs in the contrib
section for Release N have been tested only under Release N-1 since
many of those of us who contributed clients did not have R4 to test
them on, so any changes from R3 to R4 structure may well confuse
contrib clients. (In some cases, based on feedback from people who ran
R4beta, I made some fixes, but things got fixed even from R4beta to
R4, hence the xtroff problem)

If you want the contrib to compile, it may be better to #define
InstallOldHeaderFiles YES in your site.def (Default distribution
setting is NO) Of course, you can instead keep it at NO and fix all the
software that breaks, which is The Better Way but involves a tad more
work. (if you do the latter, many of us would be very grateful if you
posted the fixes)

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/10/90)

    But the structure of mit/X11 is such that Command.h is in a subdirectory
    (Xaw).

The Athena Widget header files moved between R3 and R4.  We warned people
about this on this list at least once before R4 came out.  R4 provides a
compatibility mechanism.  If you want to build R3 clients without
modifications, you wanted to set

#define InstallOldHeaderFiles YES

in your configuration file.  You can do that now, then do the following:
	cd <R4>/lib/Xaw
	make Makefile
	make depend
	make install

grunwald@foobar.colorado.edu (Dirk Grunwald) (01/10/90)

>>>>> On 10 Jan 90 13:41:53 GMT, moraes@cs.toronto.edu (Mark Moraes) said:

Mark> dmh@goanna.oz.au (Darren Hosking) writes:
>I assume the contributed clients would be buildable from the source tree
>(since we are still running R3 until R4 is completely built) as in R3, but
>it doesn't appear to be the case.
	..omitted..
Mark> If you want the contrib to compile, it may be better to #define
Mark> InstallOldHeaderFiles YES in your site.def (Default distribution
Mark> setting is NO) Of course, you can instead keep it at NO and fix all the
Mark> software that breaks, which is The Better Way but involves a tad more
Mark> work. (if you do the latter, many of us would be very grateful if you
Mark> posted the fixes)
---

another alternative is to change your site.def to use e.g.
	-I/usr/local/include/X11 -I/usr/local/include/X11/Xaw

for includes & and then make a symlink

	ln -s /usr/local/include/X11/Xaw /usr/local/include/X11/Xaw/X11

of course, this is gross, but it saves you the hassle of changing tons
of source.

sja@sirius.hut.fi (Sakari Jalovaara) (01/11/90)

For a band aid to compile clients that include <X11/SomeAthenaWidget.h> do

	ln -s /usr/include/X11/Xaw X11

in the client source directory and add -I. to CFLAGS in the Imakefile.

> of course, this is gross, but it saves you the hassle of changing tons
> of source.

Quite.
									++sja