[Top][All Lists]

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

Re: How to ship native modules?

From: Eli Zaretskii
Subject: Re: How to ship native modules?
Date: Mon, 20 Feb 2017 17:27:55 +0200

> From: Elias Mårtenson <address@hidden>
> Date: Mon, 20 Feb 2017 18:00:24 +0800
> The first issue is that I have no idea how to actually distribute the native 
> GSSAPI module. It's just a single,
> reasonably small, C file that needs to be compiled with the libgssapi_krb5.so 
> library. If this is bundled in
> Emacs proper, making it a part of the build system isn't too complicated, 
> although I don't believe this has been
> done before.

IMO, it makes little sense to distribute loadable modules with Emacs
itself: if they are part of the standard distribution, they should
just be "normal" source files in src/, and don't have to go through
all the trouble of using the emacs-modules machinery.

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

I'm not sure I see the reason for "rebuilding part of autoconf".  Your
Lisp code should just (load "foo"), and leave it to the user and
package.el to put the compiled module where Emacs will find it (along
load-path).  Am I missing something?

> The second issue is how to ship my changes to Gnus. My changes are limited to 
> a changes to nnimap.el, but
> this new feature will now try to require the ‘gss’ feature when gssapi 
> authentication is enabled. If the gssapi
> library is shipped as part of ELPA, then we end up with the interesting 
> situation where the packaged version
> of Gnus depends on a package in ELPA.

If the package is on ELPA, IMO it should provide a separate .el file
with a feature that Gnus will 'require', given some defcustom.


reply via email to

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