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