manpagez: man pages & more
info autoconf
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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] @ovar{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 (see section Default Includes).

AC_CHECK_MEMBER([struct passwd.pw_gecos], [],
                [AC_MSG_ERROR([we need `passwd.pw_gecos'])],
                [[#include <pwd.h>]])

You can use this macro for submembers:


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] @dvar{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 (see section 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])

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 26, 2012 using texi2html 5.0.

© 2000-2019
Individual documents may contain additional copyright information.