tazwok view examples/config.site @ rev 545

Merge default.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Nov 26 12:55:25 2011 +0000 (2011-11-26)
parents 6b76b34dbe1b 44e24b12e9dd
children
line source
1 # This file contains default options passed to ./configure at compile time.
2 # Variables are set this way :
3 # { [ "$var" = NONE ] || [ ! "$var" ] ; } && var=
4 # This is because config.site overwrites options passed directly in
5 # configure, like ./configure --var=
6 #
7 # Here, we don't want to overwrite the default configuration : we want to
8 # setup configure with a default path only if nothing has been given
9 # on the configure command-line. This allow contributors to overwrite
10 # the default paths filled here by the recipes.
11 #
12 # Path to the config.site is given to configure using the environment
13 # variable CONFIG_SITE
14 # tazwok does that work before executing compile rules.
15 #
16 # If you want to use your own config.site, you can use :
17 # export CONFIG_SITE=path_to_my_config.site in header declarations of
18 # a receipt.
19 #
20 # It can be useful if you want to share a default configuration between
21 # some groups of packages like GNOME or KDE ones.
22 #
24 #Default pathes.
25 default_prefix=/usr
26 default_libdir=/usr/lib
27 default_datarootdir=$default_prefix/share
28 default_datadir=$default_datarootdir
29 default_localedir=$default_datarootdir/locale
30 default_infodir=$default_datarootdir/info
31 default_mandir=$default_datarootdir/man
32 default_sysconfigdir=/etc
33 default_localstatedir=/var
34 default_build="$BUILD_SYSTEM"
35 default_host="$HOST_SYSTEM"
38 # Some variable are prefixed by "${prefix}" instead of "${datarootdir}".
39 # For those cases we use "${datadir}" because the configure script
40 # generally doesn't know about "${datarootdir}" (too old).
41 if echo "$localedir" | grep -q \${prefix}; then
42 localedir=$( echo "$localedir" | sed 's/${prefix}/${datarootdir}/')
43 fi
44 if echo "$infodir" | grep -q \${prefix}; then
45 infodir=$( echo "$infodir" | sed 's/${prefix}/${datarootdir}/')
46 fi
47 if echo "$mandir" | grep -q \${prefix}; then
48 mandir=$( echo "$mandir" | sed 's/${prefix}/${datarootdir}/')
49 fi
51 # Use default values if one of these configure variables is not set.
52 { [ "$prefix" = NONE ] || [ ! "$prefix" ] ; } && prefix=$default_prefix
53 { [ "$libdir" = NONE ] || [ ! "$libdir" ] ; } && libdir=$default_libdir
54 { [ "$datarootdir" = NONE ] || [ ! "$datarootdir" ] ; } && datarootdir=$default_datarootdir
55 { [ "$datadir" = NONE ] || [ ! "$datadir" ] ; } && datadir=$default_datadir
56 { [ "$localedir" = NONE ] || [ ! "$localedir" ] ; } && localedir=$default_localedir
57 { [ "$infodir" = NONE ] || [ ! "$infodir" ] ; } && infodir=$default_infodir
58 { [ "$mandir" = NONE ] || [ ! "$mandir" ] ; } && mandir=$default_mandir
59 { [ "$sysconfigdir" = NONE ] || [ ! "$sysconfigdir" ] ; } && sysconfigdir=$default_sysconfigdir
60 { [ "$localstatedir" = NONE ] || [ ! "$localstatedir" ] ; } && localstatedir=$default_localstatedir
61 { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build
62 { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host
64 # Print information about those variables.
65 echo "prefix = $prefix
66 libdir = $libdir
67 datarootdir = $datarootdir
68 datadir = $datadir
69 localedir= $localedir
70 infodir = $infodir
71 mandir = $mandir
72 sysconfigdir = $sysconfigdir
73 localstatedir = $localstatedir
74 build = $build
75 host = $host
76 "
78 # /tmp/config.site is used by tazwok to check that the config.site
79 # script has been used.
80 touch /tmp/config.site