Index: djvulibre-3.5.22/config/acinclude.m4
===================================================================
--- djvulibre-3.5.22.orig/config/acinclude.m4
+++ djvulibre-3.5.22/config/acinclude.m4
@@ -408,7 +408,7 @@ case "${host_os}-${GCC}" in
         # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part
         # of the -pthread flag effect (libpthread is not automatically linked).
         # So we'll try to link with both -pthread and -lpthread first:
-        acx_pthread_flags="-pthread:pthread $acx_pthread_flags"
+        acx_pthread_flags="-lpthread -pthread:pthread $acx_pthread_flags"
         ;;
 esac
 if test x"$acx_pthread_ok" = xno; then
