]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(AC_CHECK_DECLS): Also check macros,
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Sep 2006 20:42:43 +0000 (20:42 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Sep 2006 20:42:43 +0000 (20:42 +0000)
structure, function symbols, and enums.

tests/semantics.at

index bb94bd2773c69c0d0b4e787bd7c2e7f8e5ba0339..3e9f699780803a8f2d94bd3d32ce8d7872857c45 100644 (file)
@@ -104,12 +104,21 @@ esac
 # AC_CHECK_DECLS
 # --------------
 # Check that it performs the correct actions:
-# Must define NEED_NO_DECL, but not NEED_YES_DECL.
 AT_CHECK_MACRO([AC_CHECK_DECLS],
-[[AC_CHECK_DECLS([yes, no],,,
-                [int yes = 1;])]],
+[[AC_CHECK_DECLS([yes, no, myenum, mystruct, myfunc, mymacro1, mymacro2],,,
+                [[int yes = 1;
+                  enum { myenum };
+                  struct { int x[20]; } mystruct;
+                  extern int myfunc();
+                  #define mymacro1(arg) arg
+                  #define mymacro2]])]],
 [AT_CHECK_DEFINES(
-[#define HAVE_DECL_NO 0
+[#define HAVE_DECL_MYENUM 1
+#define HAVE_DECL_MYFUNC 1
+#define HAVE_DECL_MYMACRO1 1
+#define HAVE_DECL_MYMACRO2 1
+#define HAVE_DECL_MYSTRUCT 1
+#define HAVE_DECL_NO 0
 #define HAVE_DECL_YES 1
 ])])