1 dnl Copyright 2009 Free Software Foundation, Inc.
3 dnl This file is part of GNU Radio
5 dnl GNU Radio is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3, or (at your option)
10 dnl GNU Radio is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with GNU Radio; see the file COPYING. If not, write to
17 dnl the Free Software Foundation, Inc., 51 Franklin Street,
18 dnl Boston, MA 02110-1301, USA.
20 AC_DEFUN([GR_VERSION],[
21 dnl Computed version based on version.sh
22 dnl Does not force recompile on rev change
24 dnl Source the variables describing the release version
26 dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
27 dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
28 dnl MINOR_VERSION Minor release version
29 dnl MAINT_VERSION Pure bugfix additions to make maintenance release
31 dnl The last two fields can have 'git' instead of a number to indicate
32 dnl that this branch is between versions.
34 RELEASE=$MAJOR_VERSION.$API_COMPAT
36 dnl Get git version if available
39 dnl Test if we should use git version
40 if test "$MINOR_VERSION" == "git"; then
41 dnl 3.3git-xxx-gxxxxxxxx
42 RELEASE=$RELEASE$MINOR_VERSION
43 if test "$GIT_VERSION" != "" ; then
44 RELEASE=$RELEASE-$GIT_VERSION
47 if test "$MAINT_VERSION" == "git" ; then
48 dnl 3.3.1git-xxx-gxxxxxxxx
49 RELEASE=$RELEASE.$MINOR_VERSION$MAINT_VERSION
50 if test "$GIT_VERSION" != "" ; then
51 RELEASE=$RELEASE-$GIT_VERSION
54 dnl This is a numbered reelase.
55 dnl Test if minor version is 0, which we don't encode, unless it is also
56 dnl a maintenance release
57 if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
59 RELEASE=$RELEASE.$MINOR_VERSION
60 if test "$MAINT_VERSION" != "0"; then
62 RELEASE=$RELEASE.$MAINT_VERSION
68 AC_MSG_NOTICE([GNU Radio Release $RELEASE])