From 1458cc35b20c25c30db011c3ce958b7bd5d62c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 2 Feb 2017 01:42:02 +0100 Subject: [PATCH] Fix detection whether the system is big endian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 7 +++++++ config.h.cmake | 6 ++++++ ktnef/gui/CMakeLists.txt | 1 + ktnef/gui/qwmf.cpp | 2 ++ 4 files changed, 16 insertions(+) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c0bcd225..6789c4c0 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -11,6 +11,9 @@ tde_setup_architecture_flags( ) +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + ##### check for gcc visibility support ######### # FIXME # This should check for [T]Qt3 visibility support @@ -25,6 +28,10 @@ if( WITH_GCC_VISIBILITY ) endif( ) +if( BUILD_KMAIL ) + check_include_file( "byteswap.h" HAVE_BYTESWAP_H ) +endif( ) + if( BUILD_LIBTDEPIM OR BUILD_KMAIL ) option( TDEPIM_NEW_DISTRLISTS "Define if you want to use the new distribution lists" ON ) endif( ) diff --git a/config.h.cmake b/config.h.cmake index 206a8123..eb51aa52 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,3 +1,8 @@ + +/* 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@ + // libkcal #cmakedefine USE_LIBICAL_0_46 1 @@ -33,6 +38,7 @@ #cmakedefine HAVE_LIBSASL2 1 // kmail +#cmakedefine HAVE_BYTESWAP_H 1 #cmakedefine HAVE_STLNAMESPACE 1 #cmakedefine STD_NAMESPACE_PREFIX @STD_NAMESPACE_PREFIX@ diff --git a/ktnef/gui/CMakeLists.txt b/ktnef/gui/CMakeLists.txt index 57527c9a..a89cedbf 100644 --- a/ktnef/gui/CMakeLists.txt +++ b/ktnef/gui/CMakeLists.txt @@ -15,6 +15,7 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/ktnef ${CMAKE_SOURCE_DIR}/libtdepim + ${CMAKE_BINARY_DIR} ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} ) diff --git a/ktnef/gui/qwmf.cpp b/ktnef/gui/qwmf.cpp index 37eaa170..e4baf41d 100644 --- a/ktnef/gui/qwmf.cpp +++ b/ktnef/gui/qwmf.cpp @@ -17,6 +17,8 @@ * MA 02110-1301, USA. */ +#include + #include #include #include