+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
+/*
+ * uanytun version info
+ *
+ * this file was created automatically
+ * do not edit this file directly
+ * use ./configure instead
+ */
+
+#ifndef UANYTUN_version_h_INCLUDED
+#define UANYTUN_version_h_INCLUDED
+
+#define VERSION_STRING_0 "uanytun version $VERSION"
+#define VERSION_STRING_1 "built on $HOSTNAME, $DATE"
+
+#endif
+
+EOF
+