-endif(NOT disable_context AND with_context MATCHES "ucontext" AND mcsc MATCHES "no")
-
-if(NOT disable_context)
- set(with_context_ok 0)
- if(with_context MATCHES "windows")
- set(with_context_ok 1)
- endif(with_context MATCHES "windows")
-
- if(with_context MATCHES "pthreads")
- set(with_context_ok 1)
- set(with_context "pthread")
- endif(with_context MATCHES "pthreads")
-
- if(with_context MATCHES "auto")
- set(with_context_ok 1)
- set(with_context "ucontext")
- message("with_context auto change to ucontext")
- endif(with_context MATCHES "auto")
-
- if(with_context MATCHES "ucontext")
- set(with_context_ok 1)
- if(mcsc MATCHES "yes")
- set(CONTEXT_UCONTEXT 1)
- CHECK_INCLUDE_FILE(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
- else(mcsc MATCHES "yes")
- if(windows_context MATCHES "yes")
- set(with_context "windows")
- else(windows_context MATCHES "yes")
- set(with_context "pthread")
- endif(windows_context MATCHES "yes")
- endif(mcsc MATCHES "yes")
- endif(with_context MATCHES "ucontext")
-
- if(with_context MATCHES "pthread")
- set(with_context_ok 1)
- if(pthread MATCHES "no")
- message(FATAL_ERROR "Cannot find pthreads (try -Dwith_context=ucontext if you haven't already tried).")
- endif(pthread MATCHES "no")
- SET(CONTEXT_THREADS 1)
- endif(with_context MATCHES "pthread")
-
- if(with_context MATCHES "ucontext")
- SET(CONTEXT_THREADS 0)
- endif(with_context MATCHES "ucontext")
-
- if(NOT with_context_ok)
- message(FATAL_ERROR "-Dwith-context must be either ucontext or pthread")
- endif(NOT with_context_ok)
-endif(NOT disable_context)
+endif(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
+
+set(with_context_ok 0)
+if(with_context MATCHES "windows")
+ set(with_context_ok 1)
+ if(NOT HAVE_WINDOWS_H)
+ message(FATAL_ERROR "no appropriate backend found windows")
+ endif(NOT HAVE_WINDOWS_H)
+endif(with_context MATCHES "windows")
+
+if(with_context MATCHES "pthreads")
+ set(with_context_ok 1)
+ set(with_context "pthread")
+endif(with_context MATCHES "pthreads")
+
+if(with_context MATCHES "auto")
+ set(with_context_ok 1)
+ set(with_context "ucontext")
+ message("with_context auto change to ucontext")
+endif(with_context MATCHES "auto")
+
+if(with_context MATCHES "ucontext")
+ set(with_context_ok 1)
+ if(mcsc MATCHES "yes")
+ set(CONTEXT_UCONTEXT 1)
+ CHECK_INCLUDE_FILE(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
+ else(mcsc MATCHES "yes")
+ if(windows_context MATCHES "yes")
+ set(with_context "windows")
+ message("with_context ucontext change to windows")
+ else(windows_context MATCHES "yes")
+ set(with_context "pthread")
+ message("with_context ucontext change to pthread")
+ endif(windows_context MATCHES "yes")
+ endif(mcsc MATCHES "yes")
+endif(with_context MATCHES "ucontext")
+
+if(with_context MATCHES "pthread")
+ set(with_context_ok 1)
+ if(pthread MATCHES "no")
+ message(FATAL_ERROR "Cannot find pthreads (try -Dwith_context=ucontext if you haven't already tried).")
+ endif(pthread MATCHES "no")
+ SET(CONTEXT_THREADS 1)
+endif(with_context MATCHES "pthread")
+
+if(with_context MATCHES "ucontext")
+ SET(CONTEXT_THREADS 0)
+endif(with_context MATCHES "ucontext")
+
+if(NOT with_context_ok)
+ message(FATAL_ERROR "-Dwith-context must be either ucontext or pthread")
+endif(NOT with_context_ok)