autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3-bigendian-tests.patch


From: Alexandre Duret-Lutz
Subject: Re: 3-bigendian-tests.patch
Date: 12 Aug 2001 14:24:06 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

[...]

 Akim> It looks fine!  But I fail to see where exactly you check that cross-
 Akim> compiling and non corss-compiling tests agree.

The following snippet creates either `at-bendian' or `at-lendian'

| +# Don't use _AT_CHECK_AC_MACRO here, because we are creating
| +# new files and don't want AC_CHECK_ENV to be run.
| +AT_CONFIGURE_AC([AC_C_BIGENDIAN([touch at-bendian],[touch at-lendian],[:])])
| +AT_CHECK_AUTOCONF
| +AT_CHECK_AUTOHEADER
| +AT_CHECK_CONFIGURE

then we do the same in cross-compile mode

| +# Use _AT_CHECK_AC_MACRO here, because it use AC_CHECK_ENV and this time
| +# we want to make sure that we are not creating a new file (which
| +# would indicate a different result from the non cross-compiling case).
| +_AT_CHECK_AC_MACRO(
| +  [cross_compiling=yes
| +   AC_C_BIGENDIAN([touch at-bendian],[touch at-lendian],[:])])

But this time we use _AT_CHECK_AC_MACRO which perform the same
as the four macro calls from the first snippet, plus a calls to
AC_CHECK_ENV.  AC_CHECK_ENV checks that the files present at the
start of the second snippet are the same as those present at the
end.  In other words, it checks that AC_C_BIGENDIAN did not
create a new file (meaning a different endianess result).

I'll reword the comments to make this clearer before checking in.
-- 
Alexandre Duret-Lutz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]