Description: Fix a FTBFS on kfreebsd
 The kfreebsd architecture is using the GNU libc on a FreeBSD kernel.
 .
 So we don't need to search for execinfo and intl libs on this
 perticular architecture, as they are included in the libc.
Author: Teppo Maenpaa <teppo.maenpaa@cern.ch>
Forwarded-Upstream: not yet, should be.

---
 CMakeLists.txt |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Index: b/CMakeLists.txt
===================================================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -326,7 +326,10 @@
 
 # on BSD this must be explicitly linked
 if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-  find_library(EXECINFO_LIBRARY NAMES execinfo)
+  if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
+    # (debian's) kFreeBSD still use the regular libc and don't needs an external execinfo library here
+    find_library(EXECINFO_LIBRARY NAMES execinfo)
+  endif (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
 endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
 
 
@@ -436,8 +439,11 @@
 endif (MINIZIP_FOUND)
 
 if (APPLE OR WIN32 OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-  find_package(intl REQUIRED)
-  include_directories(${INTL_INCLUDE_DIR})
+  if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
+    # (debian's) kFreeBSD still use the regular libc and don't needs an external intl library for translations
+    find_package(intl REQUIRED)
+    include_directories(${INTL_INCLUDE_DIR})
+  endif (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
 endif (APPLE OR WIN32 OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
 
 # Gettext is required, but it does not provide GETTEXT_INCLUDE_DIR or
