Home | History | Annotate | Line # | Download | only in cf
krb-version.m4 revision 1.1.1.2
      1  1.1.1.2  elric dnl Id
      2      1.1  elric dnl
      3      1.1  elric dnl
      4      1.1  elric dnl output a C header-file with some version strings
      5      1.1  elric dnl
      6      1.1  elric 
      7      1.1  elric AC_DEFUN([AC_KRB_VERSION],[
      8      1.1  elric cat > include/newversion.h.in <<FOOBAR
      9      1.1  elric const char *${PACKAGE_TARNAME}_long_version = "@(#)\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
     10      1.1  elric const char *${PACKAGE_TARNAME}_version = "$PACKAGE_STRING";
     11      1.1  elric FOOBAR
     12      1.1  elric 
     13      1.1  elric if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
     14      1.1  elric 	echo "include/version.h is unchanged"
     15      1.1  elric 	rm -f include/newversion.h.in
     16      1.1  elric else
     17      1.1  elric  	echo "creating include/version.h"
     18      1.1  elric  	User=${USER-${LOGNAME}}
     19      1.1  elric  	Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
     20      1.1  elric  	Date=`date`
     21      1.1  elric 	mv -f include/newversion.h.in include/version.h.in
     22      1.1  elric 	sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
     23      1.1  elric fi
     24      1.1  elric ])
     25