summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-08-25 15:26:49 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-09-01 18:41:35 +0200
commit74d59d78840da38cdcbe4dacb032fec2e0f2f437 (patch)
tree87278d87493c63a78aab3b1e8ccfabff8bab90f0
parent4aae8e03369bf188b6300f75745e6cc837889157 (diff)
downloadtdeadmin-74d59d78840da38cdcbe4dacb032fec2e0f2f437.tar.gz
tdeadmin-74d59d78840da38cdcbe4dacb032fec2e0f2f437.zip
cmake: Add 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.cmake16
2 files changed, 7 insertions, 12 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b5f556f..c6fcfb3 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -12,6 +12,9 @@ find_package( TDE )
tde_setup_architecture_flags( )
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
##### check for gcc visibility support #########
diff --git a/config.h.cmake b/config.h.cmake
index 47cd0c7..a3a579f 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -3,6 +3,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@
+
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@
@@ -291,18 +295,6 @@
/* Defined if compiling without arts */
/* #undef WITHOUT_ARTS */
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* # undef WORDS_BIGENDIAN */
-# endif
-#endif
-
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only