1dnl ### A macro to determine endianness of long long 2AC_DEFUN([AC_LITTLE_ENDIAN_LONG_LONG], 3[AC_MSG_CHECKING(for little endian long long) 4AC_CACHE_VAL(ac_cv_have_little_endian_long_long, 5[AC_RUN_IFELSE([AC_LANG_SOURCE([[ 6int main () { 7 union { 8 long long ll; 9 int l [2]; 10 } u; 11 u.ll = 0x12345678; 12 if (u.l[0] == 0x12345678) 13 return 0; 14 return 1; 15} 16]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[ 17if test "x$ac_cv_c_bigendian" = "xyes"; then 18 ac_cv_have_little_endian_long_long=no 19else 20 ac_cv_have_little_endian_long_long=yes 21fi 22])]) 23AC_MSG_RESULT($ac_cv_have_little_endian_long_long) 24if test "$ac_cv_have_little_endian_long_long" = yes 25then 26 AC_DEFINE([HAVE_LITTLE_ENDIAN_LONG_LONG], 1, 27[Define if long long is little-endian.]) 28fi 29]) 30