Merged r9481:9518 on jblum/grc_reorganize into trunk. Reorganized grc source under...
[debian/gnuradio] / config / grc_grc.m4
1 dnl Copyright 2008 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     dnl ########################################
26     dnl # test python dependencies
27     dnl ########################################
28     if test $passed = yes; then
29         if ! ${PYTHON} -c 'import Cheetah'; then
30             AC_MSG_RESULT([grc requires the Python Cheetah templates installed, not found.])
31             passed=no
32         fi
33         if ! ${PYTHON} -c 'import pygtk'; then
34             AC_MSG_RESULT([grc requires Python GTK wrappers installed, not found.])
35             passed=no
36         fi
37         if ! ${PYTHON} -c 'import lxml'; then
38             AC_MSG_RESULT([grc requires libxml2 and libxslt wrappers (lxml), not found.])
39             passed=no
40         fi
41     fi
42
43     dnl ########################################
44     dnl # platform dependency pythonw
45     dnl ########################################
46     dnl FIXME: move this test to Python config m4
47     if test `${PYTHON} -c "import sys; print sys.platform"` = 'darwin'; then
48         PYTHONW=pythonw
49     else
50         PYTHONW=python
51     fi
52     AC_SUBST(PYTHONW)
53
54     AC_CONFIG_FILES([ \
55         grc/src/grc_gnuradio/Makefile \
56         grc/src/grc_gnuradio/wxgui/Makefile \
57         grc/src/grc_gnuradio/blks2/Makefile \
58         grc/src/grc_gnuradio/usrp/Makefile \
59         grc/src/Makefile \
60         grc/src/platforms/Makefile \
61         grc/src/platforms/base/Makefile \
62         grc/src/platforms/python/Makefile \
63         grc/src/platforms/python/utils/Makefile \
64         grc/src/platforms/gui/Makefile \
65         grc/src/utils/Makefile \
66         grc/src/gui/Makefile \
67         grc/examples/Makefile \
68         grc/examples/xmlrpc/Makefile \
69         grc/examples/usrp/Makefile \
70         grc/examples/audio/Makefile \
71         grc/examples/simple/Makefile \
72         grc/Makefile \
73         grc/data/Makefile \
74         grc/data/platforms/Makefile \
75         grc/data/platforms/base/Makefile \
76         grc/data/platforms/python/Makefile \
77         grc/data/platforms/python/blocks/Makefile \
78         grc/scripts/Makefile \
79     ])
80
81     GRC_BUILD_CONDITIONAL(grc)
82 ])