280,281c280,281
< -	 $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
< +	 $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
---
> -	 $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(PTHREAD_LIBS)
> +	 $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(PTHREAD_LIBS)
288,289c288,289
< -	 mutex_pthread.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
< +	 mutex_pthread.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
---
> -	 mutex_pthread.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(PTHREAD_LIBS)
> +	 mutex_pthread.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(PTHREAD_LIBS)
