<div dir="ltr">We have some semaphore code that has conditional compilation based on #defines in config.h.  We're having problems with resolving the various PTHREAD_* symbols to get the correct values in config.h.  Our first attempt at this (done on Linux) used <div><br></div><div><div style="font-family:'Bitstream Vera Sans Mono';font-size:11pt;color:rgb(0,0,0)">
<pre>check_symbol_exists(PTHREAD_MUTEX_RECURSIVE "pthread.h" HAVE_PTHREAD_MUTEX_RECURSIVE)
</pre><pre><br></pre><pre>This did not pick the symbol up correctly.  Eventually, we got things to work by using </pre><pre><br></pre><pre><div style="font-family:'Bitstream Vera Sans Mono';font-size:11pt"><pre>check_c_source_compiles("#include <pthread.h>
                         int main(int arg, char **argv) {
                         int tryme;
                         tryme = PTHREAD_MUTEX_RECURSIVE;
                         return 0;}"
                        HAVE_PTHREAD_MUTEX_RECURSIVE)
</pre></div>
</pre><pre>and got everything to build cleanly.  Over the weekend, we tried building on OSX for the first time, and once again, we were not resolving that these symbols existed.  What are we missing here?  Is there some technique we should be using that will work across the various platforms?</pre><pre><br></pre><pre>Rick</pre><pre><br></pre></div></div></div>