[Top][All Lists]

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

Re: pkg-config support

From: Andy Wingo
Subject: Re: pkg-config support
Date: Thu, 01 May 2008 18:21:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On Wed 30 Apr 2008 13:49, address@hidden (Ludovic Courtès) writes:

> As for libraries, there's an additional problem.  Libraries that are not
> meant to be used from C (e.g., bindings of some C library whose C API is
> not public) would better fit under $pkglibdir than under $libdir.  In
> that case, the `.scm' module that calls `load-extension' must contain
> the full path to the lib, since it cannot expect it to be in's
> search path.  The problem is that doing so precludes running tests from
> the build tree, before installation.

This is cairo/

(define-module (cairo config)
  :export     (*cairo-lib-path*

(define *cairo-lib-path* "@cairolibpath@")
(define *cairo-documentation-path* "@cairodocumentationpath@")

This is part of cairo/

config.scm: Makefile
        sed -e "s|@cairolibpath\@|$(lib_builddir)/libguile-cairo|" \
"s|@cairodocumentationpath\@|$(docs_builddir)/cairo-procedures.txt|" \
            $(srcdir)/ > config.scm

install-data-local: Makefile
        $(mkinstalldirs) $(DESTDIR)$(moduledir)
        sed -e "s|@cairolibpath\@|$(libdir)/libguile-cairo|" \
            -e "s|@cairodocumentationpath\@|$(moduledir)/cairo-procedures.txt|" 
            $(srcdir)/ > $(DESTDIR)$(moduledir)/config.scm
        chmod 644 $(DESTDIR)$(moduledir)/config.scm

        rm -f $(DESTDIR)$(moduledir)/config.scm

It's verbose but it does work in both cases.


reply via email to

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