Added missing package.
[debian/gnuradio] / config / grc_ezdop.m4
1 dnl Copyright 2001,2002,2003,2004,2005,2006 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_EZDOP],[
21     GRC_ENABLE([ezdop])
22
23     AC_CONFIG_FILES([ \
24         ezdop/Makefile \
25         ezdop/ezdop.pc \
26         ezdop/src/Makefile \
27         ezdop/src/firmware/Makefile \
28         ezdop/src/host/Makefile \
29         ezdop/src/host/avrdude/Makefile \
30         ezdop/src/host/ezdop/Makefile \
31         ezdop/src/host/tests/Makefile \
32     ])
33
34     passed=yes
35
36     # See ticket:96 in trac
37     AM_PROG_CC_C_O
38
39     # Firmware build requires Atmel AVR microcontroller port of GCC
40     AC_PATH_PROG([AVRGCC], [avr-gcc -v], [no])
41     if test x$AVRGCC = xno; then
42         passed=no
43         AC_MSG_RESULT([ezdop requires avr-gcc, not found.])
44     fi
45     
46     # ...and binutils
47     AC_PATH_PROG([AVROBJCOPY], [avr-objcopy], [no])
48     if test x$AVROBJCOPY = xno; then
49         passed=no
50         AC_MSG_RESULT([ezdop requires avr binutils, not found.])
51     fi
52     
53     # ...and standard library (test not working yet)
54     #AC_CHECK_HEADERS([avr/io.h],[],
55     #   [passed=no;AC_MSG_RESULT([ezdop requires avr glibc, not found.])])
56
57     # Device access is via libftdi
58     AC_LANG_PUSH(C)
59     AC_CHECK_HEADERS([ftdi.h],[],
60         [passed=no;AC_MSG_RESULT([ezdop requires ftdi.h, not found.])])
61     save_LIBS="$LIBS"
62     AC_SEARCH_LIBS([ftdi_init], [ftdi],[FTDI_LIBS="$LIBS"],
63         [passed=no;AC_MSG_RESULT([ezdop requires libftdi, not found.])])
64     LIBS="$save_LIBS"
65     AC_LANG_POP
66
67     GRC_BUILD_CONDITIONAL([ezdop],[
68         EZDOP_INCLUDES='-I$(top_srcdir)/ezdop/src/host/ezdop/ -I$(top_srcdir)/ezdop/src/firmware/'
69         EZDOP_LIBS='-lezdop'
70         AC_SUBST(FTDI_LIBS)
71         AC_SUBST(EZDOP_INCLUDES)
72         AC_SUBST(EZDOP_LIBS)
73         AC_SUBST(AVRGCC)
74         AC_SUBST(AVROBJCOPY)
75     ])
76 ])