summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-01-31 02:45:44 +0100
committerSlávek Banko <slavek.banko@axis.cz>2017-01-31 02:46:08 +0100
commit435eb14d99c605bc9dac2e5a88b6e630b86ece77 (patch)
treee94682f4c8b0df12222abfdfbfff0e5ac6327a94
parenta9cdb4590ffdcc157a23736a5579ca56da65c21c (diff)
downloadarts-435eb14d99c605bc9dac2e5a88b6e630b86ece77.tar.gz
arts-435eb14d99c605bc9dac2e5a88b6e630b86ece77.zip
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 117ec1e9d46baf07823a7a5719101e25e4b29e2d)
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.h.cmake4
-rw-r--r--mcop/debug.cc1
3 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c73f48..7e355c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,9 @@ tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
tde_setup_architecture_flags( )
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
##### check for include files ###################
diff --git a/config.h.cmake b/config.h.cmake
index 655821d..efd9b36 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,6 +1,10 @@
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
+
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine TIME_WITH_SYS_TIME 1
#cmakedefine HAVE_STDIO_H 1
diff --git a/mcop/debug.cc b/mcop/debug.cc
index d042452..be97528 100644
--- a/mcop/debug.cc
+++ b/mcop/debug.cc
@@ -24,6 +24,7 @@
*/
#include "debug.h"
+#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>