Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 1 | dnl |
| 2 | dnl Copyright 2008, 2009, 2010 Free Software Foundation, Inc. |
| 3 | dnl |
| 4 | dnl This software is distributed under the terms of the GNU Public License. |
| 5 | dnl See the COPYING file in the main directory for details. |
| 6 | dnl |
| 7 | dnl This program is free software: you can redistribute it and/or modify |
| 8 | dnl it under the terms of the GNU General Public License as published by |
| 9 | dnl the Free Software Foundation, either version 3 of the License, or |
| 10 | dnl (at your option) any later version. |
| 11 | dnl |
| 12 | dnl This program is distributed in the hope that it will be useful, |
| 13 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | dnl GNU General Public License for more details. |
| 16 | dnl |
| 17 | dnl You should have received a copy of the GNU General Public License |
| 18 | dnl along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | dnl |
| 20 | |
| 21 | AC_INIT(openbts,P2.8TRUNK) |
| 22 | AC_PREREQ(2.57) |
| 23 | AC_CONFIG_SRCDIR([Transceiver52M/Makefile.am]) |
| 24 | AC_CONFIG_AUX_DIR([.]) |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 25 | AC_CONFIG_MACRO_DIR([config]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 26 | AM_CONFIG_HEADER(config.h) |
| 27 | |
| 28 | AC_CANONICAL_BUILD |
| 29 | AC_CANONICAL_HOST |
| 30 | AC_CANONICAL_TARGET |
| 31 | |
| 32 | AM_INIT_AUTOMAKE |
| 33 | |
| 34 | dnl Linux kernel KBuild style compile messages |
| 35 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 36 | |
| 37 | AM_PROG_AS |
| 38 | AC_PROG_CXX |
| 39 | AC_PROG_LN_S |
| 40 | AC_PROG_MAKE_SET |
| 41 | AC_PROG_INSTALL |
| 42 | AC_PATH_PROG([RM_PROG], [rm]) |
| 43 | |
| 44 | AC_LIBTOOL_WIN32_DLL |
| 45 | AC_ENABLE_SHARED dnl do build shared libraries |
| 46 | AC_DISABLE_STATIC dnl don't build static libraries |
| 47 | AC_PROG_LIBTOOL |
| 48 | |
| 49 | dnl Checks for header files. |
| 50 | AC_HEADER_STDC |
| 51 | dnl This is required for GnuRadio includes to understand endianess correctly: |
| 52 | AC_CHECK_HEADERS([byteswap.h]) |
| 53 | |
| 54 | dnl Checks for typedefs, structures, and compiler characteristics. |
| 55 | AC_C_CONST |
| 56 | AC_C_INLINE |
| 57 | AC_TYPE_SIZE_T |
| 58 | AC_HEADER_TIME |
| 59 | AC_C_BIGENDIAN |
| 60 | |
| 61 | AC_ARG_WITH(usrp1, [ |
| 62 | AS_HELP_STRING([--with-usrp1], |
| 63 | [enable USRP1 gnuradio based transceiver]) |
| 64 | ]) |
| 65 | |
| 66 | AC_ARG_WITH(uhd, [ |
| 67 | AS_HELP_STRING([--with-uhd], |
| 68 | [enable UHD based transceiver]) |
| 69 | ]) |
| 70 | |
| 71 | AC_ARG_WITH(singledb, [ |
| 72 | AS_HELP_STRING([--with-singledb], |
| 73 | [enable single daughterboard use on USRP1]) |
| 74 | ]) |
| 75 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 76 | AC_ARG_WITH(extref, [ |
| 77 | AS_HELP_STRING([--with-extref], |
| 78 | [enable external reference on UHD devices]) |
| 79 | ]) |
| 80 | |
| 81 | AS_IF([test "x$with_usrp1" = "xyes"], [ |
Thomas Tsou | c064124 | 2013-10-11 14:55:31 -0400 | [diff] [blame] | 82 | PKG_CHECK_MODULES(USRP, usrp >= 3.3) |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 83 | # Find and define supported SIMD extensions |
| 84 | AX_EXT |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 85 | ]) |
| 86 | |
| 87 | AS_IF([test "x$with_uhd" = "xyes"],[ |
Thomas Tsou | b4cb4e2 | 2013-04-05 15:11:35 -0400 | [diff] [blame] | 88 | PKG_CHECK_MODULES(UHD, uhd >= 003.004.000) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 89 | AC_DEFINE(USE_UHD, 1, Define to 1 if using UHD) |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 90 | AX_EXT |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 91 | ]) |
| 92 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 93 | AS_IF([test "x$with_extref" = "xyes"], [ |
| 94 | AC_DEFINE(EXTREF, 1, Define to 1 for external reference) |
| 95 | ]) |
| 96 | |
| 97 | AS_IF([test "x$with_singledb" = "xyes"], [ |
| 98 | AC_DEFINE(SINGLEDB, 1, Define to 1 for single daughterboard) |
| 99 | ]) |
| 100 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 101 | AM_CONDITIONAL(UHD, [test "x$with_uhd" = "xyes"]) |
| 102 | AM_CONDITIONAL(USRP1, [test "x$with_usrp1" = "xyes"]) |
| 103 | |
| 104 | # Defines LIBUSB_TRANSFER_CANCELLED, LIBUSB_TRANSFER_COMPLETED, LIBUSB_SUCCESS, LIBUSB_ERROR_* |
| 105 | PKG_CHECK_MODULES(LIBUSB, libusb-1.0) |
| 106 | |
| 107 | dnl Output files |
| 108 | AC_CONFIG_FILES([\ |
| 109 | Makefile \ |
| 110 | CommonLibs/Makefile \ |
| 111 | GSM/Makefile \ |
| 112 | Transceiver52M/Makefile \ |
| 113 | sqlite3/Makefile \ |
| 114 | ]) |
| 115 | |
| 116 | AC_OUTPUT |