#!/bin/sh
# @function install boost
function InstallBoost()
{
    ShowResult "[green]正在安装Boost库... [/green]" 1
    
    # install
    # clear first
    if [ -d ${_PATH_COMPILATION_}/boost* ]
    then
        eval find ${_PATH_COMPILATION_}/boost* | xargs -n 50 rm -rf ${_SYS_SHOW_INSTALL_DETAILS_}
    fi
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/boost* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd boost* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./bootstrap.sh ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./bjam install \
    --toolset=gcc \
    --without-mpi \
    --without-graph \
    --without-graph_parallel \
    --without-test \
    --without-wave \
    --without-python \
    ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}


function InstallBoost163()
{
    ShowResult "[green]正在安装Boost库... [/green]" 1
    
    # install
    # clear first
    if [ -d ${_PATH_COMPILATION_}/boost* ]
    then
        eval find ${_PATH_COMPILATION_}/boost* | xargs -n 50 rm -rf ${_SYS_SHOW_INSTALL_DETAILS_}
    fi
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/boost* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd boost* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./bootstrap.sh ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./bjam install
    ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}

# @function unzip libboost
function InstallBoostLib()
{
    ShowResult "[green]正在解压Boost库... [/green]" 1
    
    cd /usr/local/lib/
    eval tar zxvf ${_PATH_SOFTWARE_}/libboost*.tar.gz ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}