From 027e2601390af9f3bcd6c233458174657915ef61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 3 Feb 2017 13:17:47 +0100 Subject: 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 (cherry picked from commit ed71acf6dcd9380590048fc5c6eb9fd22cb3b9c5) --- ConfigureChecks.cmake | 4 ++++ config.h.cmake | 6 ++++++ kopete/libkopete/kopeteonlinestatusmanager.cpp | 1 + kopete/protocols/yahoo/libkyahoo/CMakeLists.txt | 4 ---- kopete/protocols/yahoo/libkyahoo/sha1.c | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 8579d7a1..c6ba0fb4 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -11,6 +11,10 @@ # required stuff tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + find_package( TQt ) find_package( TDE ) diff --git a/config.h.cmake b/config.h.cmake index 4006c692..38def3f3 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@ + // krdp #define VERSION "@VERSION@" @@ -10,6 +15,7 @@ #cmakedefine VIDEODEV_HEADER "@VIDEODEV_HEADER@" // kopete/protocols/yahoo +#cmakedefine HAVE_INTTYPES_H 1 #cmakedefine HAVE_STRINGS_H 1 // kopete/protocols/yahoo, kppp diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp index 0809881d..75417e16 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.cpp +++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp @@ -16,6 +16,7 @@ ************************************************************************* */ +#include "config.h" #include "kopeteonlinestatusmanager.h" #include "kopeteawayaction.h" diff --git a/kopete/protocols/yahoo/libkyahoo/CMakeLists.txt b/kopete/protocols/yahoo/libkyahoo/CMakeLists.txt index 131ca394..68b1decc 100644 --- a/kopete/protocols/yahoo/libkyahoo/CMakeLists.txt +++ b/kopete/protocols/yahoo/libkyahoo/CMakeLists.txt @@ -11,10 +11,6 @@ include( ConfigureChecks.cmake ) -if( HAVE_INTTYPES_H ) - add_definitions( -DHAVE_INTTYPES_H ) -endif() - include_directories( ${CMAKE_CURRENT_BINARY_DIR} diff --git a/kopete/protocols/yahoo/libkyahoo/sha1.c b/kopete/protocols/yahoo/libkyahoo/sha1.c index 69ee51c2..506c183f 100644 --- a/kopete/protocols/yahoo/libkyahoo/sha1.c +++ b/kopete/protocols/yahoo/libkyahoo/sha1.c @@ -37,7 +37,7 @@ * 34aa973c d4c4daa4 f61eeb2b dbad2731 6534016f */ -/* #include */ +#include "config.h" #ifdef HAVE_INTTYPES_H # include -- cgit v1.2.1