autoconf: Generic Structures
1
1 5.8.2 Generic Structure Checks
1 ------------------------------
1
1 These macros are used to find structure members not covered by the
1 "particular" test macros.
1
1 -- Macro: AC_CHECK_MEMBER (AGGREGATE.MEMBER, [ACTION-IF-FOUND],
1 [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT'])
1 Check whether MEMBER is a member of the aggregate AGGREGATE. If
11 no INCLUDES are specified, the default includes are used (⇒
Default Includes).
1
1 AC_CHECK_MEMBER([struct passwd.pw_gecos], [],
1 [AC_MSG_ERROR([we need `passwd.pw_gecos'])],
1 [[#include <pwd.h>]])
1
1 You can use this macro for submembers:
1
1 AC_CHECK_MEMBER(struct top.middle.bot)
1
1 This macro caches its result in the
1 `ac_cv_member_AGGREGATE_MEMBER' variable, with characters not
1 suitable for a variable name mapped to underscores.
1
1 -- Macro: AC_CHECK_MEMBERS (MEMBERS, [ACTION-IF-FOUND],
1 [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT'])
1 Check for the existence of each `AGGREGATE.MEMBER' of MEMBERS
1 using the previous macro. When MEMBER belongs to AGGREGATE,
1 define `HAVE_AGGREGATE_MEMBER' (in all capitals, with spaces and
1 dots replaced by underscores). If ACTION-IF-FOUND is given, it is
1 executed for each of the found members. If ACTION-IF-NOT-FOUND is
1 given, it is executed for each of the members that could not be
1 found.
1
1 INCLUDES is a series of include directives, defaulting to
1 `AC_INCLUDES_DEFAULT' (⇒Default Includes), which are used
1 prior to the members under test.
1
1 This macro uses M4 lists:
1 AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize])
1