autoconf: Generic Types

1 
1 5.9.2 Generic Type Checks
1 -------------------------
1 
1 These macros are used to check for types not covered by the "particular"
1 test macros.
1 
1  -- Macro: AC_CHECK_TYPE (TYPE, [ACTION-IF-FOUND],
1           [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT'])
1      Check whether TYPE is defined.  It may be a compiler builtin type
1      or defined by the INCLUDES.  INCLUDES is a series of include
11      directives, defaulting to `AC_INCLUDES_DEFAULT' (⇒Default
      Includes), which are used prior to the type under test.
1 
1      In C, TYPE must be a type-name, so that the expression `sizeof
1      (TYPE)' is valid (but `sizeof ((TYPE))' is not).  The same test is
1      applied when compiling for C++, which means that in C++ TYPE
1      should be a type-id and should not be an anonymous `struct' or
1      `union'.
1 
1      This macro caches its result in the `ac_cv_type_TYPE' variable,
1      with `*' mapped to `p' and other characters not suitable for a
1      variable name mapped to underscores.
1 
1  -- Macro: AC_CHECK_TYPES (TYPES, [ACTION-IF-FOUND],
1           [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT'])
1      For each TYPE of the TYPES that is defined, define `HAVE_TYPE' (in
1      all capitals).  Each TYPE must follow the rules of
1      `AC_CHECK_TYPE'.  If no INCLUDES are specified, the default
1      includes are used (⇒Default Includes).  If ACTION-IF-FOUND
1      is given, it is additional shell code to execute when one of the
1      types is found.  If ACTION-IF-NOT-FOUND is given, it is executed
1      when one of the types is not found.
1 
1      This macro uses M4 lists:
1           AC_CHECK_TYPES([ptrdiff_t])
1           AC_CHECK_TYPES([unsigned long long int, uintmax_t])
1           AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
1 
1 
1    Autoconf, up to 2.13, used to provide to another version of
1 `AC_CHECK_TYPE', broken by design.  In order to keep backward
1 compatibility, a simple heuristic, quite safe but not totally, is
1 implemented.  In case of doubt, read the documentation of the former
1 `AC_CHECK_TYPE', see ⇒Obsolete Macros.
1