From f0aa7d884697597a717361a82976d181abaf245a Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Sat, 30 Mar 2019 16:28:15 +0400 Subject: Do not take sys/capability.h header into account on FreeBSD. Also use libutil.h header there. --- CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d9126af..30a7292c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -424,9 +424,9 @@ if (HAVE_SYS_CAPABILITY_H) NAMES cap DOC "libcap library" ) -# On FreeBSD is present in libc, so we don't require libcap there. - if (NOT LIBCAP_LIBRARIES AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - message(FATAL_ERROR "Found \"sys/capability.h\" but could not find libcap") +# On FreeBSD is a different thing + if (NOT LIBCAP_LIBRARIES OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(HAVE_SYS_CAPABILITY_H 0) endif() else() set(LIBCAP_LIBRARIES "") @@ -437,7 +437,8 @@ endif() ################################################################################ check_include_file(pty.h HAVE_PTY_H) check_include_file(util.h HAVE_UTIL_H) -if (HAVE_PTY_H OR HAVE_UTIL_H) +check_include_file(libutil.h HAVE_LIBUTIL_H) +if (HAVE_PTY_H OR HAVE_UTIL_H OR HAVE_LIBUTIL_H) check_function_exists(openpty openpty_in_libc) if (NOT openpty_in_libc) check_library_exists(util openpty "" openpty_in_libutil) @@ -447,7 +448,7 @@ if (HAVE_PTY_H OR HAVE_UTIL_H) message(FATAL_ERROR "Could not find libutil") endif (openpty_in_libutil) endif (NOT openpty_in_libc) -endif (HAVE_PTY_H OR HAVE_UTIL_H) +endif (HAVE_PTY_H OR HAVE_UTIL_H OR HAVE_LIBUTIL_H) ################################################################################ # Miscellaneous header file detection @@ -634,7 +635,7 @@ if (ENABLE_KLEE_LIBCXX) message(STATUS "Use libc++ include path: \"${KLEE_LIBCXX_INCLUDE_DIR}\"") # Find the library bitcode archive - + # Check for static first set(KLEE_LIBCXX_BC_NAME "libc++.bca") set(KLEE_LIBCXX_BC_PATH "${KLEE_LIBCXX_DIR}/lib/${KLEE_LIBCXX_BC_NAME}") -- cgit 1.4.1