$OpenBSD: patch-CMakeLists_txt,v 1.11 2018/09/27 21:49:32 sebastia Exp $

Add check to test for existence of utmpx.h

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -11,6 +11,9 @@ if (NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
 endif()
 
+include(CheckIncludeFile)
+CHECK_INCLUDE_FILE(utmpx.h HAVE_UTMPX_H -DHAVE_UTMPX_H)
+
 option(YAMLCPP_STATIC "Use yaml-cpp's static libraries" OFF)
 option(BUILD_SHARED_LIBS "Build libfacter as a shared library" ON)
 
