make/golf/if-pkgconfig-exists (256 bytes)
1 # Use pkg-config for a library when it is installed (example: ncursesw) 2 CURSESLIB ?= <++> 3 LIBS ?= -l$(CURSESLIB) -lutil 4 5 ifeq ("$(shell basename $(shell command -v pkg-config))", "pkg-config") 6 LIBS := $(shell pkg-config --libs $(CURSESLIB)) 7 endif