Imported Upstream version 3.2.2
[debian/gnuradio] / config / grc_gnuradio_core.m4
1 dnl Copyright 2001,2002,2003,2004,2005,2006,2007,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_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 gruel or omnithread skipped
32     GRC_CHECK_DEPENDENCY(gnuradio-core, gruel)
33     GRC_CHECK_DEPENDENCY(gnuradio-core, omnithread)
34
35     dnl If execution gets to here, $passed will be:
36     dnl   with : if the --with code didn't error out
37     dnl   yes  : if the --enable code passed muster and all dependencies are met
38     dnl   no   : otherwise
39     if test $passed = yes; then 
40         dnl look for fast CBLAS for GSL, but don't complain if not found
41         ACX_CBLAS([],[])
42         dnl check for GSL
43         PKG_CHECK_MODULES(GSL, gsl >= 1.10,
44             [], dnl FIXME remove -lgslcblas from GSL_LIBS if we found a better CBLAS_LIBS above
45             [passed=no;AC_MSG_RESULT([gnuradio-core requires package gsl >= 1.10, not found.])])
46     fi
47
48     if test $passed != with; then
49         dnl how and where to find INCLUDES and LA and such
50         gnuradio_core_INCLUDES="\
51 -I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
52 -I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
53 -I\${abs_top_builddir}/gnuradio-core/src/lib/general \
54 -I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
55 -I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
56 -I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
57 -I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
58 -I\${abs_top_srcdir}/gnuradio-core/src/lib/missing \
59 -I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
60 -I\${abs_top_srcdir}/gnuradio-core/src/lib/viterbi \
61 -I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
62 -I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
63 -I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
64 -I\${abs_top_srcdir}/gnuradio-core/src/lib/hier \
65 -I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
66 \$(FFTW3F_CFLAGS) \
67 \$(GSL_CFLAGS)"
68         gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la"
69         dnl gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i"
70         gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs"
71         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"
72         gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
73     fi
74
75     dnl other externally-required gnuradio-core variables
76     AC_SUBST(gnuradio_core_I)
77     AC_SUBST(gnuradio_core_SWIGDIRPATH)
78     AC_SUBST(gnuradio_core_PYDIRPATH)
79
80     AC_CONFIG_FILES([ \
81         gnuradio-core/Makefile
82         gnuradio-core/gnuradio-core.pc \
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/hier/Makefile \
97         gnuradio-core/src/lib/swig/Makefile \
98         gnuradio-core/src/python/Makefile \
99         gnuradio-core/src/python/bin/Makefile \
100         gnuradio-core/src/python/gnuradio/Makefile \
101         gnuradio-core/src/python/gnuradio/blks2/Makefile \
102         gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
103         gnuradio-core/src/python/gnuradio/gr/Makefile \
104         gnuradio-core/src/python/gnuradio/gr/run_tests \
105         gnuradio-core/src/python/gnuradio/gru/Makefile \
106         gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
107         gnuradio-core/src/python/gnuradio/vocoder/Makefile \
108         gnuradio-core/src/tests/Makefile \
109         gnuradio-core/src/utils/Makefile \
110     ])
111
112     GRC_BUILD_CONDITIONAL(gnuradio-core, [
113         dnl run_tests is created from run_tests.in.  Make it executable.
114         AC_CONFIG_COMMANDS([run_tests_core],[chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
115     ])
116 ])