/*! @page g4setupc Geant4 Installation
Previous: @ref ssg4setup Up: @ref g4setup Next: @ref lemusetup

@section ssg4setup2 Geant4 Compilation \anchor g4safe

Safest way:

The safest way is to execute the automatic installation by using the configure shell script. One should go to the geant4.version/ directory and first build the libraries. Type
./Configure -build
and follow the instructions. Each question must be answered very carefully in order to get a good configurationtip. Before going any further, make sure that the @ref clheplibs "CLHEP environment variables" are properly set. Remember that the values of the library directory and name can be obtained by entering ./clheplib in CLHEP/bin. The environment variables for the visualization drivers shall also be set at this point. Finally, it is recommended to run the script geant4.version/.config/bin/Linux-g++/env.sh as a confirmation (it should have been ran automatically after the configuration script of the previous command). Then execute
./Configure -install
And compile the source code
cd geant4.version/source
gmake
The \gf code is now ready to use and one can compile an example to check that it runs correctly. It is usefull to launch the \gf environment variables script geant4.version/.config/bin/Linux-g++/env.sh via the SetEnv.sh script. \anchor g4manual

Manual way:

First, some environement variables must be set (for example):
export G4INSTALL=/home/user/geant4.version   
export G4SYSTEM=Linux-g++ (for example)
export CLHEP\_BASE\_DIR=/home/user/CLHEP
Then the other variables should be set executing the $G4INSTALL/Configure file.

Changes of the configuration can be done directly, editing the config.sh file which is located in the $G4INSTALL/.config/bin/Linux-g++ directory. After modification, this executed in order to prepare the compilation. \anchor g4compile

Compile Geant4:

The compilation is launched by the command $G4INSTALL/source/gmake. */