summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in4
-rw-r--r--template/fake.rb.in4
2 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 1e32b7db9c..005a2e30b0 100644
--- a/configure.in
+++ b/configure.in
@@ -84,6 +84,10 @@ done
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(TEENY)
+RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h`
+AC_SUBST(RUBY_PROGRAM_VERSION)
+RUBY_RELEASE_DATE=`sed -n 's/^#define RUBY_RELEASE_DATE "\(.*\)"/\1/p' $srcdir/version.h`
+AC_SUBST(RUBY_RELEASE_DATE)
if test "$MAJOR" = "1"; then
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
fi
diff --git a/template/fake.rb.in b/template/fake.rb.in
index ed9416a16f..e8eba09289 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -4,8 +4,8 @@ class Object
remove_const :RUBY_VERSION
remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
RUBY_PLATFORM = "@arch@"
- RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"
- RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{Time.now.strftime("%Y-%m-%d")}) [#{RUBY_PLATFORM}]"
+ RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
+ RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
end
if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
class File