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 | |
Harald Welte | db9c1b5 | 2017-10-28 17:49:36 +0200 | [diff] [blame] | 21 | AC_INIT([osmo-trx], |
Martin Hauke | 20259cb | 2018-04-08 19:53:37 +0200 | [diff] [blame] | 22 | m4_esyscmd([./git-version-gen .tarball-version]), |
Harald Welte | db9c1b5 | 2017-10-28 17:49:36 +0200 | [diff] [blame] | 23 | [openbsc@lists.osmocom.org]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 24 | AC_PREREQ(2.57) |
| 25 | AC_CONFIG_SRCDIR([Transceiver52M/Makefile.am]) |
Pau Espin Pedrol | 82f83ce | 2018-01-09 15:09:31 +0100 | [diff] [blame] | 26 | AC_CONFIG_AUX_DIR([.]) |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 27 | AC_CONFIG_MACRO_DIR([config]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 28 | AM_CONFIG_HEADER(config.h) |
Pau Espin Pedrol | 2ac788b | 2018-01-09 17:44:49 +0100 | [diff] [blame] | 29 | AC_CONFIG_TESTDIR(tests) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 30 | |
| 31 | AC_CANONICAL_BUILD |
| 32 | AC_CANONICAL_HOST |
| 33 | AC_CANONICAL_TARGET |
| 34 | |
Pau Espin Pedrol | c27d9f8 | 2019-06-25 12:09:45 +0200 | [diff] [blame] | 35 | AM_INIT_AUTOMAKE([foreign subdir-objects]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 36 | |
Oliver Smith | 0f4d579 | 2021-01-27 17:59:02 +0100 | [diff] [blame] | 37 | CFLAGS="$CFLAGS -std=gnu11" |
| 38 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 39 | dnl Linux kernel KBuild style compile messages |
| 40 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 41 | |
Max | 099a44a | 2017-08-28 12:10:55 +0200 | [diff] [blame] | 42 | dnl include release helper |
| 43 | RELMAKE='-include osmo-release.mk' |
| 44 | AC_SUBST([RELMAKE]) |
| 45 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 46 | AM_PROG_AS |
Pau Espin Pedrol | 5ea1817 | 2018-02-20 16:48:15 +0100 | [diff] [blame] | 47 | AC_PROG_CC |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 48 | AC_PROG_CXX |
Tom Tsou | 8ca237b | 2017-06-09 11:15:58 -0700 | [diff] [blame] | 49 | AX_CXX_COMPILE_STDCXX_11 |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 50 | AC_PROG_LN_S |
| 51 | AC_PROG_MAKE_SET |
| 52 | AC_PROG_INSTALL |
| 53 | AC_PATH_PROG([RM_PROG], [rm]) |
Pau Espin Pedrol | b148d05 | 2018-09-03 18:59:53 +0200 | [diff] [blame] | 54 | AC_LANG([C++]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 55 | |
Eric | c5d5586 | 2020-04-11 01:20:19 +0200 | [diff] [blame] | 56 | dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang |
| 57 | AS_CASE(["$LD"],[*clang*], |
| 58 | [AS_CASE(["${host_os}"], |
| 59 | [*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])]) |
| 60 | |
Pau Espin Pedrol | c92dad3 | 2018-02-20 13:22:58 +0100 | [diff] [blame] | 61 | dnl check for pkg-config (explained in detail in libosmocore/configure.ac) |
| 62 | AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) |
| 63 | if test "x$PKG_CONFIG_INSTALLED" = "xno"; then |
| 64 | AC_MSG_WARN([You need to install pkg-config]) |
| 65 | fi |
| 66 | PKG_PROG_PKG_CONFIG([0.20]) |
| 67 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 68 | AC_LIBTOOL_WIN32_DLL |
| 69 | AC_ENABLE_SHARED dnl do build shared libraries |
| 70 | AC_DISABLE_STATIC dnl don't build static libraries |
| 71 | AC_PROG_LIBTOOL |
| 72 | |
| 73 | dnl Checks for header files. |
| 74 | AC_HEADER_STDC |
Martin Hauke | 066fd04 | 2019-10-13 19:08:00 +0200 | [diff] [blame] | 75 | dnl This is required for GnuRadio includes to understand endianness correctly: |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 76 | AC_CHECK_HEADERS([byteswap.h]) |
| 77 | |
| 78 | dnl Checks for typedefs, structures, and compiler characteristics. |
| 79 | AC_C_CONST |
| 80 | AC_C_INLINE |
| 81 | AC_TYPE_SIZE_T |
| 82 | AC_HEADER_TIME |
| 83 | AC_C_BIGENDIAN |
| 84 | |
Pau Espin Pedrol | a7143d3 | 2021-11-16 16:27:26 +0100 | [diff] [blame^] | 85 | PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.6.0) |
| 86 | PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.6.0) |
| 87 | PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.6.0) |
| 88 | PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.6.0) |
Pau Espin Pedrol | 8b843e5 | 2018-02-20 14:44:39 +0100 | [diff] [blame] | 89 | |
Pau Espin Pedrol | 53bdb7f | 2018-04-16 14:27:38 +0200 | [diff] [blame] | 90 | AC_ARG_ENABLE(sanitize, |
| 91 | [AS_HELP_STRING( |
| 92 | [--enable-sanitize], |
| 93 | [Compile with address sanitizer enabled], |
| 94 | )], |
| 95 | [sanitize=$enableval], [sanitize="no"]) |
| 96 | if test x"$sanitize" = x"yes" |
| 97 | then |
| 98 | CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" |
| 99 | LDFLAGS="$LDFLAGS -fsanitize=address -fsanitize=undefined" |
| 100 | fi |
| 101 | |
Pau Espin Pedrol | 288d8af | 2018-08-30 17:29:41 +0200 | [diff] [blame] | 102 | AC_ARG_ENABLE(werror, |
| 103 | [AS_HELP_STRING( |
| 104 | [--enable-werror], |
| 105 | [Turn all compiler warnings into errors, with exceptions: |
| 106 | a) deprecation (allow upstream to mark deprecation without breaking builds); |
| 107 | b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) |
| 108 | ] |
| 109 | )], |
| 110 | [werror=$enableval], [werror="no"]) |
| 111 | if test x"$werror" = x"yes" |
| 112 | then |
| 113 | WERROR_FLAGS="-Werror" |
| 114 | WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" |
| 115 | WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" |
| 116 | CFLAGS="$CFLAGS $WERROR_FLAGS" |
| 117 | CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" |
| 118 | fi |
| 119 | |
| 120 | |
Pau Espin Pedrol | f3d7f44 | 2018-04-24 18:49:03 +0200 | [diff] [blame] | 121 | AC_ARG_WITH(uhd, [ |
| 122 | AS_HELP_STRING([--with-uhd], |
| 123 | [enable UHD based transceiver]) |
| 124 | ]) |
| 125 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 126 | AC_ARG_WITH(usrp1, [ |
| 127 | AS_HELP_STRING([--with-usrp1], |
| 128 | [enable USRP1 gnuradio based transceiver]) |
| 129 | ]) |
| 130 | |
Pau Espin Pedrol | 1f50fed | 2018-04-25 11:12:06 +0200 | [diff] [blame] | 131 | AC_ARG_WITH(lms, [ |
| 132 | AS_HELP_STRING([--with-lms], |
Pau Espin Pedrol | 70d0344 | 2018-08-17 17:17:05 +0200 | [diff] [blame] | 133 | [enable LimeSuite based transceiver]) |
Pau Espin Pedrol | 1f50fed | 2018-04-25 11:12:06 +0200 | [diff] [blame] | 134 | ]) |
| 135 | |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 136 | AC_ARG_WITH(ipc, [ |
| 137 | AS_HELP_STRING([--with-ipc], |
| 138 | [enable IPC]) |
| 139 | ]) |
| 140 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 141 | AC_ARG_WITH(singledb, [ |
| 142 | AS_HELP_STRING([--with-singledb], |
| 143 | [enable single daughterboard use on USRP1]) |
| 144 | ]) |
| 145 | |
Thomas Tsou | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 146 | AC_ARG_WITH(neon, [ |
| 147 | AS_HELP_STRING([--with-neon], |
| 148 | [enable ARM NEON support]) |
| 149 | ]) |
| 150 | |
| 151 | AC_ARG_WITH(neon-vfpv4, [ |
| 152 | AS_HELP_STRING([--with-neon-vfpv4], |
| 153 | [enable ARM NEON FMA support]) |
| 154 | ]) |
| 155 | |
Tom Tsou | 6613331 | 2015-05-18 16:26:33 -0700 | [diff] [blame] | 156 | AC_ARG_WITH(sse, [ |
| 157 | AS_HELP_STRING([--with-sse], |
| 158 | [enable x86 SSE support (default)]) |
| 159 | ]) |
| 160 | |
Thomas Tsou | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 161 | AS_IF([test "x$with_neon" = "xyes"], [ |
| 162 | AC_DEFINE(HAVE_NEON, 1, Support ARM NEON) |
| 163 | ]) |
| 164 | |
| 165 | AS_IF([test "x$with_neon_vfpv4" = "xyes"], [ |
| 166 | AC_DEFINE(HAVE_NEON, 1, Support ARM NEON) |
| 167 | AC_DEFINE(HAVE_NEON_FMA, 1, Support ARM NEON with FMA) |
| 168 | ]) |
| 169 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 170 | AS_IF([test "x$with_usrp1" = "xyes"], [ |
Pau Espin Pedrol | affd351 | 2018-12-03 19:15:01 +0100 | [diff] [blame] | 171 | AC_CHECK_HEADER([boost/config.hpp],[], |
| 172 | [AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])]) |
Thomas Tsou | c064124 | 2013-10-11 14:55:31 -0400 | [diff] [blame] | 173 | PKG_CHECK_MODULES(USRP, usrp >= 3.3) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 174 | ]) |
| 175 | |
Pau Espin Pedrol | 1f50fed | 2018-04-25 11:12:06 +0200 | [diff] [blame] | 176 | AS_IF([test "x$with_lms" = "xyes"], [ |
| 177 | PKG_CHECK_MODULES(LMS, LimeSuite) |
| 178 | ]) |
| 179 | |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 180 | AS_IF([test "x$with_uhd" = "xyes"],[ |
Tom Tsou | 72bf762 | 2017-03-07 14:16:46 -0800 | [diff] [blame] | 181 | PKG_CHECK_MODULES(UHD, uhd >= 003.011, |
| 182 | [AC_DEFINE(USE_UHD_3_11, 1, UHD version 3.11.0 or higher)], |
| 183 | [PKG_CHECK_MODULES(UHD, uhd >= 003.009, |
| 184 | [AC_DEFINE(USE_UHD_3_9, 1, UHD version 3.9.0 or higher)], |
| 185 | [PKG_CHECK_MODULES(UHD, uhd >= 003.005)] |
| 186 | )] |
Tom Tsou | 80cb080 | 2017-01-19 13:44:02 -0800 | [diff] [blame] | 187 | ) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 188 | ]) |
| 189 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 190 | AS_IF([test "x$with_singledb" = "xyes"], [ |
| 191 | AC_DEFINE(SINGLEDB, 1, Define to 1 for single daughterboard) |
| 192 | ]) |
| 193 | |
Thomas Tsou | fffd987 | 2013-11-04 10:20:21 -0800 | [diff] [blame] | 194 | # Find and define supported SIMD extensions |
Tom Tsou | 6613331 | 2015-05-18 16:26:33 -0700 | [diff] [blame] | 195 | AS_IF([test "x$with_sse" != "xno"], [ |
Philipp Maier | e8ae9fc | 2017-03-20 12:08:42 +0100 | [diff] [blame] | 196 | AX_SSE |
| 197 | ], [ |
| 198 | AM_CONDITIONAL(HAVE_SSE3, false) |
| 199 | AM_CONDITIONAL(HAVE_SSE4_1, false) |
Tom Tsou | 6613331 | 2015-05-18 16:26:33 -0700 | [diff] [blame] | 200 | ]) |
Thomas Tsou | fffd987 | 2013-11-04 10:20:21 -0800 | [diff] [blame] | 201 | |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 202 | dnl Check if the compiler supports specified GCC's built-in function |
| 203 | AC_DEFUN([CHECK_BUILTIN_SUPPORT], [ |
| 204 | AC_CACHE_CHECK( |
| 205 | [whether ${CC} has $1 built-in], |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 206 | [osmo_cv_cc_has_$1], [ |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 207 | AC_LINK_IFELSE([ |
| 208 | AC_LANG_PROGRAM([], [ |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 209 | $2 |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 210 | ]) |
| 211 | ], |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 212 | [AS_VAR_SET([osmo_cv_cc_has_$1], [yes])], |
| 213 | [AS_VAR_SET([osmo_cv_cc_has_$1], [no])]) |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 214 | ] |
| 215 | ) |
| 216 | |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 217 | AS_IF([test yes = AS_VAR_GET([osmo_cv_cc_has_$1])], [ |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 218 | AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1, |
| 219 | [Define to 1 if compiler has the '$1' built-in function]) |
| 220 | ], [ |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 221 | AC_MSG_WARN($3) |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 222 | ]) |
| 223 | ]) |
| 224 | |
| 225 | dnl Check if the compiler supports runtime SIMD detection |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 226 | CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports], [__builtin_cpu_supports("sse");], |
Vadim Yanitskiy | ee57357 | 2017-05-20 01:34:34 +0300 | [diff] [blame] | 227 | [Runtime SIMD detection will be disabled]) |
| 228 | |
Pau Espin Pedrol | e503c98 | 2019-09-13 18:56:08 +0200 | [diff] [blame] | 229 | dnl Check for __sync_fetch_and_add(). |
| 230 | CHECK_BUILTIN_SUPPORT([__sync_fetch_and_and], [int x;__sync_fetch_and_and(&x,1);], |
| 231 | [Atomic operation not available, will use mutex]) |
| 232 | dnl Check for __sync_or_and_fetch(). |
| 233 | CHECK_BUILTIN_SUPPORT([__sync_or_and_fetch], [int x;__sync_or_and_fetch(&x,1);], |
| 234 | [Atomic operation not available, will use mutex]) |
| 235 | AS_IF([test "x$osmo_cv_cc_has___sync_fetch_and_and" = "xyes" && test "x$osmo_cv_cc_has___sync_or_and_fetch" = "xyes"], [ |
| 236 | AC_DEFINE(HAVE_ATOMIC_OPS, 1, [Support all required atomic operations], [AC_MSG_WARN("At least one aotmic operation missing, will use mutex")]) |
| 237 | ]) |
| 238 | |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 239 | AM_CONDITIONAL(DEVICE_UHD, [test "x$with_uhd" = "xyes"]) |
Pau Espin Pedrol | a4316ee | 2018-04-24 16:29:05 +0200 | [diff] [blame] | 240 | AM_CONDITIONAL(DEVICE_USRP1, [test "x$with_usrp1" = "xyes"]) |
Pau Espin Pedrol | 1f50fed | 2018-04-25 11:12:06 +0200 | [diff] [blame] | 241 | AM_CONDITIONAL(DEVICE_LMS, [test "x$with_lms" = "xyes"]) |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 242 | AM_CONDITIONAL(DEVICE_IPC, [test "x$with_ipc" = "xyes"]) |
Thomas Tsou | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 243 | AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) |
| 244 | AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 245 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 246 | PKG_CHECK_MODULES(LIBUSB, libusb-1.0) |
Alexander Huemer | 6fafd33 | 2018-01-12 15:04:02 +0100 | [diff] [blame] | 247 | PKG_CHECK_MODULES(FFTWF, fftw3f) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 248 | |
Oliver Smith | be8a83f | 2018-11-14 10:47:01 +0100 | [diff] [blame] | 249 | # Generate manuals |
| 250 | AC_ARG_ENABLE(manuals, |
| 251 | [AS_HELP_STRING( |
| 252 | [--enable-manuals], |
| 253 | [Generate manual PDFs [default=no]], |
| 254 | )], |
| 255 | [osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"]) |
| 256 | AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"]) |
| 257 | AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals" |
| 258 | fallback]) |
| 259 | if test x"$osmo_ac_build_manuals" = x"yes" |
| 260 | then |
| 261 | # Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback) |
| 262 | if test -n "$OSMO_GSM_MANUALS_DIR"; then |
| 263 | echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)" |
| 264 | else |
| 265 | OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)" |
| 266 | if test -n "$OSMO_GSM_MANUALS_DIR"; then |
| 267 | echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)" |
| 268 | else |
| 269 | OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals" |
| 270 | echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)" |
| 271 | fi |
| 272 | fi |
| 273 | if ! test -d "$OSMO_GSM_MANUALS_DIR"; then |
| 274 | AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.") |
| 275 | fi |
| 276 | |
| 277 | # Find and run check-depends |
| 278 | CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh" |
| 279 | if ! test -x "$CHECK_DEPENDS"; then |
| 280 | CHECK_DEPENDS="osmo-gsm-manuals-check-depends" |
| 281 | fi |
| 282 | if ! $CHECK_DEPENDS; then |
| 283 | AC_MSG_ERROR("missing dependencies for --enable-manuals") |
| 284 | fi |
| 285 | |
| 286 | # Put in Makefile with absolute path |
| 287 | OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")" |
| 288 | AC_SUBST([OSMO_GSM_MANUALS_DIR]) |
| 289 | fi |
| 290 | |
Pau Espin Pedrol | 5ac2cb3 | 2018-09-10 13:39:02 +0200 | [diff] [blame] | 291 | # https://www.freedesktop.org/software/systemd/man/daemon.html |
| 292 | AC_ARG_WITH([systemdsystemunitdir], |
| 293 | [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, |
| 294 | [with_systemdsystemunitdir=auto]) |
| 295 | AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ |
| 296 | def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) |
| 297 | |
| 298 | AS_IF([test "x$def_systemdsystemunitdir" = "x"], |
| 299 | [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], |
| 300 | [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) |
| 301 | with_systemdsystemunitdir=no], |
| 302 | [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) |
| 303 | AS_IF([test "x$with_systemdsystemunitdir" != "xno"], |
| 304 | [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) |
| 305 | AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) |
| 306 | |
Pau Espin Pedrol | 53bdb7f | 2018-04-16 14:27:38 +0200 | [diff] [blame] | 307 | AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) |
| 308 | AC_MSG_RESULT([CFLAGS="$CFLAGS"]) |
| 309 | AC_MSG_RESULT([CXXFLAGS="$CXXFLAGS"]) |
| 310 | AC_MSG_RESULT([LDFLAGS="$LDFLAGS"]) |
| 311 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 312 | dnl Output files |
| 313 | AC_CONFIG_FILES([\ |
| 314 | Makefile \ |
| 315 | CommonLibs/Makefile \ |
| 316 | GSM/Makefile \ |
| 317 | Transceiver52M/Makefile \ |
Pau Espin Pedrol | 43fedb6 | 2018-04-24 15:22:57 +0200 | [diff] [blame] | 318 | Transceiver52M/arch/Makefile \ |
| 319 | Transceiver52M/arch/common/Makefile \ |
| 320 | Transceiver52M/arch/arm/Makefile \ |
| 321 | Transceiver52M/arch/x86/Makefile \ |
Pau Espin Pedrol | 2128a30 | 2018-04-24 16:16:06 +0200 | [diff] [blame] | 322 | Transceiver52M/device/Makefile \ |
Pau Espin Pedrol | b5def41 | 2019-05-03 21:08:40 +0200 | [diff] [blame] | 323 | Transceiver52M/device/common/Makefile \ |
Pau Espin Pedrol | 2128a30 | 2018-04-24 16:16:06 +0200 | [diff] [blame] | 324 | Transceiver52M/device/uhd/Makefile \ |
| 325 | Transceiver52M/device/usrp1/Makefile \ |
Pau Espin Pedrol | 1f50fed | 2018-04-25 11:12:06 +0200 | [diff] [blame] | 326 | Transceiver52M/device/lms/Makefile \ |
Eric Wild | 1e17c4f | 2020-03-24 17:19:27 +0100 | [diff] [blame] | 327 | Transceiver52M/device/ipc/Makefile \ |
Pau Espin Pedrol | 2ac788b | 2018-01-09 17:44:49 +0100 | [diff] [blame] | 328 | tests/Makefile \ |
| 329 | tests/CommonLibs/Makefile \ |
Pau Espin Pedrol | c2ba427 | 2018-01-10 13:06:22 +0100 | [diff] [blame] | 330 | tests/Transceiver52M/Makefile \ |
Harald Welte | 6879bb0 | 2020-05-02 22:27:14 +0200 | [diff] [blame] | 331 | utils/Makefile \ |
Pau Espin Pedrol | c7756e7 | 2018-06-19 11:14:45 +0200 | [diff] [blame] | 332 | doc/Makefile \ |
| 333 | doc/examples/Makefile \ |
Pau Espin Pedrol | 5ac2cb3 | 2018-09-10 13:39:02 +0200 | [diff] [blame] | 334 | contrib/Makefile \ |
| 335 | contrib/systemd/Makefile \ |
Thomas Tsou | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 336 | ]) |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 337 | |
Oliver Smith | be8a83f | 2018-11-14 10:47:01 +0100 | [diff] [blame] | 338 | AC_OUTPUT( |
Oliver Smith | 7bbe19e | 2020-05-14 11:54:54 +0200 | [diff] [blame] | 339 | doc/manuals/Makefile |
| 340 | contrib/osmo-trx.spec) |