# 3.4. Using TGZ to Install on Top of Other Systems

If your Linux distribution did not come with an RPM or DEB archive format, or you are not using Linux at all, you must compile KDE on your own. In the future, we are planning to provide a binary distribution which includes its own installation program.

In order to compile and install KDE properly, you need to have the following items installed on your hard disk:

- An ANSI-C compiler, e.g. the GNU C compiler.

- An ANSI-C++ compiler, e.g. GNU C++.

- The make utility.

- Qt development version 1.41 or higher.

- X11 development version (include files are often missing)

Once you have all the needed helper applications, go to your favorite KDE mirror and retrieve the following files from the directory /pub/kde/stable/(newest version):

- kdesupport-(version).tar.gz

- kdelibs-(version).tar.gz

- kdebase-(version).tar.gz

- any other packages you wish to install. We advise you to get at least kdeutils.

where (version) stands for the current version number. Once you have downloaded all you need, extract these files to /usr/src. This process should yield the following directory structure:

- /usr/src/kdesupport

- /usr/src/kdelibs

- /usr/src/kdebase

- /usr/src/... (any other packages)

Make sure you have write permissions to /opt/kde. Next you must compile and install the packages using the following:

1. cd into the directory of the package, you want to install (see above)

2. ./configure (with the options you want to apply)

3. make

4. make install

Apply the above steps to every package you want to install. (Note: These instructions can be used for almost every source package available.)

Every configure script has several options available. Some are common between the packages while others are specific to an individual package. The following is the result of `configure` --help in kdebase:

       1   --enable-debug          creates debugging code [default=no]
       2   --disable-nls           do not use Native Language Support
       3   --with-qt-dir           where the root of qt is installed
       4   --with-qt-includes      where the qt includes are.
       5   --with-qt-libraries     where the qt library is installed.
       6   --with-extra-includes   adds non standard include paths
       7   --with-extra-libs       adds non standard library paths
       8   --disable-path-check    don't try to find out where to install
       9   --with-install-root     the root, where to install to [default=/]
      10   --disable-rpath         do not use the rpath feature of ld
      11   --with-xdmdir           if the xdm config dir can't be found automatically
      12   --without-pam           disable Pluggable Authentication Modules
      13   --with-shadow           if you want shadow password support
      14   --without-gl            disable 3D GL modes
      15   --without-xpm           disable color pixmap XPM tests

Several options are not required and are only useful as work arounds for known problems (e.g. --disable-path-check). Since some are important options, for instance --with-shadow, you should always check the available options.

An important option is --prefix. This option specifies the path where configure should install (for kdesupport and kdelibs) or where to look for libraries (for the other packages). By default, configure will look in /usr/local/kde. If you want to install KDE into /opt/kde, you have to use `configure` --prefix /opt/kde.

If you have installed the Qt libraries in an uncommon place, for instance in $HOME/src/qt, you must use `configure` --with-qt-dir=$HOME/src/qt. By default configure looks in the most common places for QT before it gives up.

If you have problems that you are not able to solve, send a copy of the file config.log to the address in the README file in the offending package.

You must install KDE in the following order: kdesupport, kdelibs, then the application packages (for example kdebase). All the application packages should only depend on kdelibs, so you can compile them at the same time (if you have a powerful machine).

If you want to take advantage of multiprocessor systems, try `make` -j<Number of processors> instead of `make`.

If you are able to install KDE on a UNIX flavor for which KDE has not yet been successfully installed, please send me an email describing what you did. It will then be included in this document.

## 3.4.1. Platform Specific Building Notes

### 3.4.1.1. Linux

For Linux, most of the utilities needed to build KDE can be found either at ftp://sunsite.unc.edu/pub/Linux/GCC or ftp://sunsite.unc.edu/pub/GNU. The Qt libraries can be found at ftp://ftp.troll.no/pub/qt/linux, available in source or RPM format for Linux. Both contain detailed instruction on how to install them. Include files for X11 programs should be available at ftp://ftp.xfree86.org in the xdevel section.

If you want to start your system in runlevel 3 using kdm, you need to replace the xdm call in /etc/rc.d/xdm with /opt/kde/bin/kdm. In any case, here is a version that should work:

     #! /bin/sh
     # Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany.  All rights reserved.
     #
     # Author: Florian La Roche <florian@suse.de>, 1996
     #	  Werner Fink <werner@suse.de>, 1996
     #
     # Modified on October, 13th by
     #	Andreas Buschka <andi@bonn-online.com>, 1997
     # for the KDE documentation project.
     #
     # /sbin/init.d/xdm
     #

     . /etc/rc.config

     case "$1" in
         start)
     	echo "Starting kdm."
     	/opt/kde/bin/kdm
     	;;
         stop)
     	echo -n "Shutting down kdm:"
     	killproc -TERM /opt/kde/bin/kdm
     	echo
     	;;
         *)
     	echo "Usage: $0 {start|stop}"
     	exit 1
     esac

     exit 0

You also need to change the default runlevel in /etc/inittab to 3 in order to start kdm when the system comes up.

Do not forget to re-login in order to let the system read your new configuration settings!