]> Sergey Matveev's repositories - nnn.git/commitdiff
Makefile: use PKG_CONFIG instead of hardcoding pkg-config (#78)
authormaxice8 <30738253+maxice8@users.noreply.github.com>
Mon, 22 Jan 2018 13:09:17 +0000 (11:09 -0200)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 22 Jan 2018 13:09:17 +0000 (18:39 +0530)
Makefile

index e0196c111aab9494fde593d97337c89bac0bb6a5..9dad2e08fc7728f97c3473f3af7800ed03ed41ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,15 @@ VERSION = 1.6
 PREFIX ?= /usr/local
 MANPREFIX ?= $(PREFIX)/share/man
 STRIP ?= strip
+PKG_CONFIG ?= pkg-config
 
 CFLAGS ?= -O3
 CFLAGS += -Wall -Wextra -Wno-unused-parameter
 LDLIBS = -lreadline
 
-ifeq ($(shell pkg-config ncursesw && echo 1),1)
-       CFLAGS += $(shell pkg-config --cflags ncursesw)
-       LDLIBS += $(shell pkg-config --libs   ncursesw)
+ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
+       CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
+       LDLIBS += $(shell $(PKG_CONFIG) --libs   ncursesw)
 else
        LDLIBS += -lncurses
 endif