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.
24 if test x$with_usrp = xyes; then
25 if test x$enable_usrp = xyes; then
26 AC_MSG_ERROR([Component usrp: Cannot use both --enable and --with])
28 # the following is required, for whatever reason; ignore the output
29 USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
31 # on to the regular routine
32 PKG_CHECK_MODULES(USRP, usrp, passed=with,
33 AC_MSG_RESULT([Component usrp: PKGCONFIG cannot find info]))
34 if test x$passed = xwith; then
35 usrp_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp`
38 PKG_CHECK_MODULES(USRP_INBAND, usrp-inband, passed=with,
39 AC_MSG_RESULT([Component usrp-inband: PKGCONFIG cannot find info]))
40 if test x$passed = xwith; then
41 usrp_inband_INCLUDES=`$PKG_CONFIG --cflags-only-I usrp-inband`
42 usrp_inband_LA=$USRP_INBAND_LIBS
47 dnl if $passed = with, then "--with" worked; ignore the "--enable" stuff
48 dnl otherwise, $passed = no; check the "--enable" stuff
49 if test x$passed = xno; then
57 usrp/doc/other/Makefile \
59 usrp/host/misc/Makefile \
60 usrp/host/lib/Makefile \
61 usrp/host/lib/inband/Makefile \
62 usrp/host/lib/legacy/Makefile \
63 usrp/host/lib/legacy/std_paths.h \
64 usrp/host/swig/Makefile \
65 usrp/host/apps/Makefile \
66 usrp/host/apps-inband/Makefile \
67 usrp/firmware/Makefile \
68 usrp/firmware/include/Makefile \
69 usrp/firmware/lib/Makefile \
70 usrp/firmware/src/Makefile \
71 usrp/firmware/src/common/Makefile \
72 usrp/firmware/src/usrp2/Makefile \
74 usrp/fpga/rbf/Makefile \
78 # FIXME: this needs to fail gracefully and continue, not implemented yet
81 # These checks don't fail
83 AC_CHECK_HEADERS([byteswap.h linux/compiler.h])
84 AC_CHECK_FUNCS([getrusage sched_setscheduler pthread_setschedparam])
85 AC_CHECK_FUNCS([sigaction snprintf])
87 # There are 2 pkg-config files; the one for usrp requires omnithread
92 usrp_darwin_omnithread_pc_requires="gnuradio-omnithread"
93 usrp_darwin_omnithread_pc_la="-lgromnithread"
96 # for usrp.pc.in (blanks)
97 usrp_darwin_omnithread_pc_requires=""
98 usrp_darwin_omnithread_pc_la=""
102 # Don't do usrp if omnithread, mblock, or pmt skipped
103 if test x$omnithread_skipped = xyes; then
104 AC_MSG_RESULT([Component usrp requires omnithread, which is not being built or specified via pre-installed files.])
107 if test x$mblock_skipped = xyes; then
108 AC_MSG_RESULT([Component usrp requires mblock, which is not being built or specified via pre-installed files.])
111 if test x$pmt_skipped = xyes; then
112 AC_MSG_RESULT([Component usrp requires pmt, which is not being built or specified via pre-installed files.])
115 # Don't do mblock if guile not available (inband requires it)
116 AC_PATH_PROG(GUILE,guile)
117 if test "$GUILE" = "" ; then
118 AC_MSG_RESULT([Component mblock requires guile, which was not found.])
121 USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to configure USB dependency.])])
122 USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast USB technique.])])
123 USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler.])])
125 usrp_INCLUDES="-I\${abs_top_srcdir}/usrp/host/lib/legacy \
126 -I\${abs_top_srcdir}/usrp/firmware/include"
127 usrp_LA="\${abs_top_builddir}/usrp/host/lib/legacy/libusrp.la"
128 usrp_inband_INCLUDES="-I\${abs_top_srcdir}/usrp/host/lib/inband"
129 usrp_inband_LA="\${abs_top_builddir}/usrp/host/lib/inband/libusrp_inband.la"
132 GRC_BUILD_CONDITIONAL([usrp])
134 AC_SUBST(usrp_INCLUDES)
136 AC_SUBST(usrp_inband_INCLUDES)
137 AC_SUBST(usrp_inband_LA)
138 AC_SUBST(usrp_darwin_omnithread_pc_requires)
139 AC_SUBST(usrp_darwin_omnithread_pc_la)