manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Generic Structures,  Prev: Structures.php">Particular Structures,  Up: Structures

5.8.2 Generic Structure Checks
------------------------------

These macros are used to find structure members not covered by the
"particular" test macros.

 -- Macro: AC_CHECK_MEMBER (AGGREGATE.MEMBER, [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND], [INCLUDES = AC_INCLUDES_DEFAULT])
     Check whether MEMBER is a member of the aggregate AGGREGATE.  If no
     INCLUDES are specified, the default includes are used (*note
     Default Includes::).

          AC_CHECK_MEMBER([struct passwd.pw_gecos], [],
                          [AC_MSG_ERROR([we need 'passwd.pw_gecos'])],
                          [[#include ]])

     You can use this macro for submembers:

          AC_CHECK_MEMBER(struct top.middle.bot)

     This macro caches its result in the ‘ac_cv_member_AGGREGATE_MEMBER’
     variable, with characters not suitable for a variable name mapped
     to underscores.

 -- Macro: AC_CHECK_MEMBERS (MEMBERS, [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND], [INCLUDES = AC_INCLUDES_DEFAULT])
     Check for the existence of each ‘AGGREGATE.MEMBER’ of MEMBERS using
     the previous macro.  When MEMBER belongs to AGGREGATE, define
     ‘HAVE_AGGREGATE_MEMBER’ (in all capitals, with spaces and dots
     replaced by underscores).  If ACTION-IF-FOUND is given, it is
     executed for each of the found members.  If ACTION-IF-NOT-FOUND is
     given, it is executed for each of the members that could not be
     found.

     INCLUDES is a series of include directives, defaulting to
     ‘AC_INCLUDES_DEFAULT’ (*note Default Includes::), which are used
     prior to the members under test.

     This macro uses M4 lists:
          AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize])

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.