From 40eb598065f9c6e1a5ab9ee28a2f58a56bf773e6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 30 Oct 2017 17:35:51 +1100 Subject: [PATCH] Makefile: Use pkg-config on Linux to get the ncurses compilation flags Fixes #1659 --- src/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 4e95e07c..12c6cf88 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,8 +22,6 @@ mandocs := $(docs:.asciidoc=.gz) PREFIX ?= /usr/local DESTDIR ?= # root dir -NCURSESW_INCLUDE ?= /usr/include/ncursesw - bindir := $(DESTDIR)$(PREFIX)/bin sharedir := $(DESTDIR)$(PREFIX)/share/kak docdir := $(DESTDIR)$(PREFIX)/share/doc/kak @@ -49,8 +47,8 @@ else ifneq (,$(findstring CYGWIN,$(os))) CPPFLAGS += -D_XOPEN_SOURCE=700 LIBS += -lncursesw -lboost_regex -ldbghelp else - LIBS += -lncursesw -lboost_regex - CPPFLAGS += -I$(NCURSESW_INCLUDE) + LIBS += $(shell pkg-config --libs ncursesw) -lboost_regex + CPPFLAGS += $(shell pkg-config --cflags ncursesw) LDFLAGS += -rdynamic endif