forked from balint256/gr-baz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
125 lines (109 loc) · 3.61 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
dnl
dnl Copyright 2004,2005,2007,2008,2009 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
AC_INIT
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([.])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
GR_VERSION
dnl ustar required to have pathnames > 99 chars
_AM_SET_OPTION([tar-ustar])
AM_INIT_AUTOMAKE(gr-baz,$RELEASE)
dnl This is kind of non-standard, but it sure shortens up this file :-)
m4_include([config/gr_standalone.m4])
GR_STANDALONE
AC_DEFINE(IN_GR_BAZ,1,[define so source files know about compilation])
dnl Check for any libraries you need
dnl AC_CHECK_LIBRARY
dnl Check for header files you need
dnl AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h)
dnl AC_CHECK_HEADERS(sys/mman.h)
AC_CHECK_HEADERS(netdb.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h windows.h)
dnl ##########################################################
dnl TMP_CC="$CC"
dnl CC="$CXX"
dnl AC_CHECK_HEADERS(math.h cmath)
dnl AC_CHECK_FUNCS([finite isnan isinf])
dnl CC="$TMP_CC"
dnl ##########################################################
dnl Checks for library functions.
dnl AC_CHECK_FUNCS([])
dnl We pick up the boost cppflags, cxxflags and thread lib via GNURADIO_CORE
dnl
dnl If you need additional boost libraries, you'll need to
dnl uncomment AX_BOOST_BASE, plus some of the following:
dnl
dnl calls AC_SUBST(BOOST_CPPFLAGS), AC_SUBST(BOOST_LDFLAGS) and defines HAVE_BOOST
dnl AX_BOOST_BASE([1.35])
dnl
dnl All the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo>
dnl
dnl AX_BOOST_DATE_TIME
dnl AX_BOOST_FILESYSTEM
dnl AX_BOOST_IOSTREAMS
dnl AX_BOOST_PROGRAM_OPTIONS
dnl AX_BOOST_REGEX
dnl AX_BOOST_SERIALIZATION
dnl AX_BOOST_SIGNALS
dnl AX_BOOST_SYSTEM
dnl AX_BOOST_TEST_EXEC_MONITOR
dnl AX_BOOST_UNIT_TEST_FRAMEWORK
dnl AX_BOOST_WSERIALIZATION
dnl ##########################################################
TMP_LDFLAGS="$LDFLAGS"
TMP_CFLAGS="$CFLAGS"
TMP_LIBS="$LIBS"
TMP_CC="$CC"
LIBS="-lboost_thread-mt"
CFLAGS="$CFLAGS -I$boost_prefix/include"
LDFLAGS="$LDFLAGS -I$boost_prefix/lib"
CC="$CXX"
AC_MSG_CHECKING([for boost xtime])
AC_TRY_COMPILE([#include <boost/thread/xtime.hpp>],
[boost::xtime xt; boost::xtime_get (&xt, CLOCK_MONOTONIC);],
[ AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_XTIME,1,[define if boost::thread xtime_get is available])
],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([
boost::xtime_get not found - disabling buffer read prediction])
])
LIBS="$TMP_LIBS"
CFLAGS="$TMP_CFLAGS"
LDFLAGS="$TMP_LDFLAGS"
CC="$TMP_CC"
dnl ##########################################################
AC_CONFIG_FILES([\
Makefile \
apps/Makefile \
config/Makefile \
grc/Makefile \
lib/Makefile \
python/Makefile \
python/run_tests \
swig/Makefile \
])
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests], [chmod +x python/run_tests])
AC_OUTPUT
echo Configured gr-baz release $RELEASE for build.