* tests/semantics.at (AC_C_BIGENDIAN): New test.

This commit is contained in:
Alexandre Duret-Lutz 2001-08-12 12:35:50 +00:00
parent a5b70717c1
commit 0828ac5acc
2 changed files with 43 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2001-08-12 Alexandre Duret-Lutz <duret_g@epita.fr>
* tests/semantics.at (AC_C_BIGENDIAN): New test.
2001-08-11 Alexandre Duret-Lutz <duret_g@epita.fr>
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Handle ACTION-IF-TRUE,

View File

@ -307,6 +307,45 @@ AT_CHECK_CONFIGURE
AT_CLEANUP(path)
# -------------- #
# AC_C_BIGENDIAN #
# -------------- #
AT_SETUP(AC_C_BIGENDIAN)
# Make sure that AC_C_BIGENDIAN behave the same whether we are
# cross-compiling or not. Actually, the tests are differents in both
# case, and the cross-compiling case is allowed to fail (BTW, it might
# be interesting to replace [:] by [touch at-uendian] to cach systems for
# which AC_C_BIGENDIAN does fail, just to know if such a system
# exists.)
# The following is an manually-expansed call to _AT_CHECK_AC_MACRO
# with the call to AC_CHECK_ENV removed. We don't want AC_CHECK_ENV
# because we are creating a new file (at-bendian or at-lendian)
# as a side effect of AT_CHECK_CONFIGURE.
AT_CONFIGURE_AC([AC_C_BIGENDIAN([touch at-bendian],[touch at-lendian],[:])])
AT_CHECK_AUTOCONF
AT_CHECK_AUTOHEADER
AT_CHECK_CONFIGURE
rm -f config.hin # So that next run of autoheader is quiet.
# The last run of AC_CHECK_CONFIGURE has created at-bendian or at-lendian.
# Now we'll perform the same in cross-compiling mode, and make sure
# that no new file is created (if a new file is created it means
# AC_C_BIGENDIAN computed a different result). Checking for a new
# file is done using AC_CHECK_ENV which is called by _AT_CHECK_AC_MACRO.
_AT_CHECK_AC_MACRO(
[cross_compiling=yes
AC_C_BIGENDIAN([touch at-bendian],[touch at-lendian],[:])])
# Make sure AC_C_BIGENDIAN with no argument will define WORDS_BIGENDIAN
AT_CONFIGURE_AC([AC_C_BIGENDIAN])
AT_CHECK_AUTOHEADER
AT_CHECK([grep WORDS_BIGENDIAN config.hin], [], [ignore])
AT_CLEANUP(at-bendian at-lendian)
# ------------------------------ #
# AC_PATH_PROG & AC_PATH_PROGS. #