Move endianess checks to autoconf

This commit is contained in:
Ori Avtalion 2009-02-09 18:11:36 +02:00
parent 9409c41302
commit 7a41a745a7
2 changed files with 3 additions and 16 deletions

View File

@ -4,7 +4,7 @@ AC_INIT(syn68k, 1.0, ctm@ardi.com)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([syngen/main.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
@ -113,6 +113,8 @@ AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_VOLATILE
AC_C_BIGENDIAN([AC_DEFINE(BIGENDIAN, 1, [big])], [AC_DEFINE(LITTLEENDIAN, 1, [little])])
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_ERROR_AT_LINE

View File

@ -5,21 +5,6 @@
#include <setjmp.h>
/* Decide whether we are big or little endian here. Add more machines as
* they are supported.
*/
#if !defined(BIGENDIAN) && !defined(LITTLEENDIAN)
# if defined(__BIG_ENDIAN__) || defined(m68k) || defined(mc68000) \
|| defined(sparc) || defined(powerpc) || defined (__ppc__)
# define BIGENDIAN /* ARDI naming convention, why rock the boat? */
# elif defined(__alpha) || defined(i860) || defined(vax) || defined(i386)
# define LITTLEENDIAN
# else
# error "Unknown CPU type"
# endif
#endif
/* Define this for CPUs that require n byte data be aligned
* on addresses congruent to zero modulo n. The name "QUADALIGN"
* is another ARDI convention, why rock the boat?