[1.5] Fix big endian checking with autotools

Thanks to winfried for patch
Fixes issue 302
This commit is contained in:
Mathieu Malaterre 2014-03-26 15:25:37 +00:00
parent 4140dfdea8
commit 8c71728242
1 changed files with 8 additions and 2 deletions

View File

@ -465,8 +465,14 @@ AC_HEADER_DIRENT
### Checks for compiler characteristics ### Checks for compiler characteristics
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_C_BIGENDIAN ac_cv_c_big_endian=0
AC_C_BIGENDIAN([ac_cv_c_big_endian=yes], [ac_cv_c_big_endian=no],[])
#
if test "x${ac_cv_c_big_endian}" = "xyes" ; then
AC_DEFINE(OPJ_BIG_ENDIAN, [1], [define to 1 if your machine has BE])
AC_DEFINE(WORDS_BIGENDIAN, [1], [define to 1 if your machine has BE])
fi
#
#OPJ_COMPILER_FLAG([-Wall]) #OPJ_COMPILER_FLAG([-Wall])
#OPJ_COMPILER_FLAG([-Wextra]) #OPJ_COMPILER_FLAG([-Wextra])
#OPJ_COMPILER_FLAG([-Wshadow]) #OPJ_COMPILER_FLAG([-Wshadow])