--- ./configure.ac
+++ ./configure.ac
@@ -873,6 +873,7 @@
 if test "x$enable_webp" != "xno" ; then
 
   if test "x$with_webp_lib_dir" != "x" ; then
+    LIBS="-lpthread $LIBS"
     LDFLAGS="-L$with_webp_lib_dir $LDFLAGS"
   fi
   
