* Get SVN_VERSION properly.

* Add BUILD_DATE

Originally committed to SVN as r2578.
This commit is contained in:
Amar Takhar 2008-12-31 05:07:58 +00:00
parent 6d6e68ad5c
commit c03b3f4069
1 changed files with 23 additions and 4 deletions

View File

@ -36,6 +36,7 @@ AC_CONFIG_HEADER([aegisub/posix/acconf.h])
AC_GNU_SOURCE
AC_CANONICAL_HOST
###########################
# Check target architecture
###########################
@ -119,12 +120,30 @@ fi
AC_ARG_ENABLE(build-dist)
if test "$enable_build_dist" = "yes"; then
SVN_VERSION=`svnversion .`
PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_VERSION"
PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_VERSION"
VERSION="${VERSION}-r$SVN_VERSION"
`svnversion > $srcdir/svn_version`
fi
AC_MSG_CHECKING([for svn version])
if test -d "$srcdir/.svn"; then
SVN_VERSION=`svnversion $srcdir`
AC_MSG_RESULT([$SVN_VERSION from "svnversion $srcdir"])
elif test -f "$srcdir/svn_version"; then
SVN_VERSION=`cat $srcdir/svn_version`
AC_MSG_RESULT([$SVN_VERSION from "$srcdir/svn_version"])
else
SVN_VERSION="_unknown"
AC_MSG_RESULT([not found])
fi
PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_VERSION"
PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_VERSION"
VERSION="${VERSION}-r$SVN_VERSION"
AC_MSG_CHECKING([for build date])
BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"`
AC_MSG_RESULT($BUILD_DATE)
###################################################
# Check for pthreads and setup variables / compiler