From be75554de7fc3fc3a2df6a4b10fad312dcd4c6f3 Mon Sep 17 00:00:00 2001 From: Wendy Liang Date: Sat, 30 Dec 2017 23:18:46 -0800 Subject: [PATCH] only allow proxy feature if fcntl.h is found As the proxy library functions relies on fcntl.h file, only allows proxy functions if fcntl.h file is found. Signed-off-by: Wendy Liang --- cmake/depends.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/depends.cmake b/cmake/depends.cmake index d5926ec..db27a60 100644 --- a/cmake/depends.cmake +++ b/cmake/depends.cmake @@ -7,11 +7,17 @@ endif (WITH_LIBMETAL_FIND) if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") check_include_files (stdatomic.h HAVE_STDATOMIC_H) - + check_include_files (fcntl.h HAVE_FCNTL_H) else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set (_saved_cmake_required_flags ${CMAKE_REQUIRED_FLAGS}) set (CMAKE_REQUIRED_FLAGS "-c") check_include_files (stdatomic.h HAVE_STDATOMIC_H) + check_include_files (fcntl.h HAVE_FCNTL_H) set (CMAKE_REQUIRED_FLAGS ${_saved_cmake_required_flags}) endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + +if (NOT HAVE_FCNTL_H) + unset (WITH_PROXY CACHE) +endif (NOT HAVE_FCNTL_H) + # vim: expandtab:ts=2:sw=2:smartindent