aboutsummaryrefslogtreecommitdiff
path: root/test/postinstall/c_app
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2022-02-05 12:03:25 +0100
committerKai Pastor <dg0yt@darc.de>2022-02-05 18:06:45 +0100
commit2b0ecb6f19b1be906a39eac5143d4c40252f0a5a (patch)
tree1e1dbab6c61780139e3bf67b566ce3478a86019c /test/postinstall/c_app
parent295c67869270dc9319f965f1c18108fad516296e (diff)
downloadPROJ-2b0ecb6f19b1be906a39eac5143d4c40252f0a5a.tar.gz
PROJ-2b0ecb6f19b1be906a39eac5143d4c40252f0a5a.zip
Adapt testing to recursive pkg-config requirements
When pkg-config is called with --static, it will recursively collect all Libs and Libs.private which are discovered via Requires and Requires.private. So these libs must be available for linking even when acutally only lib proj uses static linkage. Libs and pkg-config must be provided for the target triplet.
Diffstat (limited to 'test/postinstall/c_app')
-rw-r--r--test/postinstall/c_app/makefile.mak6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/postinstall/c_app/makefile.mak b/test/postinstall/c_app/makefile.mak
index 3e29d4b1..01d1c259 100644
--- a/test/postinstall/c_app/makefile.mak
+++ b/test/postinstall/c_app/makefile.mak
@@ -6,18 +6,18 @@ TESTS = \
test_searchpath.sh \
test_version.sh
-override CFLAGS += -g -Wall -Werror $(shell pkg-config proj --cflags)
+override CFLAGS += -g -Wall -Werror $(shell ${PKG_CONFIG} proj --cflags)
ifeq ($(BUILD_MODE),static)
UNAME_S := $(shell uname -s)
- _ldflags := $(shell pkg-config proj --libs --static)
+ _ldflags := $(shell ${PKG_CONFIG} proj --libs --static)
ifeq ($(UNAME_S),Linux)
# force static linking to libproj
_ldflags := $(shell echo $(_ldflags) | sed 's/-lproj/-Wl,-Bstatic -lproj -Wl,-Bdynamic/')
endif
override LDFLAGS += $(_ldflags)
else # default is shared
- override LDFLAGS += $(shell pkg-config proj --libs)
+ override LDFLAGS += $(shell ${PKG_CONFIG} proj --libs)
endif
all: $(PROGRAM)