configure.in
changeset 9424 a3344156e514
parent 9318 3ad27ca380f3
child 9547 208ccaf7b64c
equal deleted inserted replaced
9423:3df83030dab9 9424:a3344156e514
  2422 
  2422 
  2423             # Check to see if recursive mutexes are available
  2423             # Check to see if recursive mutexes are available
  2424             AC_MSG_CHECKING(for recursive mutexes)
  2424             AC_MSG_CHECKING(for recursive mutexes)
  2425             has_recursive_mutexes=no
  2425             has_recursive_mutexes=no
  2426             if test x$has_recursive_mutexes = xno; then
  2426             if test x$has_recursive_mutexes = xno; then
  2427                 AC_TRY_COMPILE([
  2427                 AC_TRY_LINK([
       
  2428                   #define _GNU_SOURCE 1
  2428                   #include <pthread.h>
  2429                   #include <pthread.h>
  2429                 ],[
  2430                 ],[
  2430                   pthread_mutexattr_t attr;
  2431                   pthread_mutexattr_t attr;
  2431                   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
  2432                   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
  2432                 ],[
  2433                 ],[
  2433                 has_recursive_mutexes=yes
  2434                 has_recursive_mutexes=yes
  2434                 AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, 1, [ ])
  2435                 AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, 1, [ ])
  2435                 ])
  2436                 ])
  2436             fi
  2437             fi
  2437             if test x$has_recursive_mutexes = xno; then
  2438             if test x$has_recursive_mutexes = xno; then
  2438                 AC_TRY_COMPILE([
  2439                 AC_TRY_LINK([
       
  2440                   #define _GNU_SOURCE 1
  2439                   #include <pthread.h>
  2441                   #include <pthread.h>
  2440                 ],[
  2442                 ],[
  2441                   pthread_mutexattr_t attr;
  2443                   pthread_mutexattr_t attr;
  2442                   pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
  2444                   pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
  2443                 ],[
  2445                 ],[