utils: Add pkg-config-for-target.

* guix/utils.scm (pkg-config-for-target): New procedure.
This commit is contained in:
Efraim Flashner 2020-12-28 19:00:30 +02:00
parent 646233094e
commit 3d395e3d83
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

@ -79,6 +79,7 @@
target-64bit?
cc-for-target
cxx-for-target
pkg-config-for-target
version-compare
version>?
@ -548,6 +549,11 @@ a character other than '@'."
(string-append target "-g++")
"g++"))
(define* (pkg-config-for-target #:optional (target (%current-target-system)))
(if target
(string-append target "-pkg-config")
"pkg-config"))
(define version-compare
(let ((strverscmp
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))