summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-02-05 14:25:11 +0100
committerSlávek Banko <slavek.banko@axis.cz>2017-02-05 14:25:11 +0100
commitc2d9407d82d38ce3b00a67de37c154f650072606 (patch)
tree3b5851cebc8072ea3194870fb5deaf0988745457
parent6569b886c2e43e3afd0367abcdf1d80c5e0fdea5 (diff)
downloadtellico-c2d9407d.tar.gz
tellico-c2d9407d.zip
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake3
-rw-r--r--config.h.cmake4
2 files changed, 7 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6176f72..0ca8036 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -26,6 +26,9 @@ endif( WITH_GCC_VISIBILITY )
##### set architecture flags ####################
tde_setup_architecture_flags( )
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
##### required stuff ############################
diff --git a/config.h.cmake b/config.h.cmake
index dad62ef..46374a8 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,5 +1,9 @@
#cmakedefine VERSION "@VERSION@"
+/* 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@
+
// User specified build options
#cmakedefine HAVE_TAGLIB 1