1 dnl $Id: krb-version.m4,v 1.1 1997/12/14 15:59:03 joda Exp $
4 dnl output a C header-file with some version strings
6 AC_DEFUN(AC_KRB_VERSION,[
7 dnl AC_OUTPUT_COMMANDS([
8 cat > include/newversion.h.in <<FOOBAR
9 char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
10 char *${PACKAGE}_version = "$PACKAGE-$VERSION";
13 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
14 echo "include/version.h is unchanged"
15 rm -f include/newversion.h.in
17 echo "creating include/version.h"
18 User=${USER-${LOGNAME}}
19 Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
21 mv -f include/newversion.h.in include/version.h.in
22 sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
24 dnl ],host=$host PACKAGE=$PACKAGE VERSION=$VERSION)