1 AC_DEFUN(SWF_CHECK_BYTEORDER,
3 AC_MSG_CHECKING([for byte order])
5 int main (int argc, char *argv[])
10 ], BIGENDIAN=1, LITTLEENDIAN=1, CROSSCOMPILE=1)
13 if test "x${CROSSCOMPILE}" = "x1"; then
14 AC_MSG_RESULT(we are cross compiling- trying to guess from system type)
15 AC_MSG_CHECKING(for system type)
16 systemguess=`./config.guess`
17 AC_MSG_RESULT(${systemguess})
18 AC_MSG_CHECKING([for byte order, try 2])
19 case "${systemguess}" in
23 *sparc* | *68* | *88k* | *mac* | *Mac* | *sun* | *Sun* | *Amiga* | *amiga* )
30 if test "x${LITTLEENDIAN}" = "x1"; then
31 AC_MSG_RESULT(little endian)
35 if test "x${BIGENDIAN}" = "x1"; then
36 AC_MSG_RESULT(big endian)
39 export WORDS_BIGENDIAN
40 AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, 1)
42 if test "x${BYTEORDERCHECKOK}" != "x1"; then
43 AC_MSG_RESULT(unknown)
44 echo Byte order could not determined. Try to insert your system type into aclocal.m4 about line 21