emacs-devel
[Top][All Lists]
Advanced

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

Re: How to ship native modules?


From: Elias Mårtenson
Subject: Re: How to ship native modules?
Date: Tue, 21 Feb 2017 13:12:56 +0800

On 21 February 2017 at 12:50, Andreas Politz <address@hidden> wrote:
Elias Mårtenson <address@hidden> writes:

> If it is to be shipped as part of ELPA, then a different question
> emerges: Should I simply add code to the Elisp files that checks if it
> can find the native library and if not, compile it on the fly? It's
> doable, but I'd hard to reinvent several wheels to do so. Essentially
> I'd have to rebuild part of autoconf in Elisp.

Hi, I am the author of pdf-tools and I have a very similar, if not the
same, problem.

I use pdf-tools, and I have definitely seen the same issue there.
 
I think your analogy to autoconf is not the right one.  What's needed is
more like an abstraction over the various systems including package
manager and possibly naming schemes.  For example on Arch you need to
install the package krb5 with pacman, while on Debian its probably
libkrb5-dev and libkrb5 using aptitude and on Windows you'd download
some installer or whatever.

Indeed. The MIT and Heimdal implementations also have some minor differences that has to be taken into account, making the Makefile more complex.
 
There are various other details to consider. For example make is called
gmake on BSD, or you need to setup an environment variable
(e.g. PKG_CONFIG_PATH on macos).

I don't use OSX much anymore, so I wasn't aware of that.
 
This could be implemented in a neat, small package, your package depends
on and calls into as part of the installation or first-time-running
process.

Adding a new system-configuration should be fairly easy.

I've been pondering to write such a thing,

what do you think ?

I think that sounds like a great idea. If you build a prototype I'd be happy to provide whatever assistance I can.

Regards,
Elias 

reply via email to

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