[pcre-dev] [Bug 698] ncurses library not added when linking …

Kezdőlap
Üzenet törlése
Szerző: Daniel Bergström
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 698] ncurses library not added when linking pcretest
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #2 from Daniel Bergström <daniel@???> 2008-04-22 08:50:09 ---
The issue that I am trying to address is about the inconsistency on how
the options given to CMake is handled.

When specifying which readline library to use, CMake also requires one
to specify the readline include directory and the ncurses library, see
also cmake/FindReadline.cmake. If not all of these are set, an automatic
search is conducted for these libraries.

The automatic search only searches for the ncurses library, in my case
as you mentioned, only the termcap functions were to be used, thus
requiring me to specifiy the library. If the ncurses library is found,
the result is stored on the NCURSES_LIBRARY variable. If not found the
NCURSES_LIBRARY remains empty.

However, in either case, the curses/termcap library set in the
NCURSES_LIBRARY is ignored once linking.

I did compile PCRE with the given changes on a Fedora 7 platform.
Without the patch the libtinfo.so linked. With the patch the libtinfo.so
and libncurses.so is linked. My new suggestion is to use the give patch
but to remove the automatic search for the NCURSES_LIBRARY in the
cmake/FindReadline.cmake:14:

      FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )


And modify the line 17 to:

      FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG
READLINE_INCLUDE_DIR READLINE_LIBRARY )


This would allow one to specify a curses/termcap library when needed and
the automatic search would not add ncurses if found.


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