krb-version.m4 revision 55682
1dnl $Id: krb-version.m4,v 1.1 1997/12/14 15:59:03 joda Exp $
2dnl
3dnl
4dnl output a C header-file with some version strings
5dnl
6AC_DEFUN(AC_KRB_VERSION,[
7dnl AC_OUTPUT_COMMANDS([
8cat > include/newversion.h.in <<FOOBAR
9char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
10char *${PACKAGE}_version = "$PACKAGE-$VERSION";
11FOOBAR
12
13if 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
16else
17 	echo "creating include/version.h"
18 	User=${USER-${LOGNAME}}
19 	Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
20 	Date=`date`
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
23fi
24dnl ],host=$host PACKAGE=$PACKAGE VERSION=$VERSION)
25])
26