cmake HAVE_PTHREAD_SPINLOCK examples

nvMcJohn/apitest thirdparty/SDL2-2.0.1/cmake/sdlchecks.cmake :699

check_c_source_compiles("
          #include <pthread.h>
          int main(int argc, char** argv) {
              pthread_spin_trylock(NULL);
              return 0;
          }" HAVE_PTHREAD_SPINLOCK)

ceph/ceph cmake/modules/CephChecks.cmake :33

check_function_exists(pthread_spin_init HAVE_PTHREAD_SPINLOCK)