mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-19 14:40:24 +08:00
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Handle ACTION-IF-TRUE,
ACTION-IF-FALSE, and ACTION-IF-UNKNOWN. * doc/autoconf.texi (C Compiler Characteristics): Update documentation for AC_C_BIGENDIAN.
This commit is contained in:
parent
6667f46047
commit
a5b70717c1
@ -1,3 +1,10 @@
|
||||
2001-08-11 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Handle ACTION-IF-TRUE,
|
||||
ACTION-IF-FALSE, and ACTION-IF-UNKNOWN.
|
||||
* doc/autoconf.texi (C Compiler Characteristics): Update
|
||||
documentation for AC_C_BIGENDIAN.
|
||||
|
||||
2001-08-11 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Guess endianness by grep'ing
|
||||
|
4
NEWS
4
NEWS
@ -12,6 +12,10 @@
|
||||
- The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures.
|
||||
** C Macros
|
||||
- AC_C_BIGENDIAN supports the cross-compiling case.
|
||||
- AC_C_BIGENDIAN accepts ACTION-IF-TRUE, ACTION-IF-FALSE, and
|
||||
ACTION-IF-UNKNOWN arguments. All are facultative, and the default
|
||||
for ACTION-IF-TRUE is to define WORDS_BIGENDIAN like AC_C_BIGENDIAN
|
||||
always did.
|
||||
|
||||
* Major changes in Autoconf 2.52
|
||||
** Documentation
|
||||
|
@ -4486,14 +4486,26 @@ features. To check for characteristics not listed here, use
|
||||
@code{AC_TRY_COMPILE} (@pxref{Examining Syntax}) or @code{AC_TRY_RUN}
|
||||
(@pxref{Run Time})
|
||||
|
||||
@defmac AC_C_BIGENDIAN
|
||||
@defmac AC_C_BIGENDIAN (@ovar{action-if-true}, @ovar{action-if-false}, @ovar{action-if-unknown})
|
||||
@maindex C_BIGENDIAN
|
||||
@cvindex WORDS_BIGENDIAN
|
||||
@cindex Endianness
|
||||
If words are stored with the most significant byte first (like Motorola
|
||||
and SPARC, but not Intel and VAX, CPUs), define @code{WORDS_BIGENDIAN}.
|
||||
@end defmac
|
||||
and SPARC CPUs), execute @var{action-if-true}. If words are stored with
|
||||
the less significant byte first (like Intel and VAX CPUs), execute
|
||||
@var{action-if-false}.
|
||||
|
||||
This macro runs a test-case if endianness cannot be determined from the
|
||||
system header files. When cross-compiling the test-case is not run but
|
||||
grep'ed for some magic values. @var{action-if-unknown} is executed if
|
||||
the latter case fails to determine the byte sex of the host system.
|
||||
|
||||
The default for @var{action-if-true} is to define
|
||||
@samp{WORDS_BIGENDIAN}. The default for @var{action-if-false} is to do
|
||||
nothing. And finally, the default for @var{action-if-unknown} is to
|
||||
abort configure and tell the installer which variable he should preset
|
||||
to bypass this test.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_C_CONST
|
||||
@maindex C_CONST
|
||||
|
@ -828,8 +828,8 @@ fi
|
||||
])# AC_C_LONG_DOUBLE
|
||||
|
||||
|
||||
# AC_C_BIGENDIAN
|
||||
# --------------
|
||||
# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
|
||||
# -------------------------------------------------------------------------
|
||||
AC_DEFUN([AC_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
|
||||
[# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
@ -884,14 +884,16 @@ if test `grep -l LiTTleEnDian conftest.$ac_objext` ; then
|
||||
fi])])])])
|
||||
case $ac_cv_c_bigendian in
|
||||
yes)
|
||||
AC_DEFINE(WORDS_BIGENDIAN, 1,
|
||||
[Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX).]);;
|
||||
m4_default([$1],
|
||||
[AC_DEFINE([WORDS_BIGENDIAN], 1,
|
||||
[Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;;
|
||||
no)
|
||||
;;
|
||||
$2 ;;
|
||||
*)
|
||||
AC_MSG_ERROR([unknown endianess
|
||||
presetting ac_cv_c_bigendian=no (or yes) will help]);;
|
||||
m4_default([$3],
|
||||
[AC_MSG_ERROR([unknown endianess
|
||||
presetting ac_cv_c_bigendian=no (or yes) will help])]) ;;
|
||||
esac
|
||||
])# AC_C_BIGENDIAN
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user