diff --git a/configure b/configure index b8baf4f702562304dc38c595731cd7b687bbd117..dd09f1a18fd452382156316d6382d9f4598bb8d8 100755 --- a/configure +++ b/configure @@ -2083,7 +2083,16 @@ else for pthread_lib in $PTHREADLIBS_LIST; do if compile_prog "" "$pthread_lib" ; then pthread=yes - LIBS="$pthread_lib $LIBS" + found=no + for lib_entry in $LIBS; do + if test "$lib_entry" = "$pthread_lib"; then + found=yes + break + fi + done + if test "$found" = "no"; then + LIBS="$pthread_lib $LIBS" + fi break fi done