mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
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).
This commit is contained in:
parent
50b57a6fb7
commit
8a4023b315
17
Makefile
17
Makefile
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user