diff options
Diffstat (limited to 'src/configure')
-rwxr-xr-x | src/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/configure b/src/configure index 1f5f024..2c6d8ea 100755 --- a/src/configure +++ b/src/configure @@ -245,4 +245,33 @@ else echo "not installing example files" fi +VERSION=`cat ../version` +if which svn >/dev/null; then + SVN_REV=`svn info | grep "^Revision: " | awk '{print($2)}'` + if [ -n "$SVN_REV" ]; then + VERSION="$VERSION (svn$SVN_REV)" + fi +fi +HOSTNAME=`hostname` +DATE=`date +"%d.%m.%Y %H:%M:%S %Z"` + +cat >> version.h <<EOF +/* + * anytun version info + * + * this file was created automatically + * do not edit this file directly + * use ./configure instead + */ + +#ifndef ANYTUN_version_h_INCLUDED +#define ANYTUN_version_h_INCLUDED + +#define VERSION_STRING_0 " version $VERSION" +#define VERSION_STRING_1 "built on $HOSTNAME, $DATE" + +#endif + +EOF + exit 0 |