Imported Upstream version 3.2.2
[debian/gnuradio] / config / grc_grc.m4
1 dnl Copyright 2008, 2009 Free Software Foundation, Inc.
2 dnl
3 dnl This file is part of GNU Radio
4 dnl
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)
8 dnl any later version.
9 dnl
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.
14 dnl
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.
19
20 AC_DEFUN([GRC_GRC],[
21     GRC_ENABLE(grc)
22
23     GRC_CHECK_DEPENDENCY(grc, gr-wxgui)
24
25     AC_CHECK_PROG(XDG_UTILS, xdg-mime, true, false)
26     AM_CONDITIONAL(XDG_UTILS, $XDG_UTILS)
27
28     dnl ########################################
29     dnl # test python modules and versions
30     dnl ########################################
31     if test $passed = yes; then
32         PYTHON_CHECK_MODULE([sys],[Python >= 2.5],[],[passed=no],[sys.version.split()[[0]] >= "2.5"])
33         PYTHON_CHECK_MODULE([Cheetah],[Python Cheetah templates >= 2.0.0],[],[passed=no],[Cheetah.Version >= "2.0.0"])
34         PYTHON_CHECK_MODULE([lxml.etree],[Python lxml wrappers >= 2.0.0],[],[passed=no],[lxml.etree.LXML_VERSION >= (2, 0, 0, 0)])
35         PYTHON_CHECK_MODULE([gtk],[Python gtk wrappers >= 2.10.0],[],[passed=no],[gtk.pygtk_version >= (2, 10, 0)])
36     fi
37
38     dnl ########################################
39     dnl # platform dependency pythonw
40     dnl ########################################
41     dnl FIXME: move this test to Python config m4
42     if test `${PYTHON} -c "import sys; print sys.platform"` = 'darwin'; then
43         PYTHONW=pythonw
44     else
45         PYTHONW=python
46     fi
47     AC_SUBST(PYTHONW)
48
49     AC_CONFIG_FILES([ \
50         grc/Makefile \
51         grc/base/Makefile \
52         grc/blocks/Makefile \
53         grc/examples/Makefile \
54         grc/freedesktop/Makefile \
55         grc/grc_gnuradio/Makefile \
56         grc/gui/Makefile \
57         grc/python/Makefile \
58         grc/scripts/Makefile \
59     ])
60
61     GRC_BUILD_CONDITIONAL(grc)
62 ])