summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-26 15:25:37 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-26 15:25:37 +0000
commit8c71728242904c3097d2589bd5bc1217026c8666 (patch)
treeedabc83390495820761d5e17e8cf062d4af748dd
parent4140dfdea8aaaf3536eb8ebbadd6a9c4fdab09d5 (diff)
[1.5] Fix big endian checking with autotools
Thanks to winfried for patch Fixes issue 302
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1bb9dee5..71098e51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,8 +465,14 @@ AC_HEADER_DIRENT
### Checks for compiler characteristics
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([-Wextra])
#OPJ_COMPILER_FLAG([-Wshadow])