]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Ensure we do not regress with AC_CHECK_MEMBERS.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 10 Aug 2009 18:35:12 +0000 (20:35 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 10 Aug 2009 18:35:30 +0000 (20:35 +0200)
* tests/semantics.at (AC_CHECK_MEMBERS): Expose the recent
AC_CHECK_MEMBERS fix.
(AC_CHECK_MEMBER): New test group.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/semantics.at

index 20c59218917f451ada14b7e7ae321ce469ef338d..80cd9a13947e248f5be3f937029ae17aafd4318e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Ensure we do not regress with AC_CHECK_MEMBERS.
+       * tests/semantics.at (AC_CHECK_MEMBERS): Expose the recent
+       AC_CHECK_MEMBERS fix.
+       (AC_CHECK_MEMBER): New test group.
+
 2009-08-10  Jeff Squyres  <jsquyres@cisco.com>  (tiny change)
 
        Fix typo in AC_REQUIRE description.
index 9908a15c42b26d74d1bdd6ca9d521e8eb74b09e9..d25b1883266cf5fa7878e8c8db208bc8643cb6be 100644 (file)
@@ -255,6 +255,32 @@ AT_CHECK_DEFINES(
 AT_CLEANUP
 
 
+# AC_CHECK_MEMBER
+# ----------------
+# Check that it performs the correct actions.
+# Must define HAVE_STRUCT_YES_S_YES, but not HAVE_STRUCT_YES_S_NO.
+AT_CHECK_MACRO([AC_CHECK_MEMBER],
+[[AC_CHECK_MEMBER([struct yes_s.yes],
+                 [AC_DEFINE([HAVE_STRUCT_YES_S_YES], [1],
+                            [Define to 1 if `yes' is a member of `struct yes_s'.])],,
+                  [struct sub { int x; };
+                   struct yes_s { int yes; struct sub substruct; };])
+  AC_CHECK_MEMBER([struct yes_s.no],
+                 [AC_DEFINE([HAVE_STRUCT_YES_S_NO], [1],
+                            [Define to 1 if `no' is a member of `struct yes_s'.])],,
+                  [struct sub { int x; };
+                   struct yes_s { int yes; struct sub substruct; };])
+  AC_CHECK_MEMBER([struct yes_s.substruct],
+                 [AC_DEFINE([HAVE_STRUCT_YES_S_SUBSTRUCT], [1],
+                            [Define to 1 if `substruct' is a member of `struct yes_s'.])],,
+                  [struct sub { int x; };
+                   struct yes_s { int yes; struct sub substruct; };])]],
+[AT_CHECK_DEFINES(
+[/* #undef HAVE_STRUCT_YES_S_NO */
+#define HAVE_STRUCT_YES_S_SUBSTRUCT 1
+#define HAVE_STRUCT_YES_S_YES 1
+])])
+
 # AC_CHECK_MEMBERS
 # ----------------
 # Check that it performs the correct actions.
@@ -267,7 +293,9 @@ AT_CHECK_MACRO([AC_CHECK_MEMBERS],
 [/* #undef HAVE_STRUCT_YES_S_NO */
 #define HAVE_STRUCT_YES_S_SUBSTRUCT 1
 #define HAVE_STRUCT_YES_S_YES 1
-])])
+])
+AT_CHECK([grep 'yes.*member of.*yes_s' config.h], [], [ignore])
+])
 
 
 # AC_CHECK_ALIGNOF