summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2017-02-05 14:25:11 +0100
committerSlávek Banko <[email protected]>2017-02-05 14:25:21 +0100
commite1c3984bbcd8a841a158043c9351b9f53cf84ec5 (patch)
tree2ec1c752f05ea649ef4c0808b33b8d0b9a0be91d
parentb3453bfbd9c84149116ab3869953eea4b8d002e1 (diff)
downloadtellico-e1c3984bbcd8a841a158043c9351b9f53cf84ec5.tar.gz
tellico-e1c3984bbcd8a841a158043c9351b9f53cf84ec5.zip
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit c2d9407d82d38ce3b00a67de37c154f650072606)
-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