> 1. Are THREAD_LIBRARIES and THREADSAFE cmake intrinsic definitions or are they your definitions?
This is mine definitions.
> 2. I didn't see why the definition _REENTRANT was set. It isn't used anywhere in the source. Is it a requirement of pthreads?
Defining _REENTRANT causes the compiler to use thread safe (i.e. re-entrant) versions of several functions in the C library. This is not a requirement, but it should be used in MT code.
> 3. How do you disable or enable threads (under Linux)?
You need to pass a THREADSAFE flag to cmake: "cmake -DTHREADSAFE=true ."
> Is there a reason you didn't use the syntax similar to the zlib and lzma codecs?
There is no flag named "Threads_FOUND" in cmake`s module FindThreads.cmake. In perfect scenario this code should be like this:
#check for Unix/Win32 and add extra definitions
contains correct thread library (pthreads or win32 threads).