1 GNUstep makefile package installation
2 *************************************
7 If you are installing this package as part of the GNUstep core
8 libraries, read the file GNUstep-HOWTO for more complete instructions on
9 how to install the entire GNUstep package (including this package).
10 GNUstep-HOWTO comes with this distribution.
12 This should be the first GNUstep package you install. Before
13 installing this package, install ffcall or libffi and any other
14 libraries that GNUstep may need (see the GNUstep-HOWTO). Read and
15 follow the instructions on setting up the GNUstep environement below.
16 Then install gnustep-base.
18 When you configure additional libraries, make sure you use the same
19 configuration options as with gstep-make.
21 Also make sure you've read the machine-specific instructions for your
22 particular operating system and CPU. These instructions come with the
23 GNUstep-HOWTO and are also located at the GNUstep web site at
24 <http://www.gnustep.org>.
26 Quick installation instructions:
32 To make and install the documentation:
41 The GNUstep packages uses the Autoconf mechanism for configuration; it
42 checks some host capabilties which are used by all GNUstep software.
43 To configure just type:
47 The GNUstep makefile package needs a root directory. If the
48 GNUSTEP_SYSTEM_ROOT environment variable is set then configure will use
49 its value as the root directory. You can also specify the root
50 directory when you run configure with the prefix paramter; the
51 following command makes /usr/local/GNUstep the root directory:
53 ./configure --prefix=/usr/local/GNUstep
55 If you do not have the GNUSTEP_SYSTEM_ROOT environment variable set
56 and you do not specify a root directory when running configure, then
57 configure will use /usr/GNUstep as the default root directory.
59 To see more options you can use with configure, type
63 Look particularly at the end of the list that configure gives, as
64 these options are specific to GNUstep. Some of these are described
67 With the GNUstep packages you can use various switches, such as
68 shared and debug, to control compilation. for example, "make shared=no
69 debug=yes" compiles using static libraries with debugging information.
70 (Make sure you use the same switches for every package you compile, and
71 also when you install).
76 By default, the gnustep-make package specifies that GUI backends are
77 built as a bundle and loaded in at runtime. This allows one to switch
78 backends by simply redefining a user default. If you do not want this
79 behavior (for instance, if bundles do not work on your platform), it
82 --disable-backend-bundle
84 in the arguments to configure.
86 Alternate Library Setup
87 -----------------------
89 You can specify compilation of alternate libraries by using the
90 with-library-combo option.
92 ./configure --with-library-combo=apple-gnu-gnu
94 to compile with Apple's runtime on Darwin, for example. See the
95 DESIGN document for more examples of the variety of library combos.
97 Alternate Thread Library
98 ------------------------
100 You can specify compilation of an alternate thread library from the one
101 that is normally used (or if GNUstep does not know what your normal
102 library is) with the with-thread-lib option.
104 ./configure --with-thread-lib="-L/usr/local/lib -lgthread -lglib"
106 to use libgthread as your threading library. Note that the
107 Objective-C runtime (libobjc) must have a compatible threading backend
108 in order to use this threading library and you must set the appropriate
109 threading backend by hand in the GNUmakefile if you are using
110 gnustep-objc. If you also need to set compiler flags, use the CPPFLAGS
111 variable when calling configure:
113 CPPFLAGS="-I/usr/local/include" ./configure --with-thread-lib="-L/usr/local/lib -lgthread -lglib"
118 Up until gcc 3.4, the #import directive was not implemented correctly.
119 As a result, the GCC compiler automatically emitted a warning whenever
120 #import was used. As of gcc 3.4, this problem has been fixed, so
121 presumable, this warning is no longer emitted when code is compiled. If
122 you are using an early compiler, you can supress these warnings by
123 adding `-Wno-import' to `CPPFLAGS' in the config.make file.
125 Configuring for a non-flattened structure
126 -----------------------------------------
128 GNUstep is normally configured to support a single target/combo. If you
129 are interested in supporting more than one target and/or combo, it's
130 possible to configure GNUstep to use a non-'flattened' directory
131 structure. You do this by supplying the `--disable-flattened' argument
132 to configure. You might also want to supply the
133 `--enable-multi-platform' option.
135 In a flattened structure, files are stored at the top-level rather
136 than in a `$(GNUSTEP_CPU)/$(GNUSTEP_OS)/$(LIBRARY_COMBO)' subdirectory.
138 Configuring for a cross-compile target
139 --------------------------------------
141 By default when you run configure, it assumes that you want to create
142 executables for the same host that you are compiling on; however, the
143 GNUstep makefile package has been designed to support cross-compiling
144 just as easily as normal compiling. In order to add a cross-compile
145 target to the GNUstep makefile package, you must rerun configure for
146 that target and reinstall the makefile package. By rerunning
147 configure, the appropriate target settings are determined, and
148 reinstalling the makefile package installs the appropriate files for
149 that target. The target parameter is used to specify the target
150 platform for cross-compiling:
152 ./configure --target=i386-mingw32
155 GNUstep normally is configured to work with only one target. To work
156 with multiple targets, you'll need to add `--disable-flattened' and
157 `--enable-multi-platform' to the configure flags. Files for the
158 different targets will not be overwritten when you configure and install
159 the make package several times.
161 ./configure --disable-flattened --enable-multi-platform --target=i386-mingw32
163 ./configure --disable-flattened --enable-multi-platform --target=sparc-solaris2.5
165 ./configure --disable-flattened --enable-multi-platform --target=alpha-linux-gnu
171 After you configure the GNUstep makefile package, then you need to
172 compile the programs that come with the package. Currently there is
173 only a single C program which needs to be compiled; all of the other
174 files are either shell scripts or makefile fragments, so you can
175 compile and install the makefile package in one step with:
179 After you have installed the GNUstep makefile package, there is still
180 some minor administration to be performed. Based upon whether you are
181 setting up the GNUstep environment for a single user or all users on
182 your system, perform the appropriate step below.
184 Setting up the GNUstep environment
185 ==================================
187 Setting up the GNUstep environment for all users
188 ------------------------------------------------
190 The GNUstep environment and thus usage of the makefile package is based
191 almost solely upon the GNUSTEP_SYSTEM_ROOT environment variable. So
192 essentially the setup involved is to make sure that the variable is
193 defined for all users. The GNUstep.sh file within the makefile package
194 contains all of the environment variable settings required, so you want
195 to call that shell. Some systems, like GNU/Linux have an
196 `/etc/profile.d' directory where scripts can be executed automatically.
197 Just copy GNUstep.sh to this directory for it to work. For other UNIX
198 systems, there might be a system wide script that everyone uses, such
199 as `/etc/bashrc', where you could add lines similar to these:
201 # Setup for the GNUstep environment
202 . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
204 This will source in the GNUstep.sh file and set the environment
205 variables; thus making them available for all users. Before executing
206 this script, you can setup a default path for scripts in the makefiles
207 package to use for searching for tools and apps by defining the
208 variable GNUSTEP_PATHLIST (and exporting it). By default, it's set to
210 $GNUSTEP_USER_ROOT:$GNUSTEP_LOCAL_ROOT:$GNUSTEP_SYSTEM_ROOT
212 which might look something like this:
214 ~/GNUstep:/usr/GNUstep/Local:/usr/GNUstep/System
218 NB. This path is NOT used by GNUstep tools and applications
219 themselves ... they use a standard function
220 NSSearchPathForDirectoriesInDomains() to locate files instead.
222 Setting up the GNUstep environment for a single user
223 ----------------------------------------------------
225 The GNUstep environment and thus usage of the makefile package is based
226 almost solely upon the GNUSTEP_SYSTEM_ROOT environment variable. So
227 essentially the setup involved is to make sure that the variable is
228 defined for the user. The GNUstep.sh file within the makefile package
229 contains all of the environment variable settings required, so you want
230 to call that shell when the user logs in to the system. Most shells
231 have some file that you read upon login, for example the BASH shell
232 reads the .bash_profile file in the user's home directory. So you can
233 add the following lines to that file:
235 # Setup for the GNUstep environment
236 if [ -f $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh ]; then
237 . $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
240 This will source in the GNUstep.sh file and set the environment
241 variables; thus making them available for the user.
243 The GNUstep.sh file will set up GNUSTEP_USER_ROOT to the GNUstep
244 subdirectory of the users home directory by default. This may be
245 overridden by a user providing a .GNUsteprc file in their home
246 directory. It may be overridden on a system-wide basis by supplying a
247 .GNUsteprc file in the GNUSTEP_SYSTEM_ROOT directory.
249 # Set up to store GNUstep files directly in my home directory