Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 1 | AC_INIT([libosmocore], |
| 2 | m4_esyscmd([./git-version-gen .tarball-version]), |
Holger Hans Peter Freyther | 8db7020 | 2012-03-26 16:34:37 +0200 | [diff] [blame] | 3 | [openbsc@lists.osmocom.org]) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 4 | |
Neels Hofmeyr | cbdfa65 | 2016-09-30 23:45:28 +0200 | [diff] [blame] | 5 | dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ |
| 6 | AC_CONFIG_AUX_DIR([.]) |
| 7 | |
Sylvain Munaut | 69b1b8b | 2015-08-19 11:15:14 +0200 | [diff] [blame] | 8 | AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6 subdir-objects]) |
Holger Hans Peter Freyther | f9eda74 | 2011-11-13 01:02:54 +0100 | [diff] [blame] | 9 | AC_CONFIG_TESTDIR(tests) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 10 | |
| 11 | dnl kernel style compile messages |
| 12 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 13 | |
Max | ff932bb | 2017-07-04 18:19:38 +0200 | [diff] [blame] | 14 | dnl include release helper |
| 15 | RELMAKE='-include osmo-release.mk' |
| 16 | AC_SUBST([RELMAKE]) |
| 17 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 18 | dnl checks for programs |
| 19 | AC_PROG_MAKE_SET |
Diego Elio Pettenò | d471a21 | 2012-06-29 13:01:19 -0700 | [diff] [blame] | 20 | AC_PROG_MKDIR_P |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 21 | AC_PROG_CC |
| 22 | AC_PROG_INSTALL |
Jan Engelhardt | c2ddc4f | 2015-09-16 14:32:31 +0200 | [diff] [blame] | 23 | LT_INIT([pic-only disable-static]) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 24 | |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 25 | AC_CONFIG_MACRO_DIR([m4]) |
| 26 | |
Neels Hofmeyr | fef2fa2 | 2016-08-08 15:38:35 +0200 | [diff] [blame] | 27 | dnl check for pkg-config |
| 28 | dnl * If pkg-config is missing, we get a "syntax error" for PKG_CHECK_MODULES. |
| 29 | dnl Instead, we want to say that pkg-config and pkg.m4 are missing. |
| 30 | dnl * The proper way is PKG_PROG_PKG_CONFIG() but unfortunately that does not |
| 31 | dnl produce an intelligible error message if pkg-config is missing entirely |
| 32 | dnl ("syntax error near unexpected token `0.20'"). |
| 33 | dnl * To produce a hint that pkg-config is missing, check for the pkg-config |
| 34 | dnl binary; but AC_PATH_PROG breaks if the distribution provides only |
| 35 | dnl prefixed (<arch>-pkg-config) versions, so just print a warning. |
| 36 | AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) |
| 37 | if test "x$PKG_CONFIG_INSTALLED" = "xno"; then |
| 38 | AC_MSG_WARN([You need to install pkg-config]) |
| 39 | fi |
| 40 | PKG_PROG_PKG_CONFIG([0.20]) |
| 41 | |
Tobias Engel | 597460f | 2012-10-24 17:52:52 +0200 | [diff] [blame] | 42 | dnl check os: some linker flags not available on osx |
| 43 | case $host in |
| 44 | *-darwin*) |
| 45 | ;; |
| 46 | *) |
| 47 | LTLDFLAGS_OSMOGB='-Wl,--version-script=$(srcdir)/libosmogb.map' |
| 48 | LTLDFLAGS_OSMOGSM='-Wl,--version-script=$(srcdir)/libosmogsm.map' |
Vadim Yanitskiy | 3262f82 | 2016-09-23 01:48:59 +0700 | [diff] [blame] | 49 | LTLDFLAGS_OSMOCODING='-Wl,--version-script=$(srcdir)/libosmocoding.map' |
Tobias Engel | 597460f | 2012-10-24 17:52:52 +0200 | [diff] [blame] | 50 | ;; |
| 51 | esac |
| 52 | AC_SUBST(LTLDFLAGS_OSMOGB) |
| 53 | AC_SUBST(LTLDFLAGS_OSMOGSM) |
Vadim Yanitskiy | 272bd4f | 2017-08-31 17:53:04 +0700 | [diff] [blame] | 54 | AC_SUBST(LTLDFLAGS_OSMOCODING) |
Tobias Engel | 597460f | 2012-10-24 17:52:52 +0200 | [diff] [blame] | 55 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 56 | dnl checks for header files |
| 57 | AC_HEADER_STDC |
Harald Welte | e15ac06 | 2014-12-04 14:15:36 +0100 | [diff] [blame] | 58 | AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h netinet/tcp.h) |
Holger Hans Peter Freyther | 4772348 | 2011-11-09 11:26:15 +0100 | [diff] [blame] | 59 | # for src/conv.c |
| 60 | AC_FUNC_ALLOCA |
| 61 | AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) |
| 62 | AC_SUBST(LIBRARY_DL) |
Holger Hans Peter Freyther | c2c042d | 2014-04-17 23:19:10 +0200 | [diff] [blame] | 63 | # for src/backtrace.c |
| 64 | AC_CHECK_LIB(execinfo, backtrace, BACKTRACE_LIB=-lexecinfo, BACKTRACE_LIB=) |
| 65 | AC_SUBST(BACKTRACE_LIB) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 66 | |
Pau Espin Pedrol | 639c408 | 2017-07-06 10:45:22 +0200 | [diff] [blame] | 67 | AC_ARG_ENABLE(doxygen, |
| 68 | [AS_HELP_STRING( |
| 69 | [--disable-doxygen], |
| 70 | [Disable generation of documentation using doxygen], |
| 71 | )], |
| 72 | [doxygen=$enableval], [doxygen="yes"]) |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 73 | AC_PATH_PROG(DOXYGEN,doxygen,false) |
Pau Espin Pedrol | 639c408 | 2017-07-06 10:45:22 +0200 | [diff] [blame] | 74 | AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false && test "x$doxygen" = "xyes") |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 75 | |
Max | 4b2b0cc | 2017-07-10 14:32:48 +0200 | [diff] [blame] | 76 | # check for syscal fallback on glibc < 2.25 - can be removed once glibc version requirement is bumped |
| 77 | AC_CHECK_DECLS([SYS_getrandom], [], [], [[#include <sys/syscall.h>]]) |
| 78 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 79 | # The following test is taken from WebKit's webkit.m4 |
| 80 | saved_CFLAGS="$CFLAGS" |
| 81 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 82 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
Alexander Huemer | 3d79f53 | 2011-05-24 15:16:13 +0200 | [diff] [blame] | 83 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 84 | [ AC_MSG_RESULT([yes]) |
| 85 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 86 | AC_MSG_RESULT([no])) |
| 87 | CFLAGS="$saved_CFLAGS" |
| 88 | AC_SUBST(SYMBOL_VISIBILITY) |
| 89 | |
Harald Welte | 7c8e2cc | 2012-08-29 16:47:30 +0200 | [diff] [blame] | 90 | AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [ |
| 91 | AC_CACHE_CHECK( |
| 92 | [whether struct tm has tm_gmtoff member], |
| 93 | osmo_cv_tm_includes_tm_gmtoff, |
| 94 | [AC_LINK_IFELSE([ |
| 95 | AC_LANG_PROGRAM([ |
| 96 | #include <time.h> |
| 97 | ], [ |
| 98 | time_t t = time(NULL); |
| 99 | struct tm* lt = localtime(&t); |
| 100 | int off = lt->tm_gmtoff; |
| 101 | ]) |
| 102 | ], |
| 103 | osmo_cv_tm_includes_tm_gmtoff=yes, |
| 104 | osmo_cv_tm_includes_tm_gmtoff=no |
| 105 | )] |
| 106 | ) |
| 107 | if test "x$osmo_cv_tm_includes_tm_gmtoff" = xyes; then |
| 108 | AC_DEFINE(HAVE_TM_GMTOFF_IN_TM, 1, |
| 109 | [Define if struct tm has tm_gmtoff member.]) |
| 110 | fi |
| 111 | ]) |
| 112 | |
| 113 | CHECK_TM_INCLUDES_TM_GMTOFF |
| 114 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 115 | dnl Generate the output |
Christian Vogel | 854debc | 2013-01-05 20:30:41 +0100 | [diff] [blame] | 116 | AC_CONFIG_HEADER(config.h) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 117 | |
Harald Welte | 90e614f | 2015-12-05 23:38:18 +0100 | [diff] [blame] | 118 | PKG_CHECK_MODULES(TALLOC, [talloc >= 2.0.1]) |
| 119 | |
Harald Welte | 495fe26 | 2012-09-10 16:28:17 +0200 | [diff] [blame] | 120 | AC_ARG_ENABLE([pcsc], [AS_HELP_STRING([--disable-pcsc], [Build without PC/SC support])], |
| 121 | [ |
Neels Hofmeyr | 9683104 | 2016-11-15 17:31:14 +0100 | [diff] [blame] | 122 | ENABLE_PCSC=$enableval |
Harald Welte | 495fe26 | 2012-09-10 16:28:17 +0200 | [diff] [blame] | 123 | ], |
| 124 | [ |
Neels Hofmeyr | 9683104 | 2016-11-15 17:31:14 +0100 | [diff] [blame] | 125 | ENABLE_PCSC="yes" |
Harald Welte | 495fe26 | 2012-09-10 16:28:17 +0200 | [diff] [blame] | 126 | ]) |
Neels Hofmeyr | 9683104 | 2016-11-15 17:31:14 +0100 | [diff] [blame] | 127 | AS_IF([test "x$ENABLE_PCSC" = "xyes"], [ |
Holger Hans Peter Freyther | 18bcc8a | 2014-11-14 15:06:09 +0100 | [diff] [blame] | 128 | PKG_CHECK_MODULES(PCSC, libpcsclite) |
Harald Welte | d086f21 | 2015-11-21 11:38:09 +0100 | [diff] [blame] | 129 | ]) |
Neels Hofmeyr | 9683104 | 2016-11-15 17:31:14 +0100 | [diff] [blame] | 130 | AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") |
| 131 | AC_SUBST(ENABLE_PCSC) |
Harald Welte | 495fe26 | 2012-09-10 16:28:17 +0200 | [diff] [blame] | 132 | |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 133 | AC_ARG_ENABLE(plugin, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 134 | [AS_HELP_STRING( |
| 135 | [--disable-plugin], |
| 136 | [Disable support for dlopen plugins], |
| 137 | )], |
job | 36b4a20 | 2011-08-21 17:18:23 +0200 | [diff] [blame] | 138 | [enable_plugin=$enableval], [enable_plugin="yes"]) |
| 139 | AM_CONDITIONAL(ENABLE_PLUGIN, test x"$enable_plugin" = x"yes") |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 140 | |
Harald Welte | 1067e8c | 2010-06-25 03:00:58 +0200 | [diff] [blame] | 141 | AC_ARG_ENABLE(vty, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 142 | [AS_HELP_STRING( |
| 143 | [--disable-vty], |
| 144 | [Disable building VTY telnet interface] |
| 145 | )], |
job | 36b4a20 | 2011-08-21 17:18:23 +0200 | [diff] [blame] | 146 | [enable_vty=$enableval], [enable_vty="yes"]) |
| 147 | AM_CONDITIONAL(ENABLE_VTY, test x"$enable_vty" = x"yes") |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 148 | |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 149 | AC_ARG_ENABLE(panic_infloop, |
| 150 | [AS_HELP_STRING( |
| 151 | [--enable-panic-infloop], |
| 152 | [Trigger infinite loop on panic rather than fprintf/abort] |
| 153 | )], |
job | 36b4a20 | 2011-08-21 17:18:23 +0200 | [diff] [blame] | 154 | [panic_infloop=$enableval], [panic_infloop="no"]) |
| 155 | if test x"$panic_infloop" = x"yes" |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 156 | then |
| 157 | AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) |
| 158 | fi |
| 159 | |
Holger Hans Peter Freyther | 4355831 | 2010-08-06 06:48:43 +0800 | [diff] [blame] | 160 | AC_ARG_ENABLE(bsc_fd_check, |
| 161 | [AS_HELP_STRING( |
| 162 | [--enable-bsc-fd-check], |
| 163 | [Instrument bsc_register_fd to check that the fd is registered] |
| 164 | )], |
job | 36b4a20 | 2011-08-21 17:18:23 +0200 | [diff] [blame] | 165 | [fd_check=$enableval], [fd_check="no"]) |
| 166 | if test x"$fd_check" = x"no" |
Holger Hans Peter Freyther | 4355831 | 2010-08-06 06:48:43 +0800 | [diff] [blame] | 167 | then |
| 168 | AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd]) |
| 169 | fi |
| 170 | |
Holger Hans Peter Freyther | c87f266 | 2010-10-07 00:00:15 +0800 | [diff] [blame] | 171 | AC_ARG_ENABLE(msgfile, |
| 172 | [AS_HELP_STRING( |
| 173 | [--disable-msgfile], |
| 174 | [Disable support for the msgfile], |
| 175 | )], |
job | 36b4a20 | 2011-08-21 17:18:23 +0200 | [diff] [blame] | 176 | [enable_msgfile=$enableval], [enable_msgfile="yes"]) |
| 177 | AM_CONDITIONAL(ENABLE_MSGFILE, test x"$enable_msgfile" = x"yes") |
Holger Hans Peter Freyther | c87f266 | 2010-10-07 00:00:15 +0800 | [diff] [blame] | 178 | |
Sylvain Munaut | fe28ded | 2011-09-02 22:18:24 +0200 | [diff] [blame] | 179 | AC_ARG_ENABLE(serial, |
| 180 | [AS_HELP_STRING( |
| 181 | [--disable-serial], |
| 182 | [Disable support for the serial helpers], |
| 183 | )], |
| 184 | [enable_serial=$enableval], [enable_serial="yes"]) |
| 185 | AM_CONDITIONAL(ENABLE_SERIAL, test x"$enable_serial" = x"yes") |
| 186 | |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 187 | AC_ARG_ENABLE(utilities, |
| 188 | [AS_HELP_STRING( |
| 189 | [--disable-utilities], |
| 190 | [Disable building utility programs], |
| 191 | )], |
| 192 | [enable_utilities=$enableval], [enable_utilities="yes"]) |
| 193 | AM_CONDITIONAL(ENABLE_UTILITIES, test x"$enable_utilities" = x"yes") |
| 194 | |
Harald Welte | e3a10b6 | 2012-09-08 22:18:43 +0200 | [diff] [blame] | 195 | AC_ARG_ENABLE(gb, |
| 196 | [AS_HELP_STRING( |
| 197 | [--disable-gb], |
| 198 | [Disable building Gb library], |
| 199 | )], |
| 200 | [enable_gb=$enableval], [enable_gb="yes"]) |
| 201 | AM_CONDITIONAL(ENABLE_GB, test x"$enable_gb" = x"yes") |
| 202 | |
Harald Welte | 1c67e75 | 2017-01-15 17:52:30 +0100 | [diff] [blame] | 203 | AC_ARG_ENABLE(ctrl, |
| 204 | [AS_HELP_STRING( |
| 205 | [--disable-ctrl], |
| 206 | [Disable building CTRL library], |
| 207 | )], |
| 208 | [enable_ctrl=$enableval], [enable_ctrl="yes"]) |
| 209 | AM_CONDITIONAL(ENABLE_CTRL, test x"$enable_ctrl" = x"yes") |
| 210 | |
Harald Welte | 898ffef | 2017-05-15 21:37:34 +0200 | [diff] [blame] | 211 | AC_ARG_ENABLE(pseudotalloc, |
| 212 | [AS_HELP_STRING( |
| 213 | [--enable-pseudotalloc], |
| 214 | [Enable building pseudotalloc library], |
| 215 | )], |
| 216 | [enable_pseudotalloc=$enableval], [enable_pseudotalloc="no"]) |
| 217 | AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, test x"$enable_pseudotalloc" = x"yes") |
| 218 | |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 219 | AC_ARG_ENABLE(embedded, |
| 220 | [AS_HELP_STRING( |
| 221 | [--enable-embedded], |
| 222 | [Enable building for embedded use and disable unsupported features] |
| 223 | )], |
| 224 | [embedded=$enableval], [embedded="no"]) |
| 225 | if test x"$embedded" = x"yes" |
| 226 | then |
| 227 | AC_DEFINE([EMBEDDED],[1],[Select building for embedded use]) |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 228 | AM_CONDITIONAL(ENABLE_PLUGIN, false) |
| 229 | AM_CONDITIONAL(ENABLE_MSGFILE, false) |
Sylvain Munaut | fe28ded | 2011-09-02 22:18:24 +0200 | [diff] [blame] | 230 | AM_CONDITIONAL(ENABLE_SERIAL, false) |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 231 | AM_CONDITIONAL(ENABLE_VTY, false) |
Harald Welte | 1c67e75 | 2017-01-15 17:52:30 +0100 | [diff] [blame] | 232 | AM_CONDITIONAL(ENABLE_CTRL, false) |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 233 | AM_CONDITIONAL(ENABLE_UTILITIES, false) |
Harald Welte | e3a10b6 | 2012-09-08 22:18:43 +0200 | [diff] [blame] | 234 | AM_CONDITIONAL(ENABLE_GB, false) |
Harald Welte | 1a7d64c | 2017-01-15 17:53:23 +0100 | [diff] [blame] | 235 | AM_CONDITIONAL(ENABLE_PCSC, false) |
Harald Welte | 898ffef | 2017-05-15 21:37:34 +0200 | [diff] [blame] | 236 | AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) |
job | 8e4deb6 | 2011-08-21 17:18:24 +0200 | [diff] [blame] | 237 | AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) |
| 238 | fi |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 239 | |
Neels Hofmeyr | a238176 | 2016-09-30 01:25:45 +0200 | [diff] [blame] | 240 | AC_ARG_ENABLE(sanitize, |
| 241 | [AS_HELP_STRING( |
| 242 | [--enable-sanitize], |
| 243 | [Compile with address sanitizer enabled], |
| 244 | )], |
| 245 | [sanitize=$enableval], [sanitize="no"]) |
| 246 | if test x"$sanitize" = x"yes" |
| 247 | then |
Pau Espin Pedrol | 1349249 | 2017-06-23 11:18:04 +0200 | [diff] [blame] | 248 | CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" |
| 249 | CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" |
Neels Hofmeyr | a238176 | 2016-09-30 01:25:45 +0200 | [diff] [blame] | 250 | fi |
| 251 | |
Pau Espin Pedrol | 1349249 | 2017-06-23 11:18:04 +0200 | [diff] [blame] | 252 | CFLAGS="$CFLAGS -DBUILDING_LIBOSMOCORE -Wall" |
| 253 | CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOCORE -Wall" |
Pau Espin Pedrol | 69dfe5a | 2017-06-17 23:18:11 +0200 | [diff] [blame] | 254 | |
Vadim Yanitskiy | 2c3066e | 2017-04-30 19:41:56 +0700 | [diff] [blame] | 255 | AC_ARG_ENABLE(simd, |
| 256 | [AS_HELP_STRING( |
| 257 | [--disable-simd], |
| 258 | [Disable SIMD support] |
| 259 | )], |
| 260 | [simd=$enableval], [simd="yes"]) |
| 261 | if test x"$simd" = x"yes" |
| 262 | then |
| 263 | # Find and define supported SIMD extensions |
| 264 | AX_CHECK_SIMD |
| 265 | else |
| 266 | AM_CONDITIONAL(HAVE_AVX2, false) |
| 267 | AM_CONDITIONAL(HAVE_SSE3, false) |
| 268 | AM_CONDITIONAL(HAVE_SSE4_1, false) |
| 269 | fi |
| 270 | |
Vadim Yanitskiy | a8a5819 | 2017-05-08 00:07:21 +0700 | [diff] [blame] | 271 | dnl Check if the compiler supports specified GCC's built-in function |
| 272 | AC_DEFUN([CHECK_BUILTIN_SUPPORT], [ |
| 273 | AC_CACHE_CHECK( |
| 274 | [whether ${CC} has $1 built-in], |
| 275 | [osmo_cv_cc_has_builtin], [ |
| 276 | AC_LINK_IFELSE([ |
| 277 | AC_LANG_PROGRAM([], [ |
| 278 | __builtin_cpu_supports("sse"); |
| 279 | ]) |
| 280 | ], |
| 281 | [AS_VAR_SET([osmo_cv_cc_has_builtin], [yes])], |
| 282 | [AS_VAR_SET([osmo_cv_cc_has_builtin], [no])]) |
| 283 | ] |
| 284 | ) |
| 285 | |
| 286 | AS_IF([test yes = AS_VAR_GET([osmo_cv_cc_has_builtin])], [ |
| 287 | AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1, |
| 288 | [Define to 1 if compiler has the '$1' built-in function]) |
| 289 | ], [ |
| 290 | AC_MSG_WARN($2) |
| 291 | ]) |
| 292 | ]) |
| 293 | |
| 294 | dnl Check if the compiler supports runtime SIMD detection |
| 295 | CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports], |
| 296 | [Runtime SIMD detection will be disabled]) |
| 297 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 298 | AC_OUTPUT( |
| 299 | libosmocore.pc |
Sylvain Munaut | b99b930 | 2010-10-24 18:23:10 +0200 | [diff] [blame] | 300 | libosmocodec.pc |
Vadim Yanitskiy | 3262f82 | 2016-09-23 01:48:59 +0700 | [diff] [blame] | 301 | libosmocoding.pc |
Harald Welte | e352c52 | 2010-05-19 19:42:32 +0200 | [diff] [blame] | 302 | libosmovty.pc |
Pablo Neira Ayuso | fba495e | 2011-03-23 18:08:08 +0100 | [diff] [blame] | 303 | libosmogsm.pc |
Harald Welte | 641f7ce | 2012-06-17 23:05:26 +0800 | [diff] [blame] | 304 | libosmogb.pc |
Harald Welte | 3ff81b1 | 2014-08-20 19:58:40 +0200 | [diff] [blame] | 305 | libosmoctrl.pc |
Harald Welte | d54c2ee | 2012-01-17 18:25:50 +0100 | [diff] [blame] | 306 | libosmosim.pc |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 307 | include/Makefile |
| 308 | src/Makefile |
Harald Welte | 3fb0b6f | 2010-05-19 19:02:52 +0200 | [diff] [blame] | 309 | src/vty/Makefile |
Sylvain Munaut | 1a4ea5b | 2010-10-08 15:09:16 +0200 | [diff] [blame] | 310 | src/codec/Makefile |
Vadim Yanitskiy | 3262f82 | 2016-09-23 01:48:59 +0700 | [diff] [blame] | 311 | src/coding/Makefile |
Harald Welte | d54c2ee | 2012-01-17 18:25:50 +0100 | [diff] [blame] | 312 | src/sim/Makefile |
Pablo Neira Ayuso | fba495e | 2011-03-23 18:08:08 +0100 | [diff] [blame] | 313 | src/gsm/Makefile |
Harald Welte | 641f7ce | 2012-06-17 23:05:26 +0800 | [diff] [blame] | 314 | src/gb/Makefile |
Harald Welte | 3ff81b1 | 2014-08-20 19:58:40 +0200 | [diff] [blame] | 315 | src/ctrl/Makefile |
Harald Welte | 898ffef | 2017-05-15 21:37:34 +0200 | [diff] [blame] | 316 | src/pseudotalloc/Makefile |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 317 | tests/Makefile |
Neels Hofmeyr | 9683104 | 2016-11-15 17:31:14 +0100 | [diff] [blame] | 318 | tests/atlocal |
Harald Welte | eeb78dd | 2011-08-02 13:44:54 +0200 | [diff] [blame] | 319 | utils/Makefile |
Harald Welte | c7859ed | 2011-08-20 12:54:17 +0200 | [diff] [blame] | 320 | Doxyfile.core |
Harald Welte | 49e1056 | 2011-08-17 19:21:07 +0200 | [diff] [blame] | 321 | Doxyfile.gsm |
| 322 | Doxyfile.vty |
| 323 | Doxyfile.codec |
Vadim Yanitskiy | 3262f82 | 2016-09-23 01:48:59 +0700 | [diff] [blame] | 324 | Doxyfile.coding |
Neels Hofmeyr | 249fb71 | 2017-06-20 02:52:38 +0200 | [diff] [blame] | 325 | Doxyfile.gb |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 326 | Makefile) |