1998-01-02 18:09:52 +00:00
|
|
|
@c This is a generic INSTALL file for utilities distributions.
|
|
|
|
@c If this package does not come with, e.g., installable documentation or
|
|
|
|
@c data files, please ignore the references to them below.
|
|
|
|
|
|
|
|
@c set the vars GNUSTEP_BASE_VERSION and GNUSTEP_BASE_GCC_VERSION
|
2000-11-07 04:50:41 +00:00
|
|
|
@include version.texi
|
1998-01-02 18:09:52 +00:00
|
|
|
|
2000-12-08 19:06:00 +00:00
|
|
|
@node Top, Introduction, (dir), (dir)
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Introduction::
|
|
|
|
* Configuration::
|
|
|
|
* Reading Command-Line Arguments::
|
|
|
|
* FFI Library::
|
|
|
|
* Compilation::
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Introduction, Configuration, Top, Top
|
|
|
|
@section Introduction
|
|
|
|
|
|
|
|
If you are installing this package as part of the GNUstep core
|
2001-02-22 05:56:33 +00:00
|
|
|
package, read the file GNUstep-HOWTO for more complete instructions on
|
2000-12-08 19:06:00 +00:00
|
|
|
how to install the entire GNUstep package (including this library).
|
2001-02-22 05:56:33 +00:00
|
|
|
GNUstep-HOWTO is located at @url{www.gnustep.org}
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2001-02-22 05:56:33 +00:00
|
|
|
If you are installing the GNUstep libraries individually, make sure you
|
|
|
|
have installed the GNUstep Makefile package (gnustep-make) already.
|
|
|
|
When you configure this library, make sure you use the same
|
2000-12-08 19:06:00 +00:00
|
|
|
configuration options as with gstep-make. Some additional options to
|
|
|
|
configure are described below.
|
|
|
|
|
|
|
|
@node Configuration, Reading Command-Line Arguments, Introduction, Top
|
|
|
|
@section Configuration
|
|
|
|
|
|
|
|
Configuration is performed by running the @file{configure} program at a
|
|
|
|
shell prompt. You may want to use some of the optional arguments to the
|
|
|
|
@file{configure} program. Type @code{configure --help}
|
|
|
|
for a list of these. It is not likely that you will need to use the
|
|
|
|
@code{--prefix} option, since gstep-base will automatically install in
|
|
|
|
the directory specified by the @code{GNUSTEP_SYSTEM_ROOT} environment
|
|
|
|
variable (specified when you installed gstep-make).
|
|
|
|
|
2001-02-22 05:56:33 +00:00
|
|
|
Some configuration options for the base library need to be specified
|
2000-12-08 19:06:00 +00:00
|
|
|
when configuring the gstep-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
|
2001-02-22 05:56:33 +00:00
|
|
|
GNUstep-HOWTO and are also located at the GNUstep web site at
|
2000-12-08 19:06:00 +00:00
|
|
|
@url{http://www.gnustep.org}.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Reading Command-Line Arguments::
|
|
|
|
* FFI Library::
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Reading Command-Line Arguments, FFI Library, Configuration, Top
|
2001-02-22 05:56:33 +00:00
|
|
|
@subsection Reading Command-Line Arguments
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
There are two features that change how GNUstep gets access to
|
|
|
|
command-line arguments and environment variables (normally passed to
|
|
|
|
the program in the @code{main()} function. These features are
|
|
|
|
@code{--enable-pass-arguments} and the @code{--enable-fake-main}
|
|
|
|
option(s).
|
|
|
|
|
|
|
|
The fake-main option @emph{secretly} renames the @code{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
|
|
|
|
|
|
|
|
@example
|
|
|
|
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
|
|
|
|
@end example
|
|
|
|
|
|
|
|
in the @code{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).
|
|
|
|
|
|
|
|
@node FFI Library, Compilation, Reading Command-Line Arguments, Top
|
2001-02-22 05:56:33 +00:00
|
|
|
@subsection FFI Library
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
GNUstep's NSInvocations and Distributed Objects code involves detailed
|
2001-02-22 05:56:33 +00:00
|
|
|
manipulation of the stack and function calls using a
|
2000-12-08 19:06:00 +00:00
|
|
|
library that implements a Foreign-Function Interface (FFI), such as the
|
2001-02-22 05:56:33 +00:00
|
|
|
ffcall libraries. Use of ffcall is automatically enabled if the ffcall
|
|
|
|
libraries are found, unless specifically disabled with @code{--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.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2001-02-22 05:56:33 +00:00
|
|
|
You need to have the ffcall libraries, which you can
|
|
|
|
get from @url{ftp://www.gnustep.org/pub/gnustep/libs/} or
|
2000-12-08 19:06:00 +00:00
|
|
|
@url{http://clisp.cons.org/~haible/}. You also need to have a special
|
|
|
|
version of the Objective-C library (as of gcc 2.95.x the required hooks
|
|
|
|
are not in the standard library). You can get this library from
|
2001-02-22 05:56:33 +00:00
|
|
|
@url{ftp://www.gnustep.org/pub/gnustep/libs/libobjc-0.9.1.tar.gz}.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
@node Compilation, , FFI Library, Top
|
|
|
|
@section 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 @samp{debug=yes} to make a debugging version of
|
|
|
|
the library and @samp{shared=no} to make a static version of the
|
|
|
|
library. See the gstep-make package for more information on these options.
|
|
|
|
|
2001-02-22 05:56:33 +00:00
|
|
|
If you can't install gstep-base as root, be sure to edit the
|
|
|
|
@file{Tools/gdomap.h} file and uncomment the last line.
|
1998-01-02 18:09:52 +00:00
|
|
|
|
|
|
|
@bye
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|