blob: 0a64dee53ec28d96f5b065b92ae176681aa2eada [file] [log] [blame]
Alexander Chemeris040b3052013-06-16 14:29:54 +04001dnl
2dnl Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
3dnl
4dnl This software is distributed under the terms of the GNU Public License.
5dnl See the COPYING file in the main directory for details.
6dnl
7dnl This program is free software: you can redistribute it and/or modify
8dnl it under the terms of the GNU General Public License as published by
9dnl the Free Software Foundation, either version 3 of the License, or
10dnl (at your option) any later version.
11dnl
12dnl This program is distributed in the hope that it will be useful,
13dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15dnl GNU General Public License for more details.
16dnl
17dnl You should have received a copy of the GNU General Public License
18dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
19dnl
20
21AC_INIT(openbts,P2.8TRUNK)
22AC_PREREQ(2.57)
23AC_CONFIG_SRCDIR([Transceiver52M/Makefile.am])
24AC_CONFIG_AUX_DIR([.])
Thomas Tsou3eaae802013-08-20 19:31:14 -040025AC_CONFIG_MACRO_DIR([config])
Alexander Chemeris040b3052013-06-16 14:29:54 +040026AM_CONFIG_HEADER(config.h)
27
28AC_CANONICAL_BUILD
29AC_CANONICAL_HOST
30AC_CANONICAL_TARGET
31
Tom Tsou2cc2ddd2015-04-06 18:02:56 -070032AM_INIT_AUTOMAKE([subdir-objects])
Alexander Chemeris040b3052013-06-16 14:29:54 +040033
34dnl Linux kernel KBuild style compile messages
35m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
36
37AM_PROG_AS
38AC_PROG_CXX
39AC_PROG_LN_S
40AC_PROG_MAKE_SET
41AC_PROG_INSTALL
42AC_PATH_PROG([RM_PROG], [rm])
43
44AC_LIBTOOL_WIN32_DLL
45AC_ENABLE_SHARED dnl do build shared libraries
46AC_DISABLE_STATIC dnl don't build static libraries
47AC_PROG_LIBTOOL
48
49dnl Checks for header files.
50AC_HEADER_STDC
51dnl This is required for GnuRadio includes to understand endianess correctly:
52AC_CHECK_HEADERS([byteswap.h])
53
54dnl Checks for typedefs, structures, and compiler characteristics.
55AC_C_CONST
56AC_C_INLINE
57AC_TYPE_SIZE_T
58AC_HEADER_TIME
59AC_C_BIGENDIAN
60
61AC_ARG_WITH(usrp1, [
62 AS_HELP_STRING([--with-usrp1],
63 [enable USRP1 gnuradio based transceiver])
64])
65
Alexander Chemeris040b3052013-06-16 14:29:54 +040066AC_ARG_WITH(singledb, [
67 AS_HELP_STRING([--with-singledb],
68 [enable single daughterboard use on USRP1])
69])
70
Thomas Tsou7e4e5362013-10-30 21:18:55 -040071AC_ARG_WITH(neon, [
72 AS_HELP_STRING([--with-neon],
73 [enable ARM NEON support])
74])
75
76AC_ARG_WITH(neon-vfpv4, [
77 AS_HELP_STRING([--with-neon-vfpv4],
78 [enable ARM NEON FMA support])
79])
80
Tom Tsou66133312015-05-18 16:26:33 -070081AC_ARG_WITH(sse, [
82 AS_HELP_STRING([--with-sse],
83 [enable x86 SSE support (default)])
84])
85
Thomas Tsou7e4e5362013-10-30 21:18:55 -040086AS_IF([test "x$with_neon" = "xyes"], [
87 AC_DEFINE(HAVE_NEON, 1, Support ARM NEON)
88])
89
90AS_IF([test "x$with_neon_vfpv4" = "xyes"], [
91 AC_DEFINE(HAVE_NEON, 1, Support ARM NEON)
92 AC_DEFINE(HAVE_NEON_FMA, 1, Support ARM NEON with FMA)
93])
94
Alexander Chemeris040b3052013-06-16 14:29:54 +040095AS_IF([test "x$with_usrp1" = "xyes"], [
Thomas Tsouc0641242013-10-11 14:55:31 -040096 PKG_CHECK_MODULES(USRP, usrp >= 3.3)
Alexander Chemeris040b3052013-06-16 14:29:54 +040097])
98
Thomas Tsoufffd9872013-11-04 10:20:21 -080099AS_IF([test "x$with_usrp1" != "xyes"],[
Thomas Tsoub4cb4e22013-04-05 15:11:35 -0400100 PKG_CHECK_MODULES(UHD, uhd >= 003.004.000)
Alexander Chemeris040b3052013-06-16 14:29:54 +0400101 AC_DEFINE(USE_UHD, 1, Define to 1 if using UHD)
102])
103
Alexander Chemeris040b3052013-06-16 14:29:54 +0400104AS_IF([test "x$with_singledb" = "xyes"], [
105 AC_DEFINE(SINGLEDB, 1, Define to 1 for single daughterboard)
106])
107
Thomas Tsoufffd9872013-11-04 10:20:21 -0800108# Find and define supported SIMD extensions
Tom Tsou66133312015-05-18 16:26:33 -0700109AS_IF([test "x$with_sse" != "xno"], [
110 AX_EXT
111])
Thomas Tsoufffd9872013-11-04 10:20:21 -0800112
Alexander Chemeris040b3052013-06-16 14:29:54 +0400113AM_CONDITIONAL(USRP1, [test "x$with_usrp1" = "xyes"])
Thomas Tsou7e4e5362013-10-30 21:18:55 -0400114AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"])
115AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"])
Alexander Chemeris040b3052013-06-16 14:29:54 +0400116
Alexander Chemeris040b3052013-06-16 14:29:54 +0400117PKG_CHECK_MODULES(LIBUSB, libusb-1.0)
118
119dnl Output files
120AC_CONFIG_FILES([\
121 Makefile \
122 CommonLibs/Makefile \
123 GSM/Makefile \
124 Transceiver52M/Makefile \
Thomas Tsou7e4e5362013-10-30 21:18:55 -0400125 Transceiver52M/arm/Makefile \
Thomas Tsou17bbb9b2013-10-30 21:24:40 -0400126 Transceiver52M/x86/Makefile \
Alexander Chemeris040b3052013-06-16 14:29:54 +0400127 sqlite3/Makefile \
Thomas Tsou7e4e5362013-10-30 21:18:55 -0400128])
Alexander Chemeris040b3052013-06-16 14:29:54 +0400129
130AC_OUTPUT