guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make the pkgconfig file of Guile relocatable.


From: Zhu Zihao
Subject: Make the pkgconfig file of Guile relocatable.
Date: Mon, 28 Feb 2022 00:04:52 +0800
User-agent: mu4e 1.6.10; emacs 27.2

Currently, the guile-3.0.pc.in in 'meta' use the variable substitution
directly.

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
pkgdatadir=@datadir@/guile
pkgincludedir=@includedir@/guile

sitedir=@sitedir@
extensiondir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/extensions
siteccachedir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
libguileinterface=@LIBGUILE_INTERFACE@

sitedir, siteccachedir and extensiondir will be subsituted to the full
path of the install path of Guile.

But sometimes I want to install guile module in different
prefix(e.g. NixOS, Guix, flatpak). I have to adjust these variable
manually.

My idea is change the definition of sitedir, siteccachedir, extensiondir
use the variable substition of pkg-config instead of autotools.

For example

sitedir=${datadir}/guile/site/@GUILE_EFFECTIVE_VERSION@
siteccachedir=${libdir}/guile/@GUILE_EFFECTIVE_VERSION@/extensions

....

So I can use

pkg-config guile-3.0 --define-variable=libdir=$MY_PREFIX 
--variable=siteccachedir

to get the correct install directory.

Thoughts?
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]