Every once in a while some user complains that "the cursor keys don't work
anymore in psql".  There has even been one case where a major vendor has
shipped binaries without readline support.  While we keep telling them,
"make sure configure finds the library and the header files", this is a
rather difficult thing for users to do reliably, especially if they are
using a pre-packaged deal where no intervention is expected.

I think we should add a --with-readline option to configure, and make
configure die with an error if the option is used and no readline is
found.  If the option is not used, readline would still be used if found.

Comments?

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Mon, 21 May 2001 17:35:32 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Detecting readline in configure
Peter Eisentraut <peter_e@gmx.net> writes:
> I think we should add a --with-readline option to configure, and make
> configure die with an error if the option is used and no readline is
> found.  If the option is not used, readline would still be used if found.

This would not help, unless the user was clueful enough to invoke the
option, which would likely not be true.  (AFAICT, the majority of these
complaints come from people who don't even know what libreadline is,
let alone that they have no or only a partial install of it.)

An effective but rather fascist approach would be to make the option be
--without-readline, ie, the *default* behavior of configure is to fail
unless a usable readline is found.  I do not think I like that, since
readline does not qualify as a critical component IMHO.  (And, given
the GPL-vs-every-other-license political agenda of the readline crowd,
I don't want them to think we think that either ;-))

I suggest that the behavior of configure not be changed, but that it be
tweaked to put out a slightly more obvious notice about not being able
to find readline support.  Maybe

	checking for libreadline ... no
	checking for libedit ... no
	*
	* NOTICE: I couldn't find libreadline nor libedit.  You will
	* not have history support in psql.
	*

			regards, tom lane

Mon, 21 May 2001 12:58:45 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Detecting readline in configure 
Tom Lane writes:

> I suggest that the behavior of configure not be changed, but that it be
> tweaked to put out a slightly more obvious notice about not being able
> to find readline support.  Maybe
>
> 	checking for libreadline ... no
> 	checking for libedit ... no
> 	*
> 	* NOTICE: I couldn't find libreadline nor libedit.  You will
> 	* not have history support in psql.
> 	*

This may be useful as well, but it doesn't help those doing unattended
builds, such as RPMs and *BSD ports.  In that case you need to abort to
notify the user that things didn't go the way the package maker had
planned.

Let's do both.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Mon, 21 May 2001 19:48:59 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: Detecting readline in configure 
Peter Eisentraut <peter_e@gmx.net> writes:
> This may be useful as well, but it doesn't help those doing unattended
> builds, such as RPMs and *BSD ports.  In that case you need to abort to
> notify the user that things didn't go the way the package maker had
> planned.

Oh, I see: you are thinking of --with-readline as something a package
maintainer would put into a specfile.  OK, that seems like something
that might be useful to do.

> Let's do both.

Agreed.

			regards, tom lane

Mon, 21 May 2001 13:56:35 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Detecting readline in configure 
peter_e@gmx.net (Peter Eisentraut) wrote in message news:<Pine.LNX.4.30.0105211728290.757-100000@peter.localdomain>...
> Every once in a while some user complains that "the cursor keys don't work
> anymore in psql".  There has even been one case where a major vendor has
> shipped binaries without readline support.  While we keep telling them,
> "make sure configure finds the library and the header files", this is a
> rather difficult thing for users to do reliably, especially if they are
> using a pre-packaged deal where no intervention is expected.

Just FYI,

On SGI IRIX, the libreadline is in /usr/freeware/lib and
/usr/freeware/include. It's no big thing to
add the --with-includes and --with-lib, but it would be nice if the
irix template were
told to look for libreadline there.

-Tony

21 May 2001 13:28:20 -0700
reina@nsi.edu (Tony Reina)
Re: Detecting readline in configure
On Mon, 21 May 2001, Peter Eisentraut wrote:

> Tom Lane writes:
> 
> > 	checking for libreadline ... no
> > 	checking for libedit ... no
> > 	*
> > 	* NOTICE: I couldn't find libreadline nor libedit.  You will
> > 	* not have history support in psql.
> > 	*
> 
> This may be useful as well, but it doesn't help those doing unattended
> builds, such as RPMs and *BSD ports.  In that case you need to abort to
> notify the user that things didn't go the way the package maker had
> planned.

*BSD ports/packages shouldn't have much of a problem. They can encode
dependencies, both in the binary package and in the build-from-source
process. So if the package maker did things right, the packaging system
would have either squalked, or tried to install libreadline before running
configure.

Take care,

Bill


Tue, 22 May 2001 23:58:20 -0700 (PDT)
Bill Studenmund <wrstuden@zembu.com>
Re: Detecting readline in configure 