message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
include(CheckFunctionExists)
+include(CheckTypeSize)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckLibraryExists)
TEST_BIG_ENDIAN(BIGENDIAN)
include(FindGraphviz)
+if(enable_pcre)
include(FindPCRE)
+endif(enable_pcre)
if(enable_gtnets)
include(FindGTnets)
endif(enable_gtnets)
CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILE("ucontext.h" HAVE_UCONTEXT_H)
CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H)
+CHECK_INCLUDE_FILE("linux/futex.h" HAVE_FUTEX_H)
+
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_FUNCTION_EXISTS(usleep HAVE_USLEEP)
SET(MMALLOC_WANT_OVERIDE_LEGACY 0)
endif(enable_model-checking AND HAVE_MMAP)
+#--------------------------------------------------------------------------------------------------
+### Check for some architecture dependent values
+CHECK_TYPE_SIZE(int SIZEOF_INT)
+CHECK_TYPE_SIZE(void* SIZEOF_VOIDP)
+
+
#--------------------------------------------------------------------------------------------------
### Initialize of CONTEXT THREADS
endif(HAVE_WINDOWS_H)
endif(mcsc MATCHES "no" AND pthread)
-if(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
- message(FATAL_ERROR "-Dwith-context=ucontext specified but ucontext unusable.")
-endif(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
-
#Only windows
-if(with_context MATCHES "windows")
+if(WIN32)
if(NOT HAVE_WINDOWS_H)
message(FATAL_ERROR "no appropriate backend found windows")
endif(NOT HAVE_WINDOWS_H)
-endif(with_context MATCHES "windows")
+endif(WIN32)
if(windows_context MATCHES "yes")
- set(with_context "windows")
message(STATUS "Context change to windows")
endif(windows_context MATCHES "yes")