libs-base/INSTALL
fedor 5000b2d5c7 Version 1.3.4
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14021 72102866-910b-0410-8b05-ffd578937521
2002-07-04 03:21:51 +00:00

126 lines
5.7 KiB
Text

Introduction
============
If you are installing this package as part of the GNUstep core
packages, read the file GNUstep-HOWTO for more complete instructions on
how to install the entire GNUstep package (including this library).
GNUstep-HOWTO is located in the gnustep-make package or at
<http://www.gnustep.org>
If you are installing the GNUstep libraries individually, make sure
you have installed the GNUstep Makefile package (gnustep-make) already.
In addition you should install an Objective-C library (gnustep-objc)
if you are not using gcc 3.x, as well some other libraries (notably
ffcall). See the GNUstep-HOWTO for more information.
After installing this library you should install gnustep-gui if you
are going to use graphical applications.
When you configure this library, make sure you use the same
configuration options as with gstep-make. Some additional options to
configure are described below.
Configuration
=============
Configuration is performed by running the `configure' program at a
shell prompt. You may want to use some of the optional arguments to the
`configure' program. Type `configure --help' for a list of these. It is
not likely that you will need to use the `--prefix' option, since
gstep-base will automatically install in the directory specified by the
`GNUSTEP_SYSTEM_ROOT' environment variable (specified when you
installed gnustep-make).
Some configuration options for the base library need to be specified
when configuring the gnustep-make package. In most cases, it is a good
idea to specify the same configuration options when configuring both
packages, just to make sure.
Also make sure you've read the machine-specific instructions for your
particular operating system and CPU. These instructions come with the
GNUstep-HOWTO and are also located at the GNUstep web site at
<http://www.gnustep.org>.
Reading Command-Line Arguments
------------------------------
There are two features that change how GNUstep gets access to
command-line arguments and environment variables (normally passed to
the program in the `main()' function. These features are
`--enable-pass-arguments' and the `--enable-fake-main' option(s).
The fake-main option _secretly_ renames the `main()' function and
substitutes it's own function which stores the command line arguments
before calling the real main.
The pass-arguments option absolves GNUstep of any effort to get the
command-line arguments and instead forces the developer to insert the
line
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
in the `main()' function of their program.
Normally, the configure script will determine if a program can read
process information directly from the system (for use by the class
NSProcessInfo) and enable or disable the fake-main hack automatically,
but if you find that configure is not doing this correctly, you can
force the fake-main hack to be used, which will always work. Note that
if the fake-main hack is enabled, you need to include the header file
GSConfig.h in you main program - this is done by default if you include
NSObject.h or Foundation.h. If you want to avoid the whole idea of the
fake-main hack, you can use the pass-arguments option. In this case you
will be forced to call the NSProcessInfo initializeWithArguments method
to pass the program arguments to NSProcessInfo (This would be done
automatically if you use the NSApplicationMain function in a gui
application).
FFI Library
-----------
GNUstep's NSInvocations and Distributed Objects code involves
detailed manipulation of the stack and function calls using a library
that implements a Foreign-Function Interface (FFI), such as the ffcall
or libffi libraries. Use of ffcall is automatically enabled if the
ffcall libraries are found, unless specifically disabled with
`--disable-ffcall'. If disabled, the code reverts to the builtin
method for stack frame handling, but this rarely works on non-ix86
machines and is not supported.
You need to have the ffcall libraries, which you can get from
<ftp://www.gnustep.org/pub/gnustep/libs/> or
<http://clisp.cons.org/~haible/>. You also need to have a special
version of the Objective-C library if you are not using gcc 3.x (before
gcc 3.0 the required hooks were not in the standard library). You can
get this library from <ftp://www.gnustep.org/pub/gnustep/libs>.
Support for the libffi library has also been added, although it is
not as well tested as ffcall. Current versions of libffi are only
distributed with gcc version 3.x, although it is not installed by
default. To install it, after you have built gcc, go to the libffi
build directory and type 'make install'. To enable this in the
gnustep-base library, use the configure option `--enable-libffi'.
OpenSSL
-------
GNUstep base has optional support for using the OpenSSL libraries for
secure URL connections (with the NSURL classes). This functionality is
compiled as a separate bundle since the OpenSSL license is not
compatible with GPL, and in the hopes that if someone writes an openssl
replacement, it can quickly be used by creating another bundle. The
openssl libraries need to be installed for this to work. To disable
this option add `--disable-openssl' when running the `configure' script.
Compilation
===========
To compile this library, type make. After this is complete, type make
install (make sure you are the root user). Some additional options you
can use with make are `debug=yes' to make a debugging version of the
library and `shared=no' to make a static version of the library. See
the gstep-make package for more information on these options.
If you can't install gstep-base as root, be sure to edit the
`Tools/gdomap.h' file and uncomment the last line.