[Top][All Lists]

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

autoconf-2.57: unclear documentation of include files in AC_CHECK_HEADER

From: Nelson H. F. Beebe
Subject: autoconf-2.57: unclear documentation of include files in AC_CHECK_HEADER et al
Date: Fri, 7 Mar 2003 12:26:10 -0700 (MST)

The autoconf-2.57 documentation of include files in AC_CHECK_HEADER
and others has text like this:

                  [ACTION-IF-NOT-FOUND], [INCLUDES = `default-includes'])
                  [ACTION-IF-NOT-FOUND], [INCLUDES = `default-includes'])
             If SYMBOL (a function or a variable) is not declared in INCLUDES
             and a declaration is needed, run the shell commands
             Define `SIZEOF_TYPE' (*note Standard Symbols::) to be the size in
             bytes of TYPE.  If `type' is unknown, it gets a size of 0.  If no
             INCLUDES are specified, the default includes are used (*note
             Default Includes::).  If you provide INCLUDE, be sure to include
             `stdio.h' which is required for this macro to run.

I find this rather unclear.  

By experiment, what is actually expected in the includes argument is
something like this:

        #if defined(HAVE_STDDEF_H)
        #include <stddef.h>

but there are few examples of that in the entire autoconf manual.  

The commentary cited above wrongly suggests that one should write

        [INCLUDES=" stdio.h stddef.h ..."]

        [stdio.h stddef.h ...]

or ...

I think that a short section needs to be introduced that describes the
contents of includes arguments, with links to that section from each
of the places where default-includes et al are mentioned.

Frankly, I'd prefer to see a syntax that simply listed the header
files by name, like this

        AC_CHECK_SIZEOF(fpos_t,,[sys/types.h stdio.h stdlib.h])

with autoconf automatically supplying the wrapping

        #if defined(HAVE_xxx_H) 
        #include <xxx.h>

but it is likely too late to do that, unless a clean way of handling
both styles can be identified.

- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 581 4148                  -
- University of Utah                    Internet e-mail: address@hidden  -
- Department of Mathematics, 110 LCB        address@hidden  address@hidden -
- 155 S 1400 E RM 233                       address@hidden                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -

reply via email to

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