From fef5bf98b8f4934c1bd475d4c48e24f35e291b09 Mon Sep 17 00:00:00 2001 From: martin-s Date: Fri, 30 Sep 2011 09:50:39 +0000 Subject: [PATCH] Add:Build:Include endian.h if available git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4807 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/CMakeLists.txt | 1 + navit/config.h.cmake | 2 ++ navit/navit/endianess.h | 3 +++ 3 files changed, 6 insertions(+) diff --git a/navit/CMakeLists.txt b/navit/CMakeLists.txt index a398044..5725fd2 100755 --- a/navit/CMakeLists.txt +++ b/navit/CMakeLists.txt @@ -108,6 +108,7 @@ if(PKG_CONFIG_FOUND) endif(PKG_CONFIG_FOUND) #Simple checks CHECK_INCLUDE_FILES(wordexp.h HAVE_WORDEXP) +CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES(byteswap.h HAVE_BYTESWAP_H) CHECK_LIBRARY_EXISTS(gypsy gypsy_control_get_default "" GYPSY_FOUND) diff --git a/navit/config.h.cmake b/navit/config.h.cmake index 984195e..18e28fa 100644 --- a/navit/config.h.cmake +++ b/navit/config.h.cmake @@ -77,3 +77,5 @@ #cmakedefine HAVE_GETDELIM 1 #cmakedefine HAVE_GETLINE 1 + +#cmakedefine HAVE_ENDIAN_H 1 diff --git a/navit/navit/endianess.h b/navit/navit/endianess.h index 01fb265..2b40470 100644 --- a/navit/navit/endianess.h +++ b/navit/navit/endianess.h @@ -49,6 +49,9 @@ #if HAVE_BYTESWAP_H /* machine dependent versions of byte swapping functions. GNU extension.*/ #include +#if HAVE_ENDIAN_H + #include +#endif #elif defined(USE_SYS_ENDIAN_H) #include #if defined(_BYTE_ORDER) && !defined(__BYTE_ORDER) -- 2.7.4