Index: ChangeLog from Alexandre Duret-Lutz * aclang.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. Index: aclang.m4 =================================================================== RCS file: /home/adl/CVSROOT/ac/aclang.m4,v retrieving revision 1.3 diff -u -r1.3 aclang.m4 --- aclang.m4 2000/10/07 17:52:33 1.3 +++ aclang.m4 2000/10/07 18:49:57 @@ -1137,7 +1137,7 @@ ])# 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, @@ -1199,14 +1199,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext])])]) 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 Index: doc/autoconf.texi =================================================================== RCS file: /home/adl/CVSROOT/ac/doc/autoconf.texi,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 autoconf.texi --- doc/autoconf.texi 2000/10/06 18:41:05 1.1.1.1 +++ doc/autoconf.texi 2000/10/07 18:41:22 @@ -4105,14 +4105,20 @@ @code{AC_TRY_COMPILE} (@pxref{Examining Syntax}) or @code{AC_TRY_RUN} (@pxref{Run Time}) address@hidden AC_C_BIGENDIAN address@hidden 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}. address@hidden 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 address@hidden If the endianess cannot be determined (this can +happen when cross-compiling), execute @var{action-unknown}. +The default for @var{action-if-true} is to define address@hidden The default for @var{action-if-unknown} is to +abort configure. address@hidden defmac @defmac AC_C_CONST @maindex C_CONST