Imported Upstream version 3.0
[debian/gnuradio] / config / gr_set_md_cpu.m4
1 dnl
2 dnl Copyright 2003 Free Software Foundation, Inc.
3 dnl 
4 dnl This file is part of GNU Radio
5 dnl 
6 dnl GNU Radio is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2, or (at your option)
9 dnl any later version.
10 dnl 
11 dnl GNU Radio is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 dnl GNU General Public License for more details.
15 dnl 
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with GNU Radio; see the file COPYING.  If not, write to
18 dnl the Free Software Foundation, Inc., 51 Franklin Street,
19 dnl Boston, MA 02110-1301, USA.
20 dnl 
21
22 AC_DEFUN([GR_SET_MD_CPU],[
23   AC_REQUIRE([AC_CANONICAL_HOST])
24   AC_ARG_WITH(md-cpu,
25         [  --with-md-cpu=ARCH      set machine dependent speedups (auto)],
26                 [cf_with_md_cpu="$withval"],
27                 [cf_with_md_cpu="$host_cpu"])
28
29   AC_MSG_CHECKING([for machine dependent speedups])
30   case "$cf_with_md_cpu" in
31    x86 | i[[3-7]]86)    MD_CPU=x86      MD_SUBCPU=x86   ;;
32    x86_64)              MD_CPU=x86      MD_SUBCPU=x86_64        ;;
33 #  sparc)       MD_CPU=sparc     ;;
34    *)           MD_CPU=generic   ;;
35   esac
36   AC_MSG_RESULT($MD_CPU)
37   AC_SUBST(MD_CPU)
38   AC_SUBST(MD_SUBCPU) 
39
40   AM_CONDITIONAL(MD_CPU_x86,     test "$MD_CPU" = "x86")
41   AM_CONDITIONAL(MD_SUBCPU_x86_64,  test "$MD_SUBCPU" = "x86_64")
42   AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic")
43 ])