From faf4ca847806f55abf1480163bf23db42b31dd4b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 19 Nov 2021 16:18:43 +0100 Subject: [PATCH] Use pkg-config to discover healpix_cxx location Close https://github.com/postgrespro/pgsphere/issues/4 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fed246b..8fc69c3 100644 --- a/Makefile +++ b/Makefile @@ -64,8 +64,9 @@ else endif # compiler settings -override CPPFLAGS += -I/usr/include/healpix_cxx -SHLIB_LINK += -lhealpix_cxx +PKG_CONFIG = pkg-config +override CPPFLAGS += $(shell $(PKG_CONFIG) --cflags healpix_cxx) +SHLIB_LINK += $(shell $(PKG_CONFIG) --libs healpix_cxx) LINK.shared = g++ -shared # healpix_bare.c isn't ours so we refrain from fixing the warnings in there