From c1f514f3dbc22e56b2d6821f461aa058bd3104c3 Mon Sep 17 00:00:00 2001 From: Eddy Jansson Date: Sat, 24 Jul 2021 13:43:35 +0200 Subject: Expand use of pkg-config variables. Change pkg-config generation such that the path variables, not their values, are used in the definitions of Libs and Cflags, and that $prefix is substituted into libdir and includedir iff they start with its value. This makes it easier to modify the already installed file if necessary. --- lib/Makefile | 1 + lib/liblz4.pc.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 344120a..45f33e4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -175,6 +175,7 @@ liblz4.pc: liblz4.pc.in Makefile -e 's|@LIBDIR@|$(libdir)|' \ -e 's|@INCLUDEDIR@|$(includedir)|' \ -e 's|@VERSION@|$(LIBVER)|' \ + -e 's|=${prefix}/|=$${prefix}/|' \ $< >$@ install: lib liblz4.pc diff --git a/lib/liblz4.pc.in b/lib/liblz4.pc.in index 211477f..ed52214 100644 --- a/lib/liblz4.pc.in +++ b/lib/liblz4.pc.in @@ -10,5 +10,5 @@ Name: lz4 Description: extremely fast lossless compression algorithm library URL: http://www.lz4.org/ Version: @VERSION@ -Libs: -L@LIBDIR@ -llz4 -Cflags: -I@INCLUDEDIR@ +Libs: -L${libdir} -llz4 +Cflags: -I${includedir} -- cgit v0.12