Changeset librcc,55

Show
Ignore:
Timestamp:
10/10/09 23:57:57 (1 month ago)
Author:
Suren A. Chilingaryan <csa@dside.dyndns.org>
branch-nick:
librcc
Message:

Automake version detection in autogen.sh

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • librcc/VERSION

    r52 r55  
    1 0.2.9CVS 
     10.2.9 
  • librcc/autogen.sh

    r53 r55  
    8282} 
    8383 
     84compare_versions() { 
     85    ch_min_version=$1 
     86    ch_actual_version=$2 
     87    ch_status=0 
     88    IFS="${IFS=         }"; ch_save_IFS="$IFS"; IFS="." 
     89    set $ch_actual_version 
     90    for ch_min in $ch_min_version; do 
     91        ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes 
     92        if [ -z "$ch_min" ]; then break; fi 
     93        if [ -z "$ch_cur" ]; then ch_status=1; break; fi 
     94        if [ $ch_cur -gt $ch_min ]; then break; fi 
     95        if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi 
     96    done 
     97    IFS="$ch_save_IFS" 
     98    return $ch_status 
     99} 
     100 
    84101REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} 
    85102FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} 
     
    111128    # but it contains only Automake's own macros, so we can ignore it. 
    112129 
     130    AUTOMAKE_VERSION=`$AUTOMAKE --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//'` 
    113131    # Read the dirlist file, supported by Automake >= 1.7. 
    114132    if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then