From c03b3f4069ee66192e775af624a27edd96cc3968 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Wed, 31 Dec 2008 05:07:58 +0000 Subject: [PATCH] * Get SVN_VERSION properly. * Add BUILD_DATE Originally committed to SVN as r2578. --- configure.in | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 91ddf03d8..8a070bbeb 100644 --- a/configure.in +++ b/configure.in @@ -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