Merged gcell-wip -r8159:8202 into trunk. This includes the following
[debian/gnuradio] / config / grc_gcell.m4
1 dnl Copyright 2001,2002,2003,2004,2005,2006,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_GCELL],[
21     GRC_ENABLE(gcell)
22     dnl GRC_WITH(gcell)
23
24     dnl Don't do gcell if omnithread or mblock skipped
25     dnl (The mblock dependency should be refactored, we're just using some timing utilities)
26     GRC_CHECK_DEPENDENCY(gcell, omnithread)
27     GRC_CHECK_DEPENDENCY(gcell, mblock)
28
29     dnl If execution gets to here, $passed will be:
30     dnl   with : if the --with code didn't error out
31     dnl   yes  : if the --enable code passed muster and all dependencies are met
32     dnl   no   : otherwise
33     if test $passed = yes; then
34         dnl Don't build gcell if host_cpu isn't powerpc
35         AC_MSG_CHECKING([whether host_cpu is powerpc*])
36         case "$host_cpu" in
37             powerpc*)
38                 AC_MSG_RESULT(yes)
39                 ;;
40             *)
41                 passed=no
42                 AC_MSG_RESULT(no)
43                 ;;
44         esac
45
46         dnl Don't build gcell if we can't find spu-gcc.
47         AC_CHECK_PROG([SPU_GCC_PROG],[spu-gcc],[yes],[no])
48         if test $SPU_GCC_PROG = no; then
49             passed=no
50         fi
51     fi
52
53     if test $passed != with; then
54         dnl how and where to find INCLUDES and LA
55         gcell_INCLUDES="-I\${abs_top_srcdir}/gcell/src/include \
56                  -I\${abs_top_srcdir}/gcell/src/lib/runtime \
57                  -I\${abs_top_srcdir}/gcell/src/lib/general \
58                  -I\${abs_top_srcdir}/gcell/src/lib/wrapper"
59         gcell_LA="\${abs_top_builddir}/gcell/src/lib/libgcell.la"
60         gcell_spu_INCLUDES="-I\${abs_top_srcdir}/gcell/src/include/spu \
61                  -I\${abs_top_srcdir}/gcell/src/include \
62                  -I\${abs_top_srcdir}/gcell/src/lib/runtime/spu \
63                  -I\${abs_top_srcdir}/gcell/src/lib/general/spu \
64                  -I\${abs_top_srcdir}/gcell/src/lib/wrapper/spu"
65         gcell_spu_LA="\${abs_top_builddir}/gcell/src/lib/spu/libgcell_spu.a"
66         AC_SUBST(gcell_spu_INCLUDES)
67         AC_SUBST(gcell_spu_LA)
68     fi
69
70     AC_CONFIG_FILES([ \
71         gcell/Makefile \
72         gcell/gcell.pc \
73         gcell/src/Makefile \
74         gcell/src/include/Makefile \
75         gcell/src/include/spu/Makefile \
76         gcell/src/lib/Makefile \
77         gcell/src/lib/spu/Makefile \
78         gcell/src/lib/general/Makefile \
79         gcell/src/lib/wrapper/Makefile \
80         gcell/src/lib/runtime/Makefile \
81         gcell/src/apps/Makefile \
82         gcell/src/apps/spu/Makefile \
83         gcell/src/ibm/Makefile \
84     ])
85
86     GRC_BUILD_CONDITIONAL(gcell)
87 ])