#!/bin/sh
# @function install lib-mcrypt liberary
function InstallLibMcrypt()
{
    ShowResult "[green]正在安装LibMcrypt... [/green]" 1
    
    # install
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval rm -rf ./libmcrypt* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/libmcrypt* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd libmcrypt* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./configure ${_SYS_SHOW_INSTALL_DETAILS_}
    eval make ${_SYS_MAKE_EXT_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval make install ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $? 1
    
    eval ldconfig ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd libltdl ${_SYS_SHOW_INSTALL_DETAILS_}
    eval ./configure --enable-ltdl-install ${_SYS_SHOW_INSTALL_DETAILS_}
    eval make ${_SYS_MAKE_EXT_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval make install ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
    
    [ ! -f /usr/bin/libmcrypt-config ] && ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
}