1 dnl Copyright 2008,2010 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_USRP2],[
23 dnl firmware uses a subsidiary configure.ac
24 AC_CONFIG_SUBDIRS([usrp2/firmware])
26 dnl Don't do usrp if gruel is skipped
27 GRC_CHECK_DEPENDENCY(usrp2, gruel)
29 dnl USRP2 host code only works on Linux at the moment
30 AC_MSG_CHECKING([whether host_os is linux*])
37 AC_MSG_NOTICE([USRP2 currently requires Linux host OS, not found])
42 dnl If execution gets to here, $passed will be:
43 dnl with : if the --with code didn't error out
44 dnl yes : if the --enable code passed muster and all dependencies are met
46 if test $passed = yes; then
47 dnl Needed for usrp2_socket_opener
48 AC_CHECK_HEADERS(arpa/inet.h byteswap.h linux/if_packet.h sys/socket.h sys/un.h)
49 AC_CHECK_MEMBERS([struct msghdr.msg_control,
50 struct msghdr.msg_accrights,
51 struct cmsgcred.cmcred_uid,
55 #include <sys/types.h>
56 #include <sys/socket.h>
59 if test $passed != with; then
60 dnl how and where to find INCLUDES and LA
61 USRP2_INCLUDES="-I\${abs_top_srcdir}/usrp2/host/include \
62 -I\${abs_top_srcdir}/usrp2/firmware/include"
63 USRP2_LA="\${abs_top_builddir}/usrp2/host/lib/libusrp2.la"
66 dnl Include the usrp2 INCLUDES and LA
67 AC_SUBST(USRP2_INCLUDES)
74 usrp2/host/include/Makefile
75 usrp2/host/include/usrp2/Makefile
76 usrp2/host/lib/Makefile
77 usrp2/host/apps/Makefile
80 GRC_BUILD_CONDITIONAL(usrp2)