#! /bin/echo Autogen_Version_4.4,_but_it_should_be_sourced
# -*- Mode: Ksh -*-
# ----------------------------------------------------------------------
# VERSION --- Set version info for GNU-ish tool use
#
# Copyright (C) 1998 Bruce Korb
#
# Last Modified:     Tue Nov 24 07:48:33 1998
# 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=".2"
AG_VERSION=$AG_REVISION$AG_PATCHLEVEL

# Library versioning for libopts
#
AG_INTERFACE_AGE=2
AG_BINARY_AGE=3

# Making releases:
#   AG_PATCHLEVEL=""
#   AG_MINOR_VERSION += 1 (OR AG_MINOR_VERSION = 0 && AG_MAJOR_VERSION += 1)
#   AG_INTERFACE_AGE += 1
#   AG_BINARY_AGE += 1
# if any functions have been added, set AG_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set AG_BINARY_AGE and AG_INTERFACE_AGE to 0.
#

# libtool versioning
#
LT_LIBRARY=libopts.la
LT_RELEASE=$AG_MAJOR_VERSION.$AG_MINOR_VERSION

LT_CURRENT=`expr $AG_MINOR_VERSION - $AG_INTERFACE_AGE`
LT_AGE=`expr $AG_BINARY_AGE - $AG_INTERFACE_AGE`
LT_REVISION=$AG_INTERFACE_AGE

MAINTAINER='Bruce Korb <korb@datadesign.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 ')' + $LT_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=$LT_LIBRARY.`expr $LT_CURRENT - $LT_AGE`.$LT_AGE.$LT_REVISION
spaces="                                "
while :
do
  string="$PACKAGE-$VERSION$spaces$soname"
  if echo "$string" | grep -q '^.\{78,\}$'; then
    break
  fi
  spaces=" $spaces"
done

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


                 A      U      T      O      G      E      N
_EOF_

cat << _EOF_

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

# VERSION ends here
