Browse Source

Fix detection whether the system is big endian

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 2 years ago
parent
commit
1458cc35b2
4 changed files with 16 additions and 0 deletions
  1. 7
    0
      ConfigureChecks.cmake
  2. 6
    0
      config.h.cmake
  3. 1
    0
      ktnef/gui/CMakeLists.txt
  4. 2
    0
      ktnef/gui/qwmf.cpp

+ 7
- 0
ConfigureChecks.cmake View File

@@ -11,6 +11,9 @@
11 11
 
12 12
 tde_setup_architecture_flags( )
13 13
 
14
+include(TestBigEndian)
15
+test_big_endian(WORDS_BIGENDIAN)
16
+
14 17
 ##### check for gcc visibility support #########
15 18
 # FIXME
16 19
 # This should check for [T]Qt3 visibility support
@@ -25,6 +28,10 @@ if( WITH_GCC_VISIBILITY )
25 28
 endif( )
26 29
 
27 30
 
31
+if( BUILD_KMAIL )
32
+  check_include_file( "byteswap.h" HAVE_BYTESWAP_H )
33
+endif( )
34
+
28 35
 if( BUILD_LIBTDEPIM OR BUILD_KMAIL )
29 36
   option( TDEPIM_NEW_DISTRLISTS "Define if you want to use the new distribution lists" ON )
30 37
 endif( )

+ 6
- 0
config.h.cmake View File

@@ -1,3 +1,8 @@
1
+
2
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
3
+   significant byte first (like Motorola and SPARC, unlike Intel). */
4
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
5
+
1 6
 // libkcal
2 7
 #cmakedefine USE_LIBICAL_0_46 1
3 8
 
@@ -33,6 +38,7 @@
33 38
 #cmakedefine HAVE_LIBSASL2 1
34 39
 
35 40
 // kmail
41
+#cmakedefine HAVE_BYTESWAP_H 1
36 42
 #cmakedefine HAVE_STLNAMESPACE 1
37 43
 #cmakedefine STD_NAMESPACE_PREFIX @STD_NAMESPACE_PREFIX@
38 44
 

+ 1
- 0
ktnef/gui/CMakeLists.txt View File

@@ -15,6 +15,7 @@ include_directories(
15 15
   ${CMAKE_CURRENT_BINARY_DIR}
16 16
   ${CMAKE_SOURCE_DIR}/ktnef
17 17
   ${CMAKE_SOURCE_DIR}/libtdepim
18
+  ${CMAKE_BINARY_DIR}
18 19
   ${TDE_INCLUDE_DIR}
19 20
   ${TQT_INCLUDE_DIRS}
20 21
 )

+ 2
- 0
ktnef/gui/qwmf.cpp View File

@@ -17,6 +17,8 @@
17 17
  * MA  02110-1301, USA.
18 18
  */
19 19
 
20
+#include <config.h>
21
+
20 22
 #include <math.h>
21 23
 #include <assert.h>
22 24
 #include <tqfileinfo.h>

Loading…
Cancel
Save