On Fri, 25 May 2001, David Lee wrote: > On Fri, 25 May 2001, Nicolas Williams wrote: > > On Fri, May 25, 2001 at 10:09:42AM +0100, David Lee wrote: > > > I suspect that what is really needed is to face this dilemma head-on > > > (which will need a little courage!) and to introduce "libtool", which is > > > specifically and purposefully designed for exactly these problems. (In > > > the past "libtool" received a bad press because it wasn't perfect (what > > > is?). But it is far better now, constantly improving, and we are, I hope, > > > looking to the future...) > > Libtool may be too heavy-weight for PAM methinks. To start on > > multi-platform support just a few autoconf macros should suffice. > > Eventually it might be easier to libtoolize. > True. Indeed, I think some of the patches I submitted over the past year > for "configure.in" and friends seem to have helped matters. But it's > still not ideal, particularly for native (i.e. non gcc) compilers and > linkers. And if we start doing two much linker-related stuff in autoconf, > wouldn't that simply be re-inventing the libtool wheel? (And it wouldn't > be as well rounded!) I found the recent libtool discussion on the samba-technical mailing list very enlightening with regards to libtool's strengths and weaknesses. And I really think there are a lot of weaknesses still that need to be ironed out before I can endorse its use for Linux-PAM. It is heavy-weight, and it does take a lot of control away from the maintainers. If we write our own autoconf macros, and we find a bug on platform X, we can quickly fix the bug in our code. If we use libtool, that same bug-fixing process takes much longer because we have to submit the changes to libtool's maintainers, and they have to release a new version of their tools. There are really only four commands we need for any given platform: * compile a .c file into a PIC object suitable for further linking * link a shared library * link a DSO (pam module) * link a static library And personally, I'm not too concerned about the last either, since platforms that can't use shared libs don't get any extensibility with PAM. So this is really not anything that we have to reinvent the wheel for, because plenty of projects have already solved all of these problems in a cross-platform manner. One concrete example is CUPS, which came up in the Samba discussion. There's certain to be autoconf code we can borrow without having to use libtool. Bear in mind, also, that Linux-PAM has a lot of non-portable code in it which will also need to be addressed on a per-OS basis. So there's a lot more to making Linux-PAM build on a given platform than just dropping in a new set of linker args. Is the savings we get from libtool really worth it, then? Steve Langasek postmodern programmer