]> git.proxmox.com Git - qemu.git/commitdiff
configure: Don't rely on special pthreads library
authorAndreas Färber <andreas.faerber@web.de>
Sun, 19 Sep 2010 22:50:44 +0000 (00:50 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 3 Oct 2010 06:31:14 +0000 (06:31 +0000)
Haiku has pthreads integrated into its libroot.so library. No linker arguments
are needed for it, so don't fail if -lpthread and similar don't link.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure

index 6b086c564387642abe761967571a84e73240e77d..e0d34fd29bba93f12c01b96f060944dd4e682167 100755 (executable)
--- a/configure
+++ b/configure
@@ -1710,13 +1710,17 @@ cat > $TMPC << EOF
 #include <pthread.h>
 int main(void) { pthread_create(0,0,0,0); return 0; }
 EOF
-for pthread_lib in $PTHREADLIBS_LIST; do
-  if compile_prog "" "$pthread_lib" ; then
-    pthread=yes
-    LIBS="$pthread_lib $LIBS"
-    break
-  fi
-done
+if compile_prog "" "" ; then
+  pthread=yes
+else
+  for pthread_lib in $PTHREADLIBS_LIST; do
+    if compile_prog "" "$pthread_lib" ; then
+      pthread=yes
+      LIBS="$pthread_lib $LIBS"
+      break
+    fi
+  done
+fi
 
 if test "$mingw32" != yes -a "$pthread" = no; then
   echo