#include <aubio/aubio.h>
#include <string.h>
-#ifdef HAVE_PTHREAD
+#ifdef HAVE_PTHREAD_H
#include <pthread.h>
pthread_mutex_t aubio_log_mutex;
#else
if ((pos=strchr(message, '\n')) != NULL) {
*pos = '\0';
}
-#ifdef HAVE_PTHREAD
+#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&aubio_log_mutex);
#endif
if (level == AUBIO_LOG_ERR) {
} else {
post(message);
}
-#ifdef HAVE_PTHREAD
+#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&aubio_log_mutex);
#endif
}
void aubio_setup (void)
{
// register custom log function for errors and warnings
-#ifdef HAVE_PTHREAD
+#ifdef HAVE_PTHREAD_H
pthread_mutex_init(&aubio_log_mutex, 0);
#endif
aubio_log_set_function(aubio_custom_log, NULL);
ctx.check(header_name='m_pd.h')
ctx.check(header_name='pthread.h', mandatory = False)
- needs_pthread = ctx.get_define("HAVE_PTHREAD") is not None
+ needs_pthread = ctx.get_define("HAVE_PTHREAD_H") is not None
if needs_pthread:
ctx.check_cc(lib="pthread", uselib_store="PTHREAD", mandatory=needs_pthread)