| 1 |
# |
| 2 |
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
| 3 |
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK. |
| 4 |
# |
| 5 |
# Permission is hereby granted to use or copy this program |
| 6 |
# for any purpose, provided the above notices are retained on all copies. |
| 7 |
# Permission to modify the code and to distribute modified code is granted, |
| 8 |
# provided the above notices are retained, and a notice that the code was |
| 9 |
# modified is included with the above copyright notice. |
| 10 |
|
| 11 |
# GC_SET_VERSION |
| 12 |
# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_VERSION_MICRO |
| 13 |
# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to |
| 14 |
# [0-9]+[.][0-9]+[.][0-9]+ |
| 15 |
# |
| 16 |
AC_DEFUN([GC_SET_VERSION], [ |
| 17 |
AC_MSG_CHECKING(GC version numbers) |
| 18 |
GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'` |
| 19 |
GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'` |
| 20 |
GC_VERSION_MICRO=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[^.]]*[[.]]\([[0-9]][[0-9]]*\)$/\1/g'` |
| 21 |
|
| 22 |
if test :$GC_VERSION_MAJOR: = :: \ |
| 23 |
-o :$GC_VERSION_MINOR: = :: \ |
| 24 |
-o :$GC_VERSION_MICRO: = :: ; |
| 25 |
then |
| 26 |
AC_MSG_RESULT(invalid) |
| 27 |
AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION']) |
| 28 |
fi |
| 29 |
|
| 30 |
AC_DEFINE_UNQUOTED([GC_VERSION_MAJOR], $GC_VERSION_MAJOR, |
| 31 |
[The major version number of this GC release.]) |
| 32 |
AC_DEFINE_UNQUOTED([GC_VERSION_MINOR], $GC_VERSION_MINOR, |
| 33 |
[The minor version number of this GC release.]) |
| 34 |
AC_DEFINE_UNQUOTED([GC_VERSION_MICRO], $GC_VERSION_MICRO, |
| 35 |
[The micro version number of this GC release.]) |
| 36 |
AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \ |
| 37 |
micro=$GC_VERSION_MICRO) |
| 38 |
]) |
| 39 |
|
| 40 |
sinclude(libtool.m4) |