1if (WITH_LIBMETAL_FIND)
2  find_package (Libmetal REQUIRED)
3  collect (PROJECT_INC_DIRS "${LIBMETAL_INCLUDE_DIR}")
4  collect (PROJECT_LIB_DIRS "${LIBMETAL_LIB_DIR}")
5  collect (PROJECT_LIB_DEPS "${LIBMETAL_LIB}")
6endif (WITH_LIBMETAL_FIND)
7
8if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
9  check_include_files (stdatomic.h HAVE_STDATOMIC_H)
10  check_include_files (fcntl.h HAVE_FCNTL_H)
11else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
12  set (_saved_cmake_required_flags ${CMAKE_REQUIRED_FLAGS})
13  set (CMAKE_REQUIRED_FLAGS "-c")
14  check_include_files (stdatomic.h HAVE_STDATOMIC_H)
15  check_include_files (fcntl.h HAVE_FCNTL_H)
16  set (CMAKE_REQUIRED_FLAGS ${_saved_cmake_required_flags})
17endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
18
19if (NOT HAVE_FCNTL_H)
20  unset (WITH_PROXY CACHE)
21endif (NOT HAVE_FCNTL_H)
22
23# vim: expandtab:ts=2:sw=2:smartindent
24