982c8863a1ec5aae154b85831b47c984ef6bb87e
[debian/gnuradio] / config / grc_vrt.m4
1 dnl Copyright 2008,2009 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_VRT],[
21     GRC_ENABLE(vrt)
22
23     dnl If execution gets to here, $passed will be:
24     dnl   with : if the --with code didn't error out
25     dnl   yes  : if the --enable code passed muster and all dependencies are met
26     dnl   no   : otherwise
27     if test $passed = yes; then
28         dnl Needed for vrt_socket_opener
29         AC_CHECK_HEADERS(arpa/inet.h byteswap.h linux/if_packet.h sys/socket.h sys/un.h)
30     fi
31     if test $passed != with; then
32         dnl how and where to find INCLUDES and LA
33         VRT_INCLUDES="-I\${abs_top_srcdir}/vrt/include"
34         VRT_LA="\${abs_top_builddir}/vrt/lib/libvrt.la"
35     fi
36
37     # Test host OS compatibility
38     AC_MSG_CHECKING([whether host_os is linux*])
39     case "$host_os" in
40       linux*)
41         AC_MSG_RESULT([yes])
42         ;;
43       *)
44         AC_MSG_RESULT([no])
45         AC_MSG_NOTICE([libvrt currently requires Linux host OS, not found])
46         passed="no"
47         ;;
48     esac
49
50     dnl Include the vrt INCLUDES and LA
51     AC_SUBST(VRT_INCLUDES)
52     AC_SUBST(VRT_LA)
53
54     AC_CONFIG_FILES([
55         vrt/Makefile
56         vrt/vrt.pc
57         vrt/include/Makefile
58         vrt/include/vrt/Makefile
59         vrt/lib/Makefile
60         vrt/apps/Makefile
61     ])
62
63     GRC_BUILD_CONDITIONAL(vrt)
64 ])