[pcre-dev] [Bug 690] readline does not provide termcap funct…

Kezdőlap
Üzenet törlése
Szerző: Poor Yorick
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 690] readline does not provide termcap functions
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=690

Poor Yorick <org.exim@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |org.exim@???





--- Comment #2 from Poor Yorick <org.exim@???> 2008-04-04 17:17:10 ---
> -------Original Message-------
> From: Philip Hazel <ph10@???>
> Subject: [Bug 690] readline does not provide termcap functions

[SNIP]
> On Wed, 2 Apr 2008, Poor Yorick wrote:
>
> > if --enable-pcretest-libreadline is used, pcre-7.6 checks for readline, but
> > does not link to any termcap-like library.
>
> When I build it like that on a Gentoo system, it all works without any
> problems. -lreadline seems good enough. What system are you building on?
>
> > configure.ac should do something
> > like the following example (from R-2.6.2):
> >
>  >     AC_CHECK_LIB(ncurses, main, [],
>  >                  AC_CHECK_LIB(termcap, main, [],
>  >                               AC_CHECK_LIB(termlib, main)))
>  >     AC_CHECK_LIB(readline, rl_callback_read_char)

>
> Do we know that libreadline uses termcap and not terminfo? On all
> systems? I fear that this may be not as simple as just that.
>


-lreadline would be good enough on a distribution which modified the readline
build to explicitly specify a dependency on some termcap library, which is
probably what Gentoo does (I'm just guessing). If you just build the
distribution version of readline, like I did, then readline does not have a
dependency on any particular termcap library, but defers to the application
linking against it. In my case, I setting the environment variable LIBS
allowed me to build pcre-7.6:

        LIBS="-lncurses"


Maybe in the case of pcre, the best fix to do nothing in the code, but just add
something to the documentation about --enable-pcretest-libreadline, warning
that pcre makes no assumptions about which termcap library readline should link
to, and that on some systems it may be necessary to specify the library using
LIBS.

Or, the bug-bash mailing list might have better suggestions.

--
Poor Yorick


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email