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!) > > > For the immediate problem: I had understood that generally the best way to > > do linking with "gcc" is to invoke it via "gcc" itself, letting it choose > > its preferred way (whether native "ld" or GNU "ld", as determined when gcc > > was itself installed). That is: the command we invoke should probably be > > of the form "gcc ..." rather than "ld ...". > > Maybe, but what if you want to use Sun's C compiler? Again, isn't it then better, as a rule of thumb, to do this via the compiler invocation ("cc") rather than trying "ld" directly? Certainly whatever I try to do on Suns, I always try my best to avoid invoking (or specifying or...) any "ld" directly, but instead go through the compiler interface. -- : David Lee I.T. Service : : Systems Programmer Computer Centre : : University of Durham : : http://www.dur.ac.uk/t.d.lee/ South Road : : Durham : : Phone: +44 191 374 2882 U.K. :