NSPR-4.9

Introduction to NSPR

Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions.

This package is known to build and work properly using an LFS-7.1 platform.

Package Information

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/nspr

Installation of NSPR

Install NSPR by running the following commands:

cd mozilla/nsprpub &&
sed -i 's#^\(RELEASE_BINS =\).*#\1#' pr/src/misc/Makefile.in &&
sed -i 's#$(LIBRARY) ##' config/rules.mk &&
./configure --prefix=/usr --with-mozilla --with-pthreads \
  $([ $(uname -m) = x86_64 ] && echo --enable-64bit) &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

cat > /usr/lib/pkgconfig/nspr.pc << "HERE_DOC"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: 4.9.0
Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread 
Cflags: -I${includedir}
HERE_DOC

Command Explanations

--with-mozilla: This parameter adds Mozilla support to the libraries (required if you want to build any other Mozilla products and link them to these libraries).

--with-pthreads: This parameter forces use of the system pthreads library.

$([ $(uname -m) ... --enable-64bit: This parameter is required on an x86_64 system to prevent configure failing with a claim that this is a system without pthread support. It has no effect on a 32 bit system.

sed -i 's#^\(RELEASE_BINS ...: This disables installing two unneeded scripts.

sed -i 's#$(LIBRARY) ##' config/rules.mk: This disables installing the static libraries.

cat > /usr/lib/pkgconfig/nspr.pc ...Create a pkg-config file to help other programs finding the nspr libraries.

Contents

Installed Programs: nspr-config
Installed Libraries: libnspr4.so, libplc4.so, and libplds4.so
Installed Directories: /usr/include/nspr

Short Descriptions

nspr-config

provides compiler and linker options to other packages that use NSPR.

libnspr4.so

contains functions that provide platform independence for non-GUI operating system facilities such as threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management and shared library linking.

libplc4.so

contains functions that implement many of the features offered by libnspr4

libplds4.so

contains functions that provide data structures.

Last updated on 2012-03-06 16:54:55 +0000