Some portability issues
Kean Johnston
kean at armory.com
Wed Oct 11 20:36:06 PDT 2006
> A big part of the autotools philosophy is testing for features, not
> systems. Please try to stick to that whenever possible. I know we've
> already got a bunch of platform-specific code added (e.g. if uname ==
> solaris, then do this), and I'm not very excited about that.
I agree with the philosophy. It is sometimes tricky to get right,
but it is certainly doable. However, using the "test for features"
approach will result in considerably larger changes to the tree
which has the potential for destabilizing it. The particular case
here, adding definitions like SYSV, SVR4 etc, that are very common
in the code, would, I think, be a candidate for the if uname = X
approach. At least for now. We can refine the tests over time but
I can revive two platform ports right now by adding a simple case
statement to the xproto configure.ac, and adding a few global
CFLAGS via xproto.pc.
The "test for features" case is far more compelling when dealing
with a new or young project. The X codebase is decades old, and
the whole modular approach always felt a little like fitting a
square peg into a round hole. It is a testament to some extremely
smart and dedicated people that it works as well as it does in the
relatively short time it has taken to get to where we are today.
So what I would really like to do is triage the current port with
the "test for system" approach, and after 7.2, or perhaps on a
branch, do the larger, more difficult "test for feature" work.
How does that sound?
Kean
More information about the xorg
mailing list