dnl QaoS config script for autoconf >=2.5.
dnl -------------------------------------------------------------------------
dnl Autoconf startup.

AC_PREREQ(2.59)dnl
AC_INIT()dnl

dnl -------------------------------------------------------------------------
dnl Local copyright notices.

AC_COPYRIGHT(
[#### Configuration script for QaoS.
#### Copyright (C) 2005 Sebastian Freundt

### Don't edit this script!
### This script was automatically generated by the `autoconf' program
### from the file `./configure.ac'.
### To rebuild it, execute the command
###	autoconf
])

dnl Do our best to deal with automounter brokenness
dnl CANONICALIZE_PATH(varname)
define([CANONICALIZE_PATH],
[if test -d "/net"; then
  if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
  $1=`echo "[$]$1" | \
   sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
fi])dnl

dnl Make srcdir absolute, if not already.  It is important to
dnl avoid running the path through pwd unnecessary, since pwd can
dnl give you automounter prefixes, which can go away.
SRCDIR="`pwd`"; CANONICALIZE_PATH(SRCDIR)


dnl ----------------------------------------------
dnl Substitute into PackageInfo.g
dnl ----------------------------------------------

ARCH_VERSION=`tla versions | tail -n1`
REVISION=`tla logs | tail -n1`
REVISION_DATE=`tla logs -D | tail -n1`
CATBRAVERREV="$ARCH_VERSION--$REVISION"
SHORTCBV=`echo $ARCH_VERSION | sed -e "s/^[[^-]]*--//" -e "s/--/-/g"`
SHORTCBVR=$SHORTCBV.`echo $REVISION | sed -e "s/patch-//"`
PKG=qaos

VERSION=$SHORTCBVR
VERSION_DATE=`echo $REVISION_DATE | sed -e "s/^[[^0-9]]*\([[0-9]]*\)-\([[0-9]]*\)-\([[0-9]]*\).*/\3\/\2\/\1/"`

AC_SUBST(PKG)
AC_SUBST(VERSION)
AC_SUBST(VERSION_DATE)

AC_OUTPUT(PackageInfo.g)dnl

