--- a/Makefile	2017-04-03 18:45:09.028423872 +0200
+++ b/Makefile	2017-04-03 18:45:55.711048924 +0200
@@ -47,7 +47,7 @@ ifeq ($(USE_CA), YES)
 		endif
 else ifeq ($(USE_PA), YES)
 		CFLAGS:=$(CFLAGS) -D PA -pthread
-		LDFLAGS:=$(LDFLAGS) -lpulse-simple -lpulse -lncurses
+		LDFLAGS:=$(LDFLAGS) -lpulse-simple -lpulse $(shell pkg-config ncurses --libs)
 		OBJECTS=qrq.o pulseaudio.o
 else ifeq ($(USE_WIN32), YES)
 		CFLAGS:=$(CFLAGS) -D PA
@@ -55,7 +55,7 @@
 		OBJECTS=qrq.o qrq.res pdcurses.a libpthreadGC1.a 
 else
 		OBJECTS=qrq.o oss.o
-		LDFLAGS:=$(LDFLAGS) -lpthread -lncurses
+		LDFLAGS:=$(LDFLAGS) -lpthread $(shell pkg-config ncurses --libs)
 		CFLAGS:=$(CFLAGS) -D OSS
 endif	
 
