autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of config.h: summary of responses.


From: Daniel Reed
Subject: Re: Use of config.h: summary of responses.
Date: Mon, 13 Sep 2004 13:34:16 -0400 (EDT)

On 2004-09-13T10:20-0500, Bob Friesenhahn wrote:
) The fact of the matter is that some/many libraries have header files
) which are OS/CPU/compiler dependent and there has to be a way to
) record/work-around these dependencies so that the library headers work
) right.  This way is commonly known as 'config.h'.

Ideally, interface files will conform to some specific environment, have
that environment documented, and rely on dependent projects to use something
like the autotools to ensure their build environment conforms.

Changes to the compiler, CPU, or OS should not cause interface files to
change. The interface files should assume reasonable details about the
environment.


With that said, can you provide an example of an OS-, CPU-, or compiler-
dependent attribute that must be recorded in installed interface files to
ensure ABI and unambiguous API?

gnu89 and C99 provide guarantees about types and non-C89 routines that can
be documented and simulated by the autotools.

POSIX and various other environment standards provide guarantees about
networking, file system interaction, and other low-level operations that can
be simulated by support libraries, as with the Cygwin kernel or Solaris'
libnsl.

The availability of extension libraries can be hidden through the API
itself, and good software design can make it possible for extension
libraries to be installed and de-installed without affecting the API. An
example could be a graphics manipulation library that might detect the
availability of libjpeg.so at runtime, with an API that allows for the
manipulation of images without same API being JPEG-specific. This can be
demonstrated in other ways too, and I do not mean to pick on any software in
particular.


To understand why the "knee-jerk reaction" of automatically dismissing the
installation of config.h exists, it is important to consider the software
design principles associated with the autotools, and not simply the
immediate utility they provide.

-- 
Daniel Reed <address@hidden>    http://people.redhat.com/djr/   
http://naim.n.ml.org/
The best executive is the one who has sense enough to pick good men to
do what he wants done, and self-restraint enough to keep from meddling
with them while they do it. -- Theodore Roosevelt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]