Re: BUG #2674: libedit not detected

From: Bob Friesenhahn <bfriesen(at)simple(dot)dallas(dot)tx(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2674: libedit not detected
Date: 2006-10-04 21:09:21
Message-ID: Pine.SOC.4.60.0610041559100.909@blade.simplesystems.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 4 Oct 2006, Tom Lane wrote:

> "Bob Friesenhahn" <bfriesen(at)simple(dot)dallas(dot)tx(dot)us> writes:
>> libedit-20060829-2.9 was installed to /usr/local.
>
>> Configure was executed like:
>> LDFLAGS=-L/usr/local/lib ./configure '--prefix=/opt/foo/postgresql'
>> '--with-openssl' '--enable-thread-safety' '--with-pam' '--with-python'
>> '--enable-integer-datetimes'
>
>> configure: error: history header not found
>
> Apparently your compiler doesn't search /usr/local/include by default.

Actually, it does. The current version of libedit
(http://www.thrysoee.dk/editline/) does not provide a history.h
header. However, I created an empty history.h
(/usr/local/include/editline/history.h) to fool configure and was able
to get PostgreSQL working with libedit. When built with libedit, the
PostgreSQL sources do not seem to actually use the history.h header.

Due to the licensing issues, it would be very useful if the configure
script provided a means to specify using libedit rather than
libreadline. With the current approach, libreadline is automatically
used if it exists. Libreadline always takes priority over libedit.
I had to delete libreadline and its headers from my machine in order
to use libedit. Of course this broke a number of installed
applications.

> The recommended way to do this is to
> configure --with-includes=/usr/local/include --with-libs=/usr/local/lib
> rather than fooling with LDFLAGS or CPPFLAGS directly.

Ok, thanks. The reason why I used this approach is that Apple's OS X
provides a version of libedit which does not include the readline
emulation and Apple's GCC searches /usr/lib prior to /usr/local/lib by
default.

Bob
======================================
Bob Friesenhahn
bfriesen(at)simple(dot)dallas(dot)tx(dot)us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-10-04 21:29:58 Re: BUG #2674: libedit not detected
Previous Message Tom Lane 2006-10-04 20:47:53 Re: BUG #2674: libedit not detected