@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 @include version.texi @ifset INSTALL_ONLY This file documents the installation of the GNUstep Base Library, @samp{libgnustep-base}. Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. You may copy, distribute, and modify it freely as long as you preserve this copyright notice and permission notice. @chapter Installing @samp{libgnustep-base} @end ifset Most of the information below is also included in the general GNUstep installation instruction GNUstep-HOWTO located at the same ftp sites as this library, notable @file{ftp://ftp.gnustep.org/pub/gnustep}. To compile and install @samp{libgnustep-base}: @enumerate @item Get and compile GNU make, if you don't already have GNU make. @example cd /usr/src tar fvxz make-XXX.tar.gz cd make-XXX ./configure make su root make install @end example @item Decide where you want the GNUstep files to go, and use this as an argument to configure in the makefile package. If you don't choose a location, the default is /usr/GNUstep. The example below shows how to configure the packages for installation in /usr/local/GNUstep. @example tar fvxz gstep-make-XXXXXX.tar.gz cd gstep-make-XXXXXX ./configure --prefix=/usr/local/GNUstep su root make install @end example After this you should add the shell script GNUstep.sh in the makefile package to you initialization file (such as .profile). For instance: @example . /usr/local/GNUstep/Makefiles/GNUstep.sh @end example in your .profile file will work. It defines environment variables that are needed to find GNUstep files and executables. Users of csh neet to change the GNUstep.sh script so it will work with csh. Read the README for more info. GNUstep packages will automatically install in this directory structure. You can install other packages (such as gcc) in the same structure if you specify the GNUstep system root as the prefix when you configure the package. @example ./configure --prefix=$GNUSTEP_SYSTEM_ROOT @end example @item For Linux/GNU systems on Intel x86 processors, the PCThreads library is known to work with GNUstep. PCThreads version 1.1.0 is an enhanced version of PCThread 1.0.0 with better support for GNUstep. @example cd /usr/src tar fvxz pcthreads-1.1.0.tar.gz cd pcthreads-1.1.0 ./configure make su root make install @end example If you are using the GNUstep makefile package and wish PCThreads to be installed with the GNUstep directory structure; then you should specify the GNUstep system root as the prefix when you configure the package. @example ./configure --prefix=$GNUSTEP_SYSTEM_ROOT @end example @item The following commands assume that all the aforementioned files have been copied to the /usr/src directory on your machine. @example 1. Uncompress gcc: cd /usr/src tar fvxz gcc-2.7.2.1.tar.gz 2. Apply the Objective-C runtime patch. Go inside the GCC directory and issue the command (Make sure you have the correct patch for the version of gcc): cd gcc-2.7.2.1 cat gcc-2.7.2.1-objc.diff | patch -p1 3. Configure the gcc compiler's makefile for your machine: ./configure If you are using the GNUstep makefile package and wish gcc to be installed with the GNUstep directory structure; then you should specify the GNUstep system root as the prefix when you configure the package. ./configure --prefix=$GNUSTEP_SYSTEM_ROOT 4. Compile gcc 4.1 With a single-threaded Objective-C runtime: make OBJC_THREAD_FILE=thr-single or 4.2 With thread support appropriate for your system make or 4.3 With PCThreads support (Linux/GNU) make OBJC_THREAD_FILE=thr-pthreads 5. Wait If you have a Pentium Pro, go drink a coffee. If you have a fast Pentium, count from 0 to 100 in your head. If you have a slow Pentium, go eat a bagel. If you have a 486, go watch the news. If you have a 386, come back tomorrow. 6. Install gcc su root make install 7. Delete the gcc directory if you're low on disk space rm -rf /usr/src/gcc-2.7.2.1 @end example @item Then configure and make libgnustep-base: @example ./configure make make install @end example @item If you want to compile the self-tests, cd to @samp{checks} and type @samp{make}. If you want to compile the examples, cd to @samp{examples} and type @samp{make}. @item Type @samp{make install} to install programs, data files, and documentation. @item You can remove the program binaries and object files from the source directory by typing @samp{make clean}. To also remove the Makefile(s), and @samp{config.status} (all the files that @samp{configure} created), type @samp{make distclean}. The file @samp{configure.in} is used as a template to create @samp{configure} by a program called @samp{autoconf}. You will only need it if you want to regenerate @samp{configure} using a newer version of @samp{autoconf}. @end enumerate Notes: If you are running GNU/Linux and have an older version of libc, then the Objective C runtime will not work unless you pass @samp{-lieee} to the linker.