1if test "x$cross_compiling" = xyes; then
2	AC_MSG_CHECKING(whether byte ordering is bigendian)
3	AC_ARG_WITH(endian,
4[  --with-endian=TYPE      set endian of target system for
5                          cross-compiling. TYPE = little or big.],
6		endian="$withval",
7	)
8	case "x$endian" in
9		xbig)
10			AC_DEFINE(WORDS_BIGENDIAN)
11			AC_MSG_RESULT(yes)
12			;;
13		xlittle)
14			AC_MSG_RESULT(no)
15			;;
16		x)
17			AC_MSG_RESULT(unspecified, use --with-endian={big,little})
18			exit 1
19			;;
20		x*)
21			AC_MSG_RESULT(unrecognized endianness)
22			exit 1
23			;;
24	esac
25else
26	AC_C_BIGENDIAN
27fi
28