aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-11 00:50:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-11 00:50:51 +0000
commitc97c37a5cafb24566682a9d5c54605f42e332c0c (patch)
tree7f2ab376a68ff6e61e567ea047dccb10dbdea609 /configure.in
parent948c7689c9a5e85a975c8150ecc2bb403d1e8e3b (diff)
downloadruby-c97c37a5cafb24566682a9d5c54605f42e332c0c.tar.gz
configure.in: check API version
* configure.in: check if the API version number is consistent with the program version number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 750c8adb35..f3444201e6 100644
--- a/configure.in
+++ b/configure.in
@@ -224,6 +224,7 @@ fi
GNU_LD=$rb_cv_prog_gnu_ld
AC_SUBST(GNU_LD)])
+eval `sed -n 's/^#define RUBY_API_VERSION_\([A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)/API_\1=\2/p' $srcdir/include/ruby/version.h`
RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h`
MAJOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f1`
MINOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f2`
@@ -233,6 +234,9 @@ for v in MAJOR MINOR TEENY; do
AC_MSG_ERROR(could not determine $v number from version.h)
fi
done
+AS_IF([test "$MAJOR.$MINOR" != "$API_MAJOR.$API_MINOR"], [
+ AC_MSG_ERROR([API version $API_MAJOR.$API_MINOR differs from program version $MAJOR.$MINOR])
+])
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(TEENY)