scripts/build/arch/x86.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 17 23:06:02 2010 +0100 (2010-01-17)
changeset 1740 c57458bb354d
parent 964 0535f7bf1069
child 2759 d063b1ae8c1b
permissions -rw-r--r--
configure: do not require hg when configuring in an hg clone

When configuring in an hg clone, we need hg to compute the version string.
It can happen that users do not have Mercurial (eg. if they got a snapshot
rather that they did a full clone). In this case, we can still run, of
course, so simply fill the version string with a sufficiently explicit
value, that does not require hg. The date is a good candidate.
yann@383
     1
# Compute x86-specific values
yann@383
     2
yann@1635
     3
# This one really needs a little love! :-(
yann@383
     4
yann@964
     5
CT_DoArchTupleValues() {
yann@383
     6
yann@1635
     7
    # Override the architecture part of the tuple:
yann@1635
     8
    if [ "${CT_ARCH_64}" = "y" ]; then
yann@1635
     9
        CT_TARGET_ARCH=x86_64
yann@1635
    10
    else
yann@1635
    11
        arch="${CT_ARCH_ARCH}"
yann@1635
    12
        [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
yann@1635
    13
        case "${arch}" in
yann@1635
    14
            "")                           CT_TARGET_ARCH=i386;;
yann@1635
    15
            i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
yann@1635
    16
            winchip*)                     CT_TARGET_ARCH=i486;;
yann@1635
    17
            pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
yann@1635
    18
            pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
yann@1635
    19
            *)                            CT_TARGET_ARCH=i586;;
yann@1635
    20
        esac
yann@1635
    21
    fi
yann@383
    22
}