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.
This commit is contained in:
Eddy Jansson 2021-07-24 13:43:35 +02:00
parent c240126068
commit c1f514f3db
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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}