--- a/config/acinclude.m4 +++ b/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