#######################################
## Do Not Edit
## san2(at)linuxchannel.net
########################################
##
## openssl.lib

openssl_install_preview() {
    if [ "$foundopenssl" != "0" ] ; then
        echo "${T_MD}[$i] ${OPENSSL_V}${T_ME} install to /usr/local/ssl"
        i=$(($i+1))
    fi
}

## Add 2001.04.01
##
check_openssl_version() {
        openssl_version="$1"
        require_openssl_sum="096" ## for php --with-openssl >= openssl-0.9.6
        compile_version=`echo $openssl_version | awk -F"-" '{print $2}' 2>/dev/null`
        compile_version_sum=`echo $compile_version | sed  's/[^0-9]//g' 2>/dev/null`
        if [ "$compile_version_sum" -ge "$require_openssl_sum" ] ; then
                phpincludeopenssl="1"
        fi
}

check_openssl_install() {
    if [ -d "/usr/local/ssl" ] ; then
        openssl_installed_case="1" ## compiled installed
        openssl_path="/usr/local/ssl"
        ## sorry !!! check_openssl_version T.T
    elif [ -s "/usr/bin/openssl" ] ; then
        openssl_installed_case="2" ## RPM installed
        openssl_path="SYSTEM"
    else
        openssl_installed_case="0" ## unknown installled (user level)
    fi
}