# Spec file
configure_file(${CMAKE_SOURCE_DIR}/libasyncio.spec.in ${CMAKE_SOURCE_DIR}/libasyncio.spec @ONLY)
+# Check include files and availability of libraries for config file
+include(CheckIncludeFiles)
+
+if(Boost_FOUND)
+ set(HAVE_BOOST 1)
+endif()
+if(Boost_SIGNALS_FOUND)
+ set(HAVE_BOOST_SIGNALS 1)
+endif()
+if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
+ set(HAVE_BOOST_UNIT_TEST_FRAMEWORK 1)
+endif()
+if(LIBI2NCOMMON_FOUND)
+ set(HAVE_LIBI2NCOMMON 1)
+endif()
+if(LIBT2N_FOUND)
+ set(HAVE_LIBT2N 1)
+endif()
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+set(STDC_HEADER_NAMES
+ assert.h
+ ctype.h
+ errno.h
+ float.h
+ limits.h
+ locale.h
+ math.h
+ setjmp.h
+ signal.h
+ stdarg.h
+ stddef.h
+ stdio.h
+ stdlib.h
+ string.h
+ time.h
+)
+check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
+
# Config file
configure_file(${CMAKE_SOURCE_DIR}/asyncio_config.hpp.in.cmake ${CMAKE_BINARY_DIR}/asyncio_config.hpp)
include_directories(BEFORE ${CMAKE_BINARY_DIR})