[tech] ncurses lib installing method as local user
Background
The Ncurses package contains libraries for terminal-independent handling of character screens. It is essential for many softwares using
interaction.
Utilities-->curses(API)-->terminfo(terminal capability data base)
ncurses is a clone of curses from "System V Release 4.0 (SVr4)" and compatible with later.
Contents of Ncurses
Installation
check and download the newest released source code in ftp://ftp.gnu.org/pub/gnu/ncurses/
tar -xzvf ncurses-5.9.tar.gz # take version 5.9 as example cd ncurses-5.9
there wil be 2 main style to install:
1. without wide-character libraries
./configure --prefix=your_address_here \ --with-shared \ --with-libtool \ --with-normal \ --with-profile \ --with-termlib \ # if termlib isnt installed --enable-pc-files \ # as root(my experience is .pc files will be installed into /usr/lib rather than your prefix)
2. with wide-character libraries
./configure --prefix=your_address_here \ --with-shared \ --with-libtool \ --enable-widec \ --with-profile \ --with-termlib \ # if termlib isnt installed --enable-pc-files \ # as root(my experience is .pc files will be installed into /usr/lib rather than your prefix)
--enable-widec
-
This switch causes wide-character libraries (e.g.,
libncursesw.so.5.9
) to be built instead of normal ones (e.g.,libncurses.so.5.9
). These wide-character libraries are usable in both multibyte and traditional 8-bit locales, while normal libraries work properly only in 8-bit locales. Wide-character and normal libraries are source-compatible, but not binary-compatible. If you want to install them both, maybe you need to specify different path. Cause just one style existed when I specified the same path for two different times of installation.
make make install
cp/ln -s the lib files into your LD_LIBRARY_PATH LIBRARY_PATH or export the lib dir in your prefix into the env vars
cp/ln -s include head files into your C_INCLUDE_PATH CPLUS_INCLUDE_PATH or export the include dir in your prefix into the env vars
If you want to use widec libs to trick apps which need just normal libs, follow the method in this page.
Refs:
http://blog.chinaunix.net/uid-14704264-id-3141148.html
http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html