Merged r8195:8205 from jcorgan/ecc into trunk. Adds convolutional encoder
[debian/gnuradio] / config / grc_gnuradio_core.m4
1 dnl Copyright 2001,2002,2003,2004,2005,2006,2007,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_GNURADIO_CORE],[
21     GRC_ENABLE(gnuradio-core)
22
23     GRC_WITH(gnuradio-core, [
24         dnl gnuradio-core has some extra defines if --with specified
25         gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig"
26         gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i"
27         gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH"
28         gnuradio_core_PYDIRPATH=$pythondir
29     ])
30
31     dnl Don't do gnuradio-core if omnithread skipped
32     GRC_CHECK_DEPENDENCY(gnuradio-core, omnithread)
33
34     dnl If execution gets to here, $passed will be:
35     dnl   with : if the --with code didn't error out
36     dnl   yes  : if the --enable code passed muster and all dependencies are met
37     dnl   no   : otherwise
38     if test $passed != with; then
39         dnl how and where to find INCLUDES and LA and such
40         gnuradio_core_INCLUDES="\
41 -I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
42 -I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
43 -I\${abs_top_builddir}/gnuradio-core/src/lib/general \
44 -I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
45 -I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
46 -I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
47 -I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
48 -I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
49 -I\${abs_top_srcdir}/gnuradio-core/src/lib/viterbi \
50 -I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
51 -I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
52 -I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
53 -I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
54 \$(FFTW3F_CFLAGS)"
55         gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la"
56         gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i"
57         gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs"
58         gnuradio_core_SWIGDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib/swig:\${abs_top_builddir}/gnuradio-core/src/lib/swig/.libs:\${abs_top_srcdir}/gnuradio-core/src/lib/swig"
59         gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
60
61         dnl kludge up initial swig dependency files
62         AC_CONFIG_COMMANDS([swig_deps], [
63             touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
64             touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
65             touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
66             touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
67             touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
68         ])
69     fi
70
71     dnl other externally-required gnuradio-core variables
72     AC_SUBST(gnuradio_core_I)
73     AC_SUBST(gnuradio_core_SWIGDIRPATH)
74     AC_SUBST(gnuradio_core_PYDIRPATH)
75
76     AC_CONFIG_FILES([ \
77         gnuradio-core/Makefile
78         gnuradio-core/gnuradio-core.pc \
79         gnuradio-core/doc/Doxyfile \
80         gnuradio-core/doc/Makefile \
81         gnuradio-core/doc/other/Makefile \
82         gnuradio-core/doc/xml/Makefile \
83         gnuradio-core/src/Makefile \
84         gnuradio-core/src/gen_interpolator_taps/Makefile \
85         gnuradio-core/src/lib/Makefile \
86         gnuradio-core/src/lib/filter/Makefile \
87         gnuradio-core/src/lib/g72x/Makefile \
88         gnuradio-core/src/lib/general/Makefile \
89         gnuradio-core/src/lib/general/gr_prefix.cc \
90         gnuradio-core/src/lib/gengen/Makefile \
91         gnuradio-core/src/lib/io/Makefile \
92         gnuradio-core/src/lib/missing/Makefile \
93         gnuradio-core/src/lib/reed-solomon/Makefile \
94         gnuradio-core/src/lib/viterbi/Makefile \
95         gnuradio-core/src/lib/runtime/Makefile \
96         gnuradio-core/src/lib/swig/Makefile \
97         gnuradio-core/src/python/Makefile \
98         gnuradio-core/src/python/bin/Makefile \
99         gnuradio-core/src/python/gnuradio/Makefile \
100         gnuradio-core/src/python/gnuradio/blks2/Makefile \
101         gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
102         gnuradio-core/src/python/gnuradio/gr/Makefile \
103         gnuradio-core/src/python/gnuradio/gr/run_tests \
104         gnuradio-core/src/python/gnuradio/gru/Makefile \
105         gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
106         gnuradio-core/src/python/gnuradio/vocoder/Makefile \
107         gnuradio-core/src/tests/Makefile \
108         gnuradio-core/src/utils/Makefile \
109     ])
110
111     GRC_BUILD_CONDITIONAL(gnuradio-core, [
112         dnl run_tests is created from run_tests.in.  Make it executable.
113         AC_CONFIG_COMMANDS([run_tests_core],[chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
114     ])
115 ])