2008-12-23 21:01:25 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script
|
2017-09-04 13:17:33 +00:00
|
|
|
AC_INIT([osmo-sgsn],
|
2010-03-22 16:09:32 +00:00
|
|
|
m4_esyscmd([./git-version-gen .tarball-version]),
|
2017-09-04 13:17:33 +00:00
|
|
|
[osmocom-net-gprs@lists.osmocom.org])
|
2008-12-23 21:01:25 +00:00
|
|
|
|
2016-09-30 22:34:31 +00:00
|
|
|
dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
|
|
|
|
AC_CONFIG_AUX_DIR([.])
|
|
|
|
|
2010-03-22 16:09:32 +00:00
|
|
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
2012-01-06 14:16:12 +00:00
|
|
|
AC_CONFIG_TESTDIR(tests)
|
2008-12-23 21:01:25 +00:00
|
|
|
|
2009-10-27 02:34:49 +00:00
|
|
|
dnl kernel style compile messages
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2017-08-28 10:04:18 +00:00
|
|
|
dnl include release helper
|
|
|
|
RELMAKE='-include osmo-release.mk'
|
|
|
|
AC_SUBST([RELMAKE])
|
|
|
|
|
2008-12-23 21:01:25 +00:00
|
|
|
dnl checks for programs
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
2017-05-26 10:31:00 +00:00
|
|
|
LT_INIT
|
2008-12-23 21:01:25 +00:00
|
|
|
|
2016-09-30 22:50:25 +00:00
|
|
|
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
|
|
|
|
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
|
|
|
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
|
|
|
AC_MSG_WARN([You need to install pkg-config])
|
|
|
|
fi
|
|
|
|
PKG_PROG_PKG_CONFIG([0.20])
|
|
|
|
|
2017-01-20 12:03:03 +00:00
|
|
|
dnl check for AX_CHECK_COMPILE_FLAG
|
|
|
|
m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [
|
|
|
|
AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.])
|
|
|
|
])
|
|
|
|
|
2008-12-23 21:01:25 +00:00
|
|
|
dnl checks for libraries
|
2013-10-15 10:00:26 +00:00
|
|
|
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
|
|
|
|
AC_SUBST(LIBRARY_DL)
|
|
|
|
|
2008-12-23 21:01:25 +00:00
|
|
|
|
2016-12-08 20:28:29 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.9.5)
|
2012-12-20 22:49:24 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
|
2014-08-21 13:56:00 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl)
|
2016-05-06 21:28:52 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.9.5)
|
2014-03-31 11:42:11 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0)
|
2013-10-15 11:29:06 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4)
|
mgcp: add voice muxer support
This patch adds the voice muxer. You can use this to batch RTP
traffic to reduce bandwidth comsuption. Basically, osmux transforms
RTP flows to a compact batch format, that is later on decompacted
to its original form. Port UDP/1984 is used for the muxer traffic
between osmo-bsc_nat and osmo-bsc_mgcp (in the BSC side). This
feature depends on libosmo-netif, which contains the osmux core
support.
Osmux is requested on-demand via the MGCP CRCX/MDCX messages (using
the vendor-specific extension X-Osmux: on) coming from the BSC-NAT,
so you can selectively enable osmux per BSC from one the bsc-nat.cfg
file, so we have a centralized point to enable/disable osmux.
First thing you need to do is to accept requests to use Osmux,
this can be done from VTY interface of osmo-bsc_nat and
osmo-bsc_mgcp by adding the following line:
mgcp
...
osmux on
osmux batch-factor 4
This just initializes the osmux engine. You still have to specify
what BSC uses osmux from osmo-bsc_nat configuration file:
...
bsc 1
osmux on
bsc 2
...
bsc 3
osmux on
In this case, bsc 1 and 3 should use osmux if possible, bsc 2 does
not have osmux enabled.
Thus, you can selectively enable osmux depending on the BSC, and
we have a centralized point for configuration from the bsc-nat to
enable osmux on demand, as suggested by Holger.
At this moment, this patch contains heavy debug logging for each
RTP packet that can be removed later to save cycles.
The RTP ssrc/seqnum/timestamp is randomly allocated for each MDCX that
is received to configure an endpoint.
2014-02-05 17:56:17 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1)
|
2014-03-13 13:25:51 +00:00
|
|
|
|
2016-05-20 19:42:55 +00:00
|
|
|
# Enable/disable 3G aka IuPS + IuCS support?
|
|
|
|
AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])],
|
|
|
|
[osmo_ac_iu="$enableval"],[osmo_ac_iu="no"])
|
|
|
|
if test "x$osmo_ac_iu" = "xyes" ; then
|
2017-10-19 16:11:02 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran) # TODO version?
|
2016-05-20 19:42:55 +00:00
|
|
|
PKG_CHECK_MODULES(LIBASN1C, libasn1c) # TODO version?
|
|
|
|
PKG_CHECK_MODULES(LIBOSMORANAP, libosmo-ranap) # TODO version?
|
|
|
|
AC_DEFINE(BUILD_IU, 1, [Define if we want to build IuPS and IuCS interfaces support])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(BUILD_IU, test "x$osmo_ac_iu" = "xyes")
|
|
|
|
AC_SUBST(osmo_ac_iu)
|
|
|
|
|
2012-11-16 21:15:22 +00:00
|
|
|
|
2011-10-18 11:27:00 +00:00
|
|
|
found_libgtp=yes
|
2017-09-27 13:08:17 +00:00
|
|
|
PKG_CHECK_MODULES(LIBGTP, libgtp >= 1.0.0, , found_libgtp=no)
|
2011-10-18 11:27:00 +00:00
|
|
|
AM_CONDITIONAL(HAVE_LIBGTP, test "$found_libgtp" = yes)
|
2014-09-30 07:10:25 +00:00
|
|
|
AC_SUBST(found_libgtp)
|
2011-10-18 11:27:00 +00:00
|
|
|
|
2015-05-24 17:21:50 +00:00
|
|
|
found_libcares=yes
|
|
|
|
PKG_CHECK_MODULES([LIBCARES], [libcares], [], [found_libcares=no])
|
|
|
|
AM_CONDITIONAL(HAVE_LIBCARES, test "$found_libcares" = yes)
|
|
|
|
AC_SUBST(found_libcares)
|
|
|
|
|
2015-11-29 18:14:58 +00:00
|
|
|
found_libgtp_and_libcares=no
|
|
|
|
if test "$found_libgtp" = "yes" -a "$found_libcares" = "yes"; then
|
|
|
|
found_libgtp_and_libcares=yes
|
|
|
|
fi
|
|
|
|
AC_SUBST(found_libgtp_and_libcares)
|
|
|
|
|
2008-12-23 21:01:25 +00:00
|
|
|
dnl checks for header files
|
|
|
|
AC_HEADER_STDC
|
2017-05-02 10:59:15 +00:00
|
|
|
|
2008-12-23 21:01:25 +00:00
|
|
|
dnl Checks for typedefs, structures and compiler characteristics
|
|
|
|
|
2017-11-17 00:43:36 +00:00
|
|
|
AC_ARG_ENABLE(sanitize,
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-sanitize],
|
|
|
|
[Compile with address sanitizer enabled],
|
|
|
|
)],
|
|
|
|
[sanitize=$enableval], [sanitize="no"])
|
|
|
|
if test x"$sanitize" = x"yes"
|
|
|
|
then
|
|
|
|
CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
|
|
|
|
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
|
|
|
|
fi
|
|
|
|
|
2009-06-08 10:32:54 +00:00
|
|
|
# The following test is taken from WebKit's webkit.m4
|
|
|
|
saved_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fvisibility=hidden "
|
|
|
|
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
|
2011-05-24 13:16:54 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
2009-06-08 10:32:54 +00:00
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
SYMBOL_VISIBILITY="-fvisibility=hidden"],
|
|
|
|
AC_MSG_RESULT([no]))
|
|
|
|
CFLAGS="$saved_CFLAGS"
|
|
|
|
AC_SUBST(SYMBOL_VISIBILITY)
|
|
|
|
|
2018-01-07 17:24:34 +00:00
|
|
|
CPPFLAGS="$CPPFLAGS -Wall"
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
|
2017-01-20 12:03:03 +00:00
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"])
|
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"])
|
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"])
|
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"])
|
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"])
|
|
|
|
AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"])
|
|
|
|
|
2010-11-15 17:37:57 +00:00
|
|
|
# Coverage build taken from WebKit's configure.in
|
|
|
|
AC_MSG_CHECKING([whether to enable code coverage support])
|
|
|
|
AC_ARG_ENABLE(coverage,
|
|
|
|
AC_HELP_STRING([--enable-coverage],
|
|
|
|
[enable code coverage support [default=no]]),
|
|
|
|
[],[enable_coverage="no"])
|
|
|
|
AC_MSG_RESULT([$enable_coverage])
|
|
|
|
if test "$enable_coverage" = "yes"; then
|
|
|
|
COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
|
|
|
|
COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
|
|
|
|
AC_SUBST([COVERAGE_CFLAGS])
|
|
|
|
AC_SUBST([COVERAGE_LDFLAGS])
|
|
|
|
fi
|
|
|
|
|
2012-04-08 14:59:24 +00:00
|
|
|
AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [
|
|
|
|
AC_CACHE_CHECK(
|
|
|
|
[whether struct tm has tm_gmtoff member],
|
|
|
|
osmo_cv_tm_includes_tm_gmtoff,
|
|
|
|
[AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
|
|
|
#include <time.h>
|
|
|
|
], [
|
|
|
|
time_t t = time(NULL);
|
|
|
|
struct tm* lt = localtime(&t);
|
|
|
|
int off = lt->tm_gmtoff;
|
|
|
|
])
|
|
|
|
],
|
|
|
|
osmo_cv_tm_includes_tm_gmtoff=yes,
|
|
|
|
osmo_cv_tm_includes_tm_gmtoff=no
|
|
|
|
)]
|
|
|
|
)
|
|
|
|
if test "x$osmo_cv_tm_includes_tm_gmtoff" = xyes; then
|
|
|
|
AC_DEFINE(HAVE_TM_GMTOFF_IN_TM, 1,
|
|
|
|
[Define if struct tm has tm_gmtoff member.])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
CHECK_TM_INCLUDES_TM_GMTOFF
|
2009-06-08 10:32:54 +00:00
|
|
|
|
2014-09-01 07:34:07 +00:00
|
|
|
AC_ARG_ENABLE([external_tests],
|
2014-08-21 22:29:04 +00:00
|
|
|
AC_HELP_STRING([--enable-external-tests],
|
|
|
|
[Include the VTY/CTRL tests in make check [default=no]]),
|
|
|
|
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
|
|
|
if test "x$enable_ext_tests" = "xyes" ; then
|
2017-11-28 19:08:17 +00:00
|
|
|
AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes)
|
|
|
|
if test "x$PYTHON2_AVAIL" != "xyes" ; then
|
|
|
|
AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.])
|
|
|
|
fi
|
2014-08-21 22:29:04 +00:00
|
|
|
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
|
|
|
|
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
|
2017-07-20 21:01:45 +00:00
|
|
|
AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.])
|
2013-04-05 15:36:09 +00:00
|
|
|
fi
|
|
|
|
fi
|
2014-08-21 22:29:04 +00:00
|
|
|
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
|
|
|
AC_MSG_RESULT([$enable_ext_tests])
|
|
|
|
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
2013-04-05 15:36:09 +00:00
|
|
|
|
2009-06-08 10:32:54 +00:00
|
|
|
dnl Generate the output
|
|
|
|
AM_CONFIG_HEADER(bscconfig.h)
|
|
|
|
|
2008-12-27 09:42:59 +00:00
|
|
|
AC_OUTPUT(
|
2017-09-04 13:25:43 +00:00
|
|
|
osmo-sgsn.pc
|
2008-12-27 09:42:59 +00:00
|
|
|
include/Makefile
|
2017-09-04 13:13:25 +00:00
|
|
|
include/osmocom/Makefile
|
|
|
|
include/osmocom/sgsn/Makefile
|
2008-12-27 09:42:59 +00:00
|
|
|
src/Makefile
|
2010-05-04 05:41:59 +00:00
|
|
|
src/gprs/Makefile
|
2008-12-27 09:42:59 +00:00
|
|
|
tests/Makefile
|
2012-01-09 21:53:04 +00:00
|
|
|
tests/atlocal
|
2011-06-23 21:53:27 +00:00
|
|
|
tests/gprs/Makefile
|
2013-10-15 10:00:26 +00:00
|
|
|
tests/gbproxy/Makefile
|
2014-09-30 07:10:25 +00:00
|
|
|
tests/sgsn/Makefile
|
2015-10-12 09:57:35 +00:00
|
|
|
tests/oap/Makefile
|
2015-09-24 15:32:30 +00:00
|
|
|
tests/gtphub/Makefile
|
2016-08-10 10:14:57 +00:00
|
|
|
tests/xid/Makefile
|
2016-08-10 10:08:03 +00:00
|
|
|
tests/sndcp_xid/Makefile
|
2016-08-26 14:58:41 +00:00
|
|
|
tests/slhc/Makefile
|
2016-09-02 11:32:38 +00:00
|
|
|
tests/v42bis/Makefile
|
2011-05-11 20:11:28 +00:00
|
|
|
doc/Makefile
|
|
|
|
doc/examples/Makefile
|
2008-12-27 09:42:59 +00:00
|
|
|
Makefile)
|