diff options
author | Timo Gurr <timo.gurr@gmail.com> | 2017-12-14 15:20:38 +0100 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2017-12-27 03:09:58 +0100 |
commit | 8a4023b3152a55fcf0dcea26fe3d455fc99e3eae (patch) | |
tree | 8f1c8748612ca736e8c813e440abf8e452f085fb /Makefile | |
parent | 50b57a6fb754b1c79167fef5aec5ca9bf59ed403 (diff) | |
download | whois-8a4023b3152a55fcf0dcea26fe3d455fc99e3eae.tar.gz |
use env var ${PKG_CONFIG} instead of hard coding pkg-config
This allows building in cross environments e.g. using host triplet
prefixed binaries (x86_64-pc-linux-gnu-pkg-config).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -2,8 +2,9 @@ prefix = /usr CFLAGS ?= -g -O2 -PERL = perl -INSTALL = install +PKG_CONFIG ?= pkg-config +PERL ?= perl +INSTALL ?= install whois_OBJECTS := whois.o utils.o mkpasswd_OBJECTS := mkpasswd.o utils.o @@ -32,12 +33,12 @@ ifdef LOCALEDIR DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\" endif -ifeq ($(shell pkg-config --exists 'libidn2 >= 2.0.3' || echo NO),) -whois_LDADD += $(shell pkg-config --libs libidn2) -DEFS += -DHAVE_LIBIDN2 $(shell pkg-config --cflags libidn2) -else ifeq ($(shell pkg-config --exists 'libidn' || echo NO),) -whois_LDADD += $(shell pkg-config --libs libidn) -DEFS += -DHAVE_LIBIDN $(shell pkg-config --cflags libidn) +ifeq ($(shell $(PKG_CONFIG) --exists 'libidn2 >= 2.0.3' || echo NO),) +whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn2) +DEFS += -DHAVE_LIBIDN2 $(shell $(PKG_CONFIG) --cflags libidn2) +else ifeq ($(shell $(PKG_CONFIG) --exists 'libidn' || echo NO),) +whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn) +DEFS += -DHAVE_LIBIDN $(shell $(PKG_CONFIG) --cflags libidn) endif ifdef HAVE_ICONV |