#
# $Id: makl_checktmzone,v 1.1 2006/04/22 09:10:55 tat Exp $
#

##\brief Check if tm_zone is defined into "struct tm"
##
##  Define HAVE_TMZONE if tm_zone variable exists in "sturct tm" 
##  \e $1 determines whether the feature is optional or required.
##
##   \param $1 0:optional/1:required
##
makl_checktmzone ()
{
    [ -z `makl_get "__noconfig__"` ] || return

    makl_info "checking for tm_zone support"

    {
        ${ECHO} "
            #include <time.h>

            int main() {    
                struct tm tt;  
                tt.tm_zone = \"\"; 
                return 0;
        }"
    } | makl_compile_code 0

    if [ $? = 0 ]; then
        makl_set_var "HAVE_TMZONE"
        return 0
    else
        [ $1 = 0 ] || makl_err 1 "failed tm_zone check!"
        makl_unset_var "HAVE_TMZONE"
        makl_warn "failed check on optional tm_zone check"
        return 1
    fi
}

