Add comments noting things that need fixing.
[debian/gnuradio] / config / gr_subversion.m4
1 dnl
2 dnl Copyright 2007 Free Software Foundation, Inc.
3 dnl 
4 dnl This file is part of GNU Radio
5 dnl 
6 dnl GNU Radio is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 3, or (at your option)
9 dnl any later version.
10 dnl 
11 dnl GNU Radio is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 dnl GNU General Public License for more details.
15 dnl 
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with GNU Radio; see the file COPYING.  If not, write to
18 dnl the Free Software Foundation, Inc., 51 Franklin Street,
19 dnl Boston, MA 02110-1301, USA.
20 dnl 
21
22 # GR_SUBVERSION()
23 #
24 # Test for presence of subversion, and create variables for 
25 # current repository version and last changed date.
26 #
27 # TODO: Fix the following problems in this code:
28 #
29 # 1. Remove use of non-standard program which (3.0BSD, not specified
30 # by POSIX.
31 #
32 # 2. When operating on distribution tarballs (which do not have
33 # subversion metadata) on machines that have subversion, do not
34 # produce error message.
35
36 AC_DEFUN([GR_SUBVERSION],[
37         AC_CHECK_PROG([SVN],[svn],[`which svn`])
38         if ! test -z $SVN ; then
39             SVNVERSION=`$SVN info . | grep '^Revision' | cut -f 2- -d ' '`
40             SVNDATE=`$SVN info . | grep 'Last Changed Date' | cut -f 4-6 -d ' '`
41         fi
42
43         AC_SUBST(SVNVERSION)
44         AC_SUBST(SVNDATE)
45 ])