2005-09-07 Stepan Kasal
* tests/local.at (AT_CHECK_MACRO_CROSS): New macro, creates two tests: the first one is usual AT_CHECK_MACRO test, the second one checks that the same works when cross-compiling. * tests/semantics.at (AC_CHECK_ALIGNOF, AC_CHECK_SIZEOF): Use it. Index: tests/local.at =================================================================== RCS file: /cvsroot/autoconf/autoconf/tests/local.at,v retrieving revision 1.21 diff -u -r1.21 local.at --- tests/local.at 7 Jul 2005 23:56:25 -0000 1.21 +++ tests/local.at 7 Sep 2005 12:39:36 -0000 @@ -423,6 +423,22 @@ ])# AT_CHECK_MACRO +# AT_CHECK_MACRO_CROSS(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], +# [AUTOCONF-FLAGS = -W obsolete]) +# ----------------------------------------------------------- +# Like the previous one, but creates two checks: for native +# compile and for cross-compile. +m4_define([AT_CHECK_MACRO_CROSS], +[AT_CHECK_MACRO($@) +AT_CHECK_MACRO([$1 (cross compile)], + [AT_KEYWORDS([cross]) + # Exercise the code used when cross-compiling + cross_compiling=yes + m4_default([$2], [$1])], + [$3], [$4]) +]) + + # AT_CHECK_AU_MACRO(MACRO) # ------------------------ # Create a minimalist configure.ac running the macro named Index: tests/semantics.at =================================================================== RCS file: /cvsroot/autoconf/autoconf/tests/semantics.at,v retrieving revision 1.51 diff -u -r1.51 semantics.at --- tests/semantics.at 6 Sep 2005 15:34:06 -0000 1.51 +++ tests/semantics.at 7 Sep 2005 12:39:36 -0000 @@ -243,8 +243,8 @@ # AC_CHECK_ALIGNOF # ---------------- -# Not cross-compiling. -AT_CHECK_MACRO([AC_CHECK_ALIGNOF], +# Test also the cross-compiling. +AT_CHECK_MACRO_CROSS([AC_CHECK_ALIGNOF], [[AC_CHECK_ALIGNOF(char) AC_CHECK_ALIGNOF(charchar, [[#include