merge from arla: make it work better
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8980 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -22,34 +22,30 @@ krb_cv_c_bigendian_compile,
|
|||||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||||
bogus endian macros
|
bogus endian macros
|
||||||
#endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)])
|
#endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)])
|
||||||
if test "$krb_cv_c_bigendian_compile" = "no"; then
|
AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[
|
||||||
AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[
|
if test "$krb_cv_c_bigendian_compile" = "yes"; then
|
||||||
if test "$krb_cv_c_bigendian" = ""; then
|
AC_TRY_COMPILE([
|
||||||
krb_cv_c_bigendian=unknown
|
|
||||||
fi
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>],[
|
#include <sys/param.h>],[
|
||||||
#if BYTE_ORDER != BIG_ENDIAN
|
#if BYTE_ORDER != BIG_ENDIAN
|
||||||
not big endian
|
not big endian
|
||||||
#endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no)
|
#endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no)
|
||||||
if test "$krb_cv_c_bigendian" = "unknown"; then
|
else
|
||||||
AC_TRY_RUN([main () {
|
AC_TRY_RUN([main () {
|
||||||
/* Are we little or big endian? From Harbison&Steele. */
|
/* Are we little or big endian? From Harbison&Steele. */
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
long l;
|
long l;
|
||||||
char c[sizeof (long)];
|
char c[sizeof (long)];
|
||||||
} u;
|
} u;
|
||||||
u.l = 1;
|
u.l = 1;
|
||||||
exit (u.c[sizeof (long) - 1] == 1);
|
exit (u.c[sizeof (long) - 1] == 1);
|
||||||
}], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes,
|
}], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes,
|
||||||
AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian]))
|
AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian]))
|
||||||
fi
|
|
||||||
])
|
|
||||||
if test "$krb_cv_c_bigendian" = "yes"; then
|
|
||||||
AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
|
|
||||||
fi
|
fi
|
||||||
|
])
|
||||||
|
if test "$krb_cv_c_bigendian" = "yes"; then
|
||||||
|
AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
|
||||||
fi
|
fi
|
||||||
if test "$krb_cv_c_bigendian_compile" = "yes"; then
|
if test "$krb_cv_c_bigendian_compile" = "yes"; then
|
||||||
AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
|
AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
|
||||||
|
Reference in New Issue
Block a user