Configuring Crosser.sh & libstack.sh
=====================================

Both libstack.sh and crosser.sh can be configured with file named
local_setup.conf in main crosser directory (same directory
where libstack.sh and crosser.sh scripts are) or .crosser.conf under home
directory. First they look for local_setup.conf, and if it's missing
load ~/.crosser.conf instead.

This file lists some of the variables one can place to local_setup.conf

Entries are of form:
VARIABLE=VALUE

=======================================================================

AUTOWINE
 ; If this has value "yes", libstack.sh uses wine to run some
 ; gtk+ configuration programs. Do not define this if wine is not available
 ; and automatically usable.
 ; These configuration programs must be run when doing actual install to
 ; Windows machine.

PREFIX
 ; Directory hierarchy where generated environment will be installed.
 ; For libstack this can be overridden by LSPREFIX. 
 ; This directory will be completely removed in the beginning of build.
 ; This path is parsed:
 ;   - <TARGET>     -> Target architecture
 ;   - <DATE>       -> Build start date. Note that build may take long time and
 ;                     often start date is not same as current date of some build
 ;                     action.
 ;   - <CLIB>       -> libc to use
 ;   - <VERSION>    -> crosser version
 ;   - <VERSIONSET> -> Versionset used 
 ; Either enclose value inside quotes or escape tags like \<TARGET\>
 ; Default is:
 ;   crosser.sh, cross-compiling environment: $HOME/.crosser/<VERSION>/<TARGET>-<CLIB>
 ;   crosser.sh, native chain:                $HOME/.crosser/<VERSION>/native

NATIVE_PREFIX
 ; Directory hierarchy where native environment generated in native-step
 ; will be installed. This affects only crosser.sh, not libtstack.sh at all.
 ; Path parsing is similar to that of PREFIX.
 ; Default is $HOME/.crosser/<VERSION>/host

LSPREFIX
 ; Directory hierarchy where generated libstack environment will be installed.
 ; Default is PREFIX, if it's set. Otherwise $HOME/.crosser/<VERSION>/winstack
 ;
 ; In future versions of crosser, PREFIX will not be the default even if it's set.

LSHOST_PREFIX
 ; Directory hierarchy where native environment generated by libstack.sh
 ; will be installed.
 ; Path parsing is similar to that of PREFIX.
 ; Default is $HOME/.crosser/<VERSION>/lshost

LOGLEVEL_STDOUT
LOGLEVEL_STDERR
 ; Level of logging to screen and to file. Values can be from
 ; 1 (Fatal errors only) to 5 (debug logging).
 ; Defaults are 2 for screen and 4 for file.

FORCERM
 ; If this is set to 'yes', scripts will not provide confirmation prompts
 ; when deleting old directories. It's recommended that this is never
 ; used in local_setup.conf and set as environment variable before running 
 ; script only when setup has been already tested and one really knows
 ; that nothing important will be destroyed.

MAINSRCDIR
 ; Directory hierarchy where sources will be unpacked.
 ; Default is tmp/src under crosser main dir.

MAINBUILDDIR
 ; Directory hierarchy where binaries will be built
 ; Default is tmp/build under crosser main dir.

LOGDIR
 ; Directory where logfiles will be written.
 ; Default is $HOME/.crosser/log
 ; Logfiles stdout.log and stderr are created anew for each build,
 ; main.log is rotated once it reaches 150000 bytes.

PACKETDIR
 ; Directory for storing source packets.
 ; Default is $HOME/.crosser/packets

CROSSER_DOWNLOAD
 ; This defines packet download model. Packets are ever downloaded only
 ; if they are missing, but time their existence is checked depends on
 ; this setting. Actual implementation is not yet too sophisticated.
 ; Even with "on demand" setting quite a lot of stuff is downloaded
 ; in the beginning. Default is "demand".
 ;   "yes"           - crosser.sh / libstack.sh download all required
 ;                     packets in the beginning.
 ;   "demand"        - On demand; download just when packet is really
 ;                     needed. This setting has advantage that not time
 ;                     and resources are wasted to downloading if
 ;                     compilation of some earlier component fails.
 ;   any other value - Assume that packets are already downloaded.
 ;                     Fail if not.
 ; Options other than "demand" have advantage that time is not wasted
 ; on compiling earlier packets in case some packet cannot be downloaded.

CROSSER_CCACHE
 ; Path to directory containing links to ccache. If this varaible is set,
 ; crosser will always put that directory first in its PATH so ccache
 ; will be used. Crosser will not use user's normal ccache dir, but
 ; will create new one depending on what step is being built. This avoids
 ; trashing user's main cache by possibly results specific to certain
 ; crosser build, which may be very temporary.
 ; Example setup of ccache path directory:
 ;   > mkdir /usr/local/ccache
 ;   > cd /usr/local/ccache
 ;   > ln -s /usr/bin/ccache gcc
 ;   > ln -s /usr/bin/ccache g++
 ;   > ln -s /usr/bin/ccache cc
 ;   > ln -s /usr/bin/ccache i586-mingw32msvc-gcc
 ;   > ln -s /usr/bin/ccache i586-mingw32msvc-g++
 ;   > ln -s /usr/bin/ccache i586-mingw32msvc-cc
 ;   > ln -s /usr/bin/ccache x86_64-linux-gnu-gcc
 ;   > ln -s /usr/bin/ccache x86_64-linux-gnu-g++
 ;   > ln -s /usr/bin/ccache x86_64-linux-gnu-gcc
 ;   > ln -s /usr/bin/ccache i386-linux-gnu-gcc
 ;   > ln -s /usr/bin/ccache i386-linux-gnu-g++
 ;   > ln -s /usr/bin/ccache i386-linux-gnu-gcc
 ;   > ln -s /usr/bin/ccache arm-linux-gnu-gcc
 ;   > ln -s /usr/bin/ccache arm-linux-gnu-g++
 ;   > ln -s /usr/bin/ccache arm-linux-gnu-gcc
 ;   > export CROSSER_CCACHE="/usr/local/ccache"

DEBUG_CROSSER
 ; If set to 'yes', support for logging crosser internal errors and
 ; generating reports about crosser behavior is enabled. This is usefull
 ; only when developing crosser itself.

=======================================================================

local_setup.conf is actually shell script fragment. Here are some things
one may want to do in it in addition to setting variables.

renice 15 $$
 ; Crosser build takes very long time. If you want to do something
 ; else with the computer meanwhile, you may want to make crosser low
 ; priority. That makes other tasks to run faster and crosser to use just
 ; those CPU cycles left over. Above command makes current script
 ; (crosser.sh itself) to run at nice level 15.
