From patchwork Sun Sep 19 22:50:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2/8] configure: Don't rely on special pthreads library Date: Sun, 19 Sep 2010 12:50:44 -0000 From: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 65173 Message-Id: <1284936650-1203-3-git-send-email-andreas.faerber@web.de> To: qemu-devel@nongnu.org Cc: haikuports-devs@ports.haiku-files.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 --- configure | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/configure b/configure index da32a1c..2ba35a4 100755 --- a/configure +++ b/configure @@ -1706,13 +1706,17 @@ cat > $TMPC << EOF #include 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