Steve Greenland <[EMAIL PROTECTED]> writes:

> The *real* problem with the whole autotools disaster is that it promotes
> a braindead idea of how to achieve portability: a #ifdef branch for
> every different system (or library version, or whatever), strewn
> throughout the entire codebase. Real portability involves understanding
> your target systems, learning where the rough edges and corner cases
> are, and developing proper abstractions to work around them. Oh, and
> actually learning the standard version of the language (if there is
> one), and being able to distinguish between "this is what the language
> says it will do" and "works for me".

I'm not sure you can really blame autotools for this.  In a well-designed
application with a good portability abstraction layer, the autotools are
as good as any for providing the input required to create that portability
layer.

In other words, my preferred coding practice is to use autotools to probe
the system capabilities and selectively enable a portability layer that
deals with missing functionality required for that system.  Then, isolate
all #ifdefs and the like in that portability layer and code the rest of
the application against standard POSIX and ISO C99 functionality, using
the portability layer where necessary.

-- 
Russ Allbery ([EMAIL PROTECTED])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to