#! /bin/echo AutoGen_Version_4.5,_but_this_should_be_sourced
# -*- Mode: Ksh -*-
# ----------------------------------------------------------------------
# VERSION --- Set version info for GNU-ish tool use
#
# Copyright (C) 1999 Bruce Korb
#
# Last Modified:     Tue Sep 28 07:01:05 1999				      
# Author:            Bruce Korb <korb@datadesign.com>
# Maintainer:        Bruce Korb <korb@datadesign.com>
# by:                Bruce Korb <korb@datadesign.com>			      
# ----------------------------------------------------------------------

AG_MAJOR_VERSION=4
AG_MINOR_VERSION=5
AG_REVISION=$AG_MAJOR_VERSION.$AG_MINOR_VERSION
AG_PATCHLEVEL=".10"
AG_VERSION=$AG_REVISION$AG_PATCHLEVEL

# Making releases:
#   AG_PATCHLEVEL=""
#   AG_MINOR_VERSION += 1 (OR AG_MINOR_VERSION = 0 && AG_MAJOR_VERSION += 1)
#
# If the autoopts sources have changed
#   AO_REVISION += 1
# if any autoopts API interfaces have been added, removed or changed
#   AO_REVISION =0
#   AO_CURRENT += 1
# additionally, if API interfaces have been added
#   AO_AGE += 1
# or if any API interfaces have been removed
#   AO_AGE = 0

# autoopts version
#
AO_LIBRARY=libopts.la
AO_RELEASE=$AG_MAJOR_VERSION.$AG_MINOR_VERSION

AO_CURRENT=5
AO_REVISION=1
AO_AGE=2

MAINTAINER='Bruce Korb <autogen@linuxbox.com>'

# For automake
#
VERSION=$AG_VERSION
PACKAGE=autogen

#  Validate struct marker in autoopts/options.h
#
if [ -n "$srcdir" ] ; then
  hdr=`egrep OPTIONS_STRUCT_VERSION $srcdir/autoopts/options.h |
       sed 's/.*OPTIONS_STRUCT_VERSION *//'`
  lib=`expr '(' $AG_MAJOR_VERSION '*' 4096 ')' + $AO_CURRENT`
  if [ $hdr -ne $lib ] ; then
    echo autoopts/options.h out of sync with version.
    echo OPTIONS_STRUCT_VERSION is $hdr, should be $lib
    exit 1
  fi
fi

# Display version numbers banner for my sanity!
#
soname=$AO_LIBRARY.`expr $AO_CURRENT - $AO_AGE`.$AO_AGE.$AO_REVISION
spaces="                                        "
while :
do
  string="$PACKAGE-$VERSION$spaces$soname"
  if echo "$string" | grep '^.\{78,\}$' > /dev/null; then
    break
  fi
  spaces=" $spaces"
done

cat << _EOF_
------------------------------------------------------------------------------


                 A      U      T      O      G      E      N

$string
------------------------------------------------------------------------------
_EOF_

# VERSION ends here
