xtrans
Soeren Sandmann
sandmann at redhat.com
Tue May 10 12:00:49 PDT 2005
For people who are not familar with Xtrans (in xc/lib/xtrans), it is a
set of C files
and a header file. To use this set of files you are supposed to #define
various macros
and then #include a file called transport.c.
In the monolithic tree, symlinks are created by the build system, but we
can't really do that
in the modular build. This command:
find . -type l | xargs ls -l | grep xtrans
reveals that xtrans is used by these modules.
- font server
- lbxproxy
- xrx
- Xserver
- lib/X11
I see various ways to proceed in the modular tree:
1 Install all the c and h files in /usr/include
Pro: The simplest thing possible.
Cons: Not a very nice thing to do
This is what is done in Keith's tree.
2 Simply add a copy of Xtrans everywhere it is needed.
Pro: Simplifies all the modules using xtrans. We avoid an
Xtrans module
that is really just an implementation detail.
Cons: The code will have to be kept in sync in four places.
3 Convert into a real shared library
Pro: In some sense the right thing. Will allow us to share
the code.
Cons: will require code changes, including some in the
monolithic tree
My suggestion is to go with 1, and then later, after 7.0 is out, convert
it to a shared
library. To be able to do the shared library conversion, we should either
- make it clear in documentation etc. that xtrans is in no way
supported and that
if you include it in your own non-xorg project, you are going to
lose, because xtrans
is going away in the next version
or
- guard the transport.c file (and other files that may be included)
with
#ifdef XORG_COMPILATION
#else
#error Xtrans is for X.org compilations only
#endif
And then define XORG_COMPILATION in both the monolithic and the
modular build.
Søren
More information about the xorg-modular
mailing list