NSPR-4.38.2

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 4. Networking

- Prev

  libtasn1-4.21.0

- Next

  NSS-3.120.1

- Up
- Home

# NSPR-4.38.2

## Introduction to NSPR

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

- Download: https://archive.mozilla.org/pub/nspr/releases/v4.38.2/src/nspr-4.38.2.tar.gz

## Installation of NSPR

Install NSPR by running the following commands:

    cd nspr &&

    sed -i '/^RELEASE/s|^|#|' pr/src/misc/Makefile.in &&
    sed -i 's|$(LIBRARY) ||'  config/rules.mk         &&

    ./configure --prefix=/usr   \
                --with-mozilla  \
                --with-pthreads \
                --enable-64bit &&

    make

Now, as the `root` user:

    make install

## lib32 Installation of NSPR

Install lib32-NSPR by running the following commands:

    make distclean &&
    CC="gcc -m32" CXX="g++ -m32"   \
    PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
    ./configure --prefix=/usr            \
                --libdir=/usr/lib32      \
                --host=i686-pc-linux-gnu \
                --with-mozilla           \
                --with-pthreads          \
                --disable-64bit &&

    make

Now, as the `root` user:

    make DESTDIR=$PWD/DESTDIR install     &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Run ./configure --help for a full list of options.

sed -ri '/^RELEASE/s/^/#/' pr/src/misc/Makefile.in: This sed disables installing two unneeded scripts.

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

`--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 pthread library.

`--enable-64bit`: The --enable-64bit parameter is required on an x86_64 system to prevent configure failing with a claim that this is a system without pthread support.

`--disable-64bit`: This parameter disables building for 64-bit in the lib32 installation.

## Contents

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

### Short Descriptions

nspr-config | provides compiler and linker options to other packages that use NSPR
`libnspr4` | 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` | contains functions that implement many of the features offered by libnspr4
`libplds4` | contains functions that provide data structures

- Prev

  libtasn1-4.21.0

- Next

  NSS-3.120.1

- Up
- Home