Your Search Results

    Checkout and Build NSPR

    Warning: The content of this article may be out of date. Please help by moving whatever helpful, up-to-date information there is on this page into NSPR build instructions and turning this page into a redirect.

    Checkout

    To checkout NetScape Portable Runtime (NSPR) you need CVS 1.10 set the CVSROOT enviornment variable to:

    :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

    Issue the command:

    cvs checkout [-r TAG] mozilla/nsprpub

    You now have NSPR checked out into the current working directory.

    Build

    There are two different build procedures for NSPR, depending on which NSPR release you want to build. NSPR releases 4.1.x and earlier use the classic build method. Beginning with NSPR release 4.2 an autoconf based make system is used.

    Building NSPR varies a little depending on platform. Building NSPR builds only NSPR libraries, the test cases must be built separately. Building debug and optimized targets requires options on the gmake or configure command line. Read on.

    Unix

    Autoconf (NSPR 4.2 and later)

    In the directory you have checked NSPR out to, create a directory to contain the build targets; cd to that directory; run configure and make. For example, say:

    mkdir target
    cd target
    ../mozilla/nsprpub/configure
    gmake
    cd pr/tests
    gmake

    The above commands build the debug targets. To build the optimized targets, the configure command should say:

    ... configure --enable-optimize --disable-debug

    For platforms supporting it, to build 64bit targets, add the --enable-64bit option to the configure command.

    Classic (NSPR 4.1.x and earlier)

    Building debug targets, first NSPR itself, then the test suite:

    cd mozilla/nsprpub
    gmake
    cd pr/tests
    gmake
    

    To build the optimized targets, change the gmake commands to:

    gmake BUILD_OPT=1

    Windows

    Autoconf (NSPR 4.2 and later)

    Using the autoconf build method on Windows requires the Cygwin Toolkit.

    Open a Cygwin window. Follow the procedure described for building NSPR on Unix.

    Classic (NSPR 4.1.x and earlier)

    Building Windows targets is similar. There are two builds for Windows: a generic Win32 build and a WinNT build. The difference is that the WinNT build runs only on Windows NT (and Windows 2000); the generic Win32 build runs on any of Win9x, WinME, WinNT, Win2K.

    The following assumes MSVC 6.0 with ServicePack 4. The compiler is must be configured to run from the command line.

    To build the generic Win32 debug targets:

    cd mozilla\nsprpub
    gmake OS_TARGET=WIN95
    cd pr\tests
    gmake OS_TARGET=WIN95

    To build the optimized targets, add BUILD_OPT=1 option to the gmake command.

    To build the WinNT debug targets:

    cd mozilla\nsprpub
    gmake
    cd pr\tests
    gmake

    To build the optimized targets, add BUILD_OPT=1 option to the gmake command.

    Mac

    Follow the Unix build instructions.

    Others

    Specialists on mozilla contributed ports are invited to contribute to this section.

    Original Document Information

    Document Tags and Contributors

    Contributors to this page: Wtchang, kwright, Pd, Jorend, Mgjbot
    Last updated by: kwright,