+#
+# Split the version number into components.
+# These definitions are used in the win32 resource file, src/yoink.rc.
+#
+
+VERSION_MAJOR=$(echo $VERSION | cut -d. -f1)
+VERSION_MINOR=$(echo $VERSION | cut -d. -f2)
+VERSION_REVISION=$(echo $VERSION | cut -d. -f3)
+
+AC_DEFINE_UNQUOTED([VERSION_MAJOR], [${VERSION_MAJOR:-0}],
+ [Define to major version number component.])
+
+AC_DEFINE_UNQUOTED([VERSION_MINOR], [${VERSION_MINOR:-0}],
+ [Define to minor version number component.])
+
+AC_DEFINE_UNQUOTED([VERSION_REVISION], [${VERSION_REVISION:-0}],
+ [Define to revision version number component.])
+
+PVERSION="${VERSION_MAJOR:-0}.${VERSION_MINOR:-0}.${VERSION_REVISION:-0}.0"
+AC_SUBST([PVERSION])
+
+if githead=$(git log -n1 --date=short --pretty=format:"%h (%ad)")
+then
+ AC_DEFINE_UNQUOTED([YOINK_GITHEAD], ["$githead"],
+ [Define to the git commit currently checked out.])
+fi
+
+