2016-03-20 13:54:19 +00:00
|
|
|
1 Introduction
|
|
|
|
==============
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2004-06-10 19:39:32 +00:00
|
|
|
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).
|
2001-04-10 03:27:01 +00:00
|
|
|
GNUstep-HOWTO is located in the gnustep-make package or at
|
2016-03-20 13:54:19 +00:00
|
|
|
<http://www.gnustep.org>
|
2001-02-22 05:56:33 +00:00
|
|
|
|
2024-10-10 09:16:47 +00:00
|
|
|
There are two Objective-C toolchains available for GNUstep: the
|
|
|
|
original GNU Objective-C runtime bundled with GCC, and the new
|
|
|
|
libobjc2 runtime with Objective-C 2.0 features. Due to lack of
|
|
|
|
Objective-C 2.0 support in GCC, the libobjc2 runtime requires the
|
|
|
|
use of clang.
|
|
|
|
|
|
|
|
Here is a list of some of the features of the libobjc2 runtime:
|
|
|
|
|
|
|
|
* Modern Objective-C runtime APIs, initially introduced with OS X 10.5.
|
|
|
|
* Fast message passing, and caching.
|
|
|
|
* Blocks (closures).
|
|
|
|
* @property syntax for declaring properties.
|
|
|
|
* Efficient support for @synchronized()
|
|
|
|
* Type-dependent dispatch, eliminating stack corruption from mismatched selectors.
|
|
|
|
* Support for the associated reference APIs introduced with Mac OS X 10.6.
|
|
|
|
* Support for the automatic reference counting APIs introduced with Mac OS X 10.7
|
|
|
|
* Support for fast-path message dispatch for common methods (e.g. retain, release, autorelease).
|
|
|
|
|
|
|
|
We recommend using the new toolchain when possible.
|
|
|
|
|
2007-11-08 18:02:23 +00:00
|
|
|
This version of gnustep-base requires gnustep-make version 2.0.0 or
|
|
|
|
higher.
|
|
|
|
|
2005-07-21 13:58:00 +00:00
|
|
|
Other external libraries that you may need to install include:
|
|
|
|
|
2015-05-15 08:57:32 +00:00
|
|
|
* ffi (HIGHLY RECOMMENDED)
|
|
|
|
* icu (HIGHLY RECOMMENDED)
|
|
|
|
* gnutls (HIGHLY RECOMMENDED)
|
2005-07-21 13:58:00 +00:00
|
|
|
* libxml2 (RECOMMENDED)
|
2024-05-26 15:17:54 +00:00
|
|
|
* libxslt (OPTIONAL)
|
2023-09-11 18:57:02 +00:00
|
|
|
* libavahi (RECOMMENDED for NSNetServices)
|
|
|
|
* zlib (RECOMMENDED)
|
2005-07-21 13:58:00 +00:00
|
|
|
* iconv (OPTIONAL, not needed if you have glibc)
|
2015-05-15 08:57:32 +00:00
|
|
|
* openssl (OPTIONAL, not needed if you have gnutls)
|
2024-10-10 09:16:47 +00:00
|
|
|
* libcurl (REQUIRED WHEN USING Objective-C 2.0 TOOLCHAIN)
|
2024-05-26 15:17:54 +00:00
|
|
|
* libdispatch (RECOMMENDED)
|
2015-05-15 08:57:32 +00:00
|
|
|
|
2001-02-22 05:56:33 +00:00
|
|
|
If you are installing the GNUstep libraries individually, make sure
|
2003-02-17 03:14:17 +00:00
|
|
|
you have installed the GNUstep Makefile package (gnustep-make) already,
|
|
|
|
and you have sourced the makefile script:
|
2007-04-12 14:23:35 +00:00
|
|
|
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
|
2003-02-17 03:14:17 +00:00
|
|
|
See the GNUstep-HOWTO for more information.
|
2001-05-29 19:42:39 +00:00
|
|
|
|
2002-03-14 16:07:01 +00:00
|
|
|
After installing this library you should install gnustep-gui if you
|
|
|
|
are going to use graphical applications.
|
|
|
|
|
2001-05-29 19:42:39 +00:00
|
|
|
When you configure this library, make sure you use the same
|
2016-03-20 13:54:19 +00:00
|
|
|
configuration options as with gstep-make. Some additional options to
|
2001-02-22 05:56:33 +00:00
|
|
|
configure are described below.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2003-07-23 04:15:36 +00:00
|
|
|
Quick installation instructions:
|
|
|
|
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
To make and install the documentation:
|
|
|
|
|
|
|
|
cd Documentation
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
2 Configuration
|
|
|
|
===============
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
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
|
2007-04-12 14:23:35 +00:00
|
|
|
gstep-base will automatically install in the directory specified by the
|
2016-03-20 13:54:19 +00:00
|
|
|
'GNUSTEP_SYSTEM_ROOT' environment variable (specified when you installed
|
|
|
|
gnustep-make).
|
2001-02-22 05:56:33 +00:00
|
|
|
|
|
|
|
Some configuration options for the base library need to be specified
|
2016-03-20 13:54:19 +00:00
|
|
|
when configuring the gnustep-make package. In most cases, it is a good
|
2001-02-22 05:56:33 +00:00
|
|
|
idea to specify the same configuration options when configuring both
|
|
|
|
packages, just to make sure.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
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
|
2016-03-20 13:54:19 +00:00
|
|
|
<http://www.gnustep.org>.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
2.1 Reading Command-Line Arguments
|
|
|
|
----------------------------------
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2004-06-10 19:39:32 +00:00
|
|
|
There are two features that change how GNUstep gets access to
|
2016-03-20 13:54:19 +00:00
|
|
|
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).
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
The fake-main option _secretly_ renames the 'main()' function and
|
2000-12-08 19:06:00 +00:00
|
|
|
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];
|
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
in the 'main()' function of their program.
|
2000-12-08 19:06:00 +00:00
|
|
|
|
|
|
|
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
|
2016-03-20 13:54:19 +00:00
|
|
|
force the fake-main hack to be used, which will always work. Note that
|
2000-12-08 19:06:00 +00:00
|
|
|
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
|
2016-03-20 13:54:19 +00:00
|
|
|
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
|
2000-12-08 19:06:00 +00:00
|
|
|
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).
|
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
2.2 FFI Library
|
|
|
|
---------------
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2004-06-10 19:39:32 +00:00
|
|
|
GNUstep's NSInvocations and Distributed Objects code involves detailed
|
|
|
|
manipulation of the stack and function calls using a library that
|
2015-05-15 08:57:32 +00:00
|
|
|
implements a Foreign-Function Interface (FFI), such as the libffi
|
2016-03-20 13:54:19 +00:00
|
|
|
library. Use of libffi is automatically enabled if the libffi library
|
2015-05-15 08:57:32 +00:00
|
|
|
is found (and the same with ffcall, although libffi takes precedence),
|
2016-03-20 13:54:19 +00:00
|
|
|
unless specifically disabled with '--disable-do'.
|
2001-06-13 02:30:25 +00:00
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
3 Compilation
|
|
|
|
=============
|
2000-12-08 19:06:00 +00:00
|
|
|
|
2016-03-20 13:54:19 +00:00
|
|
|
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
|
2007-04-12 14:23:35 +00:00
|
|
|
the gstep-make package for more information on these options.
|
2001-02-22 05:56:33 +00:00
|
|
|
|
2007-04-12 14:23:35 +00:00
|
|
|
If you can't install gstep-base as root, be sure to edit the
|
2016-03-20 13:54:19 +00:00
|
|
|
'Tools/gdomap.h' file and uncomment the last line.
|
2001-02-22 05:56:33 +00:00
|
|
|
|
2005-07-21 13:58:00 +00:00
|
|
|
Copyright (C) 2005 Free Software Foundation
|
|
|
|
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
notice and this notice are preserved.
|
|
|
|
|