[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_C_BIGENDIAN
From: |
Peter Simons |
Subject: |
AC_C_BIGENDIAN |
Date: |
Wed, 9 Jan 2002 20:44:41 +0100 |
I have the following problem: My code depends on BYTE_ORDER being
defined to either LITTLE_ENDIAN or BIG_ENDIAN. So I use the
AC_C_BIGENDIAN macro to deterimine the endianess, but unfortunately,
the macro does not define the names as I would need them. No big deal,
I simply use the following code to solve that:
AC_C_BIGENDIAN
if test "x$ac_cv_c_bigendian" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DBYTE_ORDER=BIG_ENDIAN"
else
CPPFLAGS="$CPPFLAGS -DBYTE_ORDER=LITTLE_ENDIAN"
fi
Unfortunately, I now do have _two_ defines in the configure output:
The one from AC_C_BIGENDIAN, and my own. This doesn't exactly hurt,
but it's redundant. So I wonder: Is there any way to tell the
AC_C_BIGENDIAN macro not to define anything in DEFS but only to set
$ac_cv_bigendian? Or is there another good solution how to get rid of
the WORDS_BIGENDIAN define?
-peter
- AC_C_BIGENDIAN,
Peter Simons <=