cmake/sdlchecks.cmake
changeset 7078 a2bddc1fb02f
parent 6674 45a21e50ba5e
child 7182 1089a8a701c3
     1.1 --- a/cmake/sdlchecks.cmake	Fri Apr 19 11:58:38 2013 -0400
     1.2 +++ b/cmake/sdlchecks.cmake	Fri Apr 19 13:25:39 2013 -0300
     1.3 @@ -551,7 +551,7 @@
     1.4    if(PTHREADS)
     1.5      if(LINUX)
     1.6        set(PTHREAD_CFLAGS "-D_REENTRANT")
     1.7 -      set(PTHREAD_LDFLAGS "-lpthread")
     1.8 +      set(PTHREAD_LDFLAGS "-pthread")
     1.9      elseif(BSDI)
    1.10        set(PTHREAD_CFLAGS "-D_REENTRANT -D_THREAD_SAFE")
    1.11        set(PTHREAD_LDFLAGS "")
    1.12 @@ -607,6 +607,7 @@
    1.13          int main(int argc, char **argv) {
    1.14            pthread_mutexattr_t attr;
    1.15            pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    1.16 +          return 0;
    1.17          }" HAVE_RECURSIVE_MUTEXES)
    1.18        if(HAVE_RECURSIVE_MUTEXES)
    1.19          set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1)
    1.20 @@ -616,6 +617,7 @@
    1.21              int main(int argc, char **argv) {
    1.22                pthread_mutexattr_t attr;
    1.23                pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    1.24 +              return 0;
    1.25              }" HAVE_RECURSIVE_MUTEXES_NP)
    1.26          if(HAVE_RECURSIVE_MUTEXES_NP)
    1.27            set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1)
    1.28 @@ -624,7 +626,8 @@
    1.29  
    1.30        if(PTHREADS_SEM)
    1.31          check_c_source_compiles("#include <pthread.h>
    1.32 -                                 #include <semaphore.h>" HAVE_PTHREADS_SEM)
    1.33 +                                 #include <semaphore.h>
    1.34 +                                 int main(int argc, char **argv) { return 0; }" HAVE_PTHREADS_SEM)
    1.35          if(HAVE_PTHREADS_SEM)
    1.36            check_c_source_compiles("
    1.37                #include <pthread.h>