
Build instructions
==================

 0. You can compile this library using the 2.7.2 compiler with an additional
    Objective-C runtime patch from the following ftp sites

	ftp://ftp.wsct.wsc.com/pub/gnustep
	ftp://ftp.ocbi.com/pub/GNUstep

    You'll also need the GNUmake to compile this package.

 1. Before you start to build the package, you must configure it. You do this
    by running the configure script from this directory. It takes several
    minutes to run, depending on your machine speed.

    If you're compiling the package on a NeXT system you can compile it to
    use with either the GNU or the NeXT Objective-C runtime. You can specify
    this by setting the OBJC_RUNTIME variable. For example:

	OBJC_RUNTIME=gnu ./configure

    will compile the package using the GNU runtime. Similarly, you can do:

	OBJC_RUNTIME=next ./configure

    In the last case you will be able to link the package with code compiled
    with the native compiler.

    If you don't specify the OBJC_RUNTIME flag the code will be compiled with
    the default option for runtime. It is either -fnext-runtime on NeXT
    systems or -fgnu-runtime on the other machines.

    You can also specify the compiler using the CC variable. The package has
    been compiled using the 2.6.3, 2.7.0 and 2.7.2.1 gcc versions, depending on
    machine. If you compile the package with other versions than 2.7.2.1 you
    will need to adapt yourself the Objective-C patch to the compiler sources.

    Compiling the package on NeXT release 3.3 with the native compiler won't
    work. The native compiler doesn't support nested functions and variable
    arguments macros.

 2. Run `make' to compile the package. To be able to compile you'll need
    GNU make.

    If you want to use the source tree to compile for several
    machines you can set the OBJDIR make variable:

	make OBJDIR=i386_obj

    When you compile you should take care of configuration files config.h and
    config.mak. These files contain machine dependent definitions.

 3. Before you install the library you may want to set up the locales for your
    site. To do this go to the Resources/Defaults directory and modify the
    NSGlobalDomain.plist file as you wish. This file specifies the language and
    the time zone name of your site.

    If your language is not included in the supported languages, you can create
    a new one using as model one of the existing language files.

    The timezones are specified in the Resources/TimeZoneInfo directory. You
    should choose as time zone the one that coresponds to your geo-political
    region.

 4. Type `make install' to install the library, the headers and the public
    binaries. By default `make install' will install these in the
    /usr/local/lib and /usr/local/include. If you want to change the directory
    you have either to give the configure program the --prefix option or to
    set the make variable prefix:

	configure --prefix=/usr/gnu
    or
	make prefix=/usr/gnu

 5. To try out if the package works fine on your machine, you can run the tests
    from the FoundationTestsuite directory. All the tests are written using the
    DejaGnu testing framework. So if you don't have installed the package on
    your machine you have to install it before trying out these tests.

    The classes that intimately depend on the specific machine are
    NSMethodSignature and NSInvocation. If you get crashes when you run the
    NSInvocation and NSMethodSignature tests you have to look to the sources
    for these classes in the Foundation directory.

 6. You can remove the object files and binaries using the `make clean'
    command. You can also remove all the generated files (the files generated
    by configure etc) with `make distclean'.


Problems
========

    If the tests with the Objective-C runtime crash on returning small
    structures, then add in the header machine specific to your machine in
    the compiler sources a definition for OBJC_MAX_STRUCT_BY_VALUE macro then
    recompile the Objective-C runtime library. Take as example the definition
    for NeXT (in config/i386/next.h). If you try this package on a machine and
    you needed to define the OBJC_MAX_STRUCT_BY_VALUE macro in order to make
    the returning of small structures work, please send a message telling this
    to ovidiu@bx.logicnet.ro or scott@net-community.com.



