[m-dev.] for review: add readline support to mdb

Tyson Dowd trd at cs.mu.OZ.AU
Thu Mar 25 00:43:34 AEDT 1999


On 24-Mar-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 22-Mar-1999, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > On 22-Mar-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > Estimated hours taken: 10
> > > 
> > > Add GNU readline support to the debugger.
> > 
> > Just one question first -- why include readline in the source distribution?
> 
> Well, the idea is to make it easier for the user to install things,
> since they only need to install one package, rather than having to install
> two. 

They still have to install two packages, they just have to download
and build once.

I suspect on most systems this will end up installing a second copy
of readline.

> It does increase the size of the source distribution a bit
> (by about 600k compressed), but that seems like a worthwhile
> price to pay for ease of installation, I think... no?

I don't know.  Sounds like it could cause as many problems as it solves.
It's not like it's difficult to find or install readline, and it's just
an optional feature anyway.  Almost every Linux system out there
has package management designed to handle just this sort of problem
(ease installation of library dependencies).  Every non-Linux UNIX
system has probably installed libreadline by hand anyway a *long* time
ago anyway.

Except for the fact the download is already so huge, 600k would seem a
lot to pay.

> > Readline is not exactly uncommon, I would expect it to be installed
> > already on any system that has built their own gdb or bash for instance.
> > 
> > I don't really like the idea of installing readline as part of the
> > installation of Mercury -- if you install with prefix of /usr or
> > /usr/local you might overwrite your current installation of readline.
> 
> Yes, this is a potential problem.
> What do gdb and bash do about this?

They don't install readline, they just link against it.

We actually install readline as a development library (e.g. we install
headers and all).

> How about having the Mercury configure script check if readline is
> already installed and only install readline if it hasn't already been
> installed?  Or perhaps only if the version of readline installed
> is older than the one with the Mercury distribution?

Only if incompatible would be preferable.  If people have an older
readline library installed that has actually been patched to work
on their system, I don't particularly want to force them to upgrade
to a new version that may or may not work.  Often the local version
has bug fixes that are there for a very good reason.

And when/if it does install it, it should be installed in the Mercury
libs directory, like we do with boehm GC.  

-- 
The quantum sort: 
	while (!sorted) { do_nothing(); }
Tyson Dowd   <tyson at tyse.net>   http://tyse.net/



More information about the developers mailing list