[comp.windows.x] Finding out X version and patch level

ric@ace.sri.com (Richard Steinberger) (03/21/91)

	I apologize if this question has been asked recently and I missed
it.  I tend to work on a variety of computers that all have some version
of X11 available.  Can someone suggest an easy way to figure out what
version a machine is running (R3 or R4, for instance) and what patchlevel
it's at.  Some of these machines have vendor supplied X11, and thus the
source code (with patch file details) is not available.  In other words,
is there an include file I can look at, a shell script I can run, or
a short C program that can be used to determine version and patchlevel.
[BTW - It would also be nice to be able to figure out what version of
Motif is there, again, assuming so source code is available].
	Thanks to all who reply.

regards,

	ric steinberger
	ric@ace.sri.com

klee@wsl.dec.com (Ken Lee) (03/21/91)

In article <22440@unix.SRI.COM>, ric@ace.sri.com (Richard Steinberger) writes:
|> 
|> 	I apologize if this question has been asked recently and I missed
|> it.  I tend to work on a variety of computers that all have some version
|> of X11 available.  Can someone suggest an easy way to figure out what
|> version a machine is running (R3 or R4, for instance) and what patchlevel
|> it's at.  Some of these machines have vendor supplied X11

This may not be possible (or useful).  Most vendor implementations
differ significantly from the MIT sample code.  Also, some vendors ship
different versions of different components (e.g., libraries based on
X11R4 with servers based on X11R3).  Your best bet is to use the
officially supported interfaces for version identification.  This
includes the ProtocolRevision Xlib macro and XtSpecificationRelease Xt
macro.  Also check the documentation that comes with the product.  Most
vendors will advertise something like "conforms to *X Window System,
2nd Edition* by Scheifler & Gettys", which tells you what interfaces
and semantics you can expect.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee