1 dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
3 dnl This file is part of GNU Radio
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)
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.
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.
20 AC_DEFUN([GRC_GNURADIO_CORE],[
21 GRC_ENABLE([gnuradio-core])
22 GRC_WITH([gnuradio-core])
24 if test x$with_gnuradio_core = xyes; then
25 if test x$enable_gnuradio_core = xyes; then
26 AC_MSG_ERROR([Component gnuradio-core: Cannot use both --enable and --with])
28 PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core, passed=with,
29 AC_MSG_RESULT([Component gnuradio-core: PKGCONFIG cannot find info]))
30 if test x$passed = xwith; then
31 gnuradio_core_INCLUDES=`$PKG_CONFIG --cflags-only-I gnuradio-core`
32 gnuradio_core_LA=$GNURADIO_CORE_LIBS
33 gnuradio_core_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gnuradio-core`
34 gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig"
35 gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i"
36 gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH"
37 gnuradio_core_LIBDIRPATH=`$PKG_CONFIG --variable=libdir gnuradio-core`
38 gnuradio_core_PYDIRPATH=$pythondir
42 dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
43 dnl otherwise, $passed = no; check the "--enable" stuff
44 if test x$passed = xno; then
46 gnuradio-core/Makefile
47 gnuradio-core/gnuradio-core.pc \
48 gnuradio-core/doc/Doxyfile \
49 gnuradio-core/doc/Makefile \
50 gnuradio-core/doc/other/Makefile \
51 gnuradio-core/doc/xml/Makefile \
52 gnuradio-core/src/Makefile \
53 gnuradio-core/src/gen_interpolator_taps/Makefile \
54 gnuradio-core/src/lib/Makefile \
55 gnuradio-core/src/lib/filter/Makefile \
56 gnuradio-core/src/lib/g72x/Makefile \
57 gnuradio-core/src/lib/general/Makefile \
58 gnuradio-core/src/lib/general/gr_prefix.cc \
59 gnuradio-core/src/lib/gengen/Makefile \
60 gnuradio-core/src/lib/io/Makefile \
61 gnuradio-core/src/lib/missing/Makefile \
62 gnuradio-core/src/lib/reed-solomon/Makefile \
63 gnuradio-core/src/lib/runtime/Makefile \
64 gnuradio-core/src/lib/swig/Makefile \
65 gnuradio-core/src/python/Makefile \
66 gnuradio-core/src/python/bin/Makefile \
67 gnuradio-core/src/python/gnuradio/Makefile \
68 gnuradio-core/src/python/gnuradio/blks2/Makefile \
69 gnuradio-core/src/python/gnuradio/blks2impl/Makefile \
70 gnuradio-core/src/python/gnuradio/gr/Makefile \
71 gnuradio-core/src/python/gnuradio/gr/run_tests \
72 gnuradio-core/src/python/gnuradio/gru/Makefile \
73 gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
74 gnuradio-core/src/python/gnuradio/vocoder/Makefile \
75 gnuradio-core/src/tests/Makefile \
76 gnuradio-core/src/utils/Makefile \
80 # Don't do gnuradio-core if omnithread skipped
81 if test x$omnithread_skipped = xyes; then
82 AC_MSG_RESULT([Component gnuradio-core requires omnithread, which is not being built or specified via pre-installed files.])
85 gnuradio_core_INCLUDES="-I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \
86 -I\${abs_top_srcdir}/gnuradio-core/src/lib/general \
87 -I\${abs_top_builddir}/gnuradio-core/src/lib/general \
88 -I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \
89 -I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \
90 -I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \
91 -I\${abs_top_builddir}/gnuradio-core/src/lib/filter \
92 -I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \
93 -I\${abs_top_srcdir}/gnuradio-core/src/lib/io \
94 -I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \
95 -I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \
96 -I\${abs_top_builddir}/gnuradio-core/src/lib/swig \
98 gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la"
99 gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i"
100 gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs"
101 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"
102 gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
104 GRC_BUILD_CONDITIONAL([gnuradio-core],[
105 dnl run_tests is created from run_tests.in. Make it executable.
106 AC_CONFIG_COMMANDS([run_tests_core], [chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests])
108 dnl kludge up initial swig dependency files
109 AC_CONFIG_COMMANDS([swig_deps], [
110 touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
111 touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
112 touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
113 touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
114 touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
117 AC_SUBST([gnuradio_core_INCLUDES])
118 AC_SUBST([gnuradio_core_LA])
119 AC_SUBST([gnuradio_core_I])
120 AC_SUBST([gnuradio_core_LIBDIRPATH])
121 AC_SUBST([gnuradio_core_SWIGDIRPATH])
122 AC_SUBST([gnuradio_core_PYDIRPATH])