2010-08-19 06:01:43 +00:00
|
|
|
if test "x$cross_compiling" = xyes; then
|
|
|
|
AC_MSG_CHECKING(whether byte ordering is bigendian)
|
|
|
|
AC_ARG_WITH(endian,
|
2021-12-20 05:48:02 +00:00
|
|
|
AS_HELP_STRING([--with-endian=TYPE],
|
|
|
|
[set endian of target system for cross-compiling.]
|
|
|
|
[TYPE = little or big.]),
|
2010-08-19 06:01:43 +00:00
|
|
|
endian="$withval",
|
|
|
|
)
|
|
|
|
case "x$endian" in
|
|
|
|
xbig)
|
|
|
|
AC_DEFINE(WORDS_BIGENDIAN)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
|
|
|
xlittle)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
x)
|
|
|
|
AC_MSG_RESULT(unspecified, use --with-endian={big,little})
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
x*)
|
|
|
|
AC_MSG_RESULT(unrecognized endianness)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
fi
|