summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-10-30 17:35:51 +1100
committerMaxime Coste <mawww@kakoune.org>2017-10-30 17:35:51 +1100
commit40eb598065f9c6e1a5ab9ee28a2f58a56bf773e6 (patch)
tree5423f3a1c811227ca6653886dd3764672926a3c8 /src
parent9cb07503c60b9229622d81b62867aeb3b8972673 (diff)
Makefile: Use pkg-config on Linux to get the ncurses compilation flags
Fixes #1659
Diffstat (limited to 'src')
-rw-r--r--src/Makefile6
1 files 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