blob: d8fe7190909030c3730b3de9db5af8adffcae22a [file] [log] [blame]
Harald Welte57f6b022012-06-14 21:05:44 +08001dnl Process this file with autoconf to produce a configure script
2AC_INIT([osmo-pcu],
3 m4_esyscmd([./git-version-gen .tarball-version]),
Holger Hans Peter Freyther57522852015-05-22 10:43:34 +08004 [osmocom-net-gprs@lists.osmocom.org])
Harald Welte57f6b022012-06-14 21:05:44 +08005
6AM_INIT_AUTOMAKE([dist-bzip2])
Holger Hans Peter Freythere13298d2013-07-28 16:45:54 +02007AC_CONFIG_TESTDIR(tests)
Harald Welte57f6b022012-06-14 21:05:44 +08008
9dnl kernel style compile messages
10m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11
12dnl checks for programs
13AC_PROG_MAKE_SET
14AC_PROG_CC
15AC_PROG_CXX
16AC_PROG_INSTALL
17LT_INIT
18
19dnl checks for header files
20AC_HEADER_STDC
21
22dnl Checks for typedefs, structures and compiler characteristics
23
24dnl checks for libraries
25PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9)
26PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)
27PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3)
Ivan Kluchnikovef7f28c2012-07-12 14:49:15 +040028PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.1.4)
Harald Welte57f6b022012-06-14 21:05:44 +080029
Andreas Eversberga23c7ee2012-12-18 10:47:28 +010030AC_MSG_CHECKING([whether to enable direct DSP access for PDCH of sysmocom-bts])
31AC_ARG_ENABLE(sysmocom-dsp,
32 AC_HELP_STRING([--enable-sysmocom-dsp],
33 [enable code for sysmocom DSP [default=no]]),
Holger Hans Peter Freyther827ed552013-01-23 21:54:19 +010034 [enable_sysmocom_dsp="$enableval"],[enable_sysmocom_dsp="no"])
Andreas Eversberga23c7ee2012-12-18 10:47:28 +010035AC_MSG_RESULT([$enable_sysmocom_dsp])
36AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes")
37
Yves Godin660709d2016-05-19 11:08:03 +020038AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS])
39AC_ARG_ENABLE(lc15bts-phy,
40 AC_HELP_STRING([--enable-lc15bts-phy],
41 [enable code for Litecell 1.5 PHY [default=no]]),
42 [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"])
43AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])],
44 [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"])
45AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir)
46AC_MSG_RESULT([$enable_lc15bts_phy])
47AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes")
48if test "$enable_litecell15" = "yes"; then
49 oldCPPFLAGS=$CPPFLAGS
50 CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS"
51 AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[],
52 [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])],
53 [#include <nrw/litecell15/litecell15.h>])
54 CPPFLAGS=$oldCPPFLAGS
55fi
56
Kat7dac4862013-04-05 21:44:46 +020057AC_ARG_ENABLE([vty_tests],
58 AC_HELP_STRING([--enable-vty-tests],
Ivan Kluchnikovb6bb55d2013-04-24 15:53:25 +040059 [Include the VTY tests in make check [default=no]]),
60 [enable_vty_tests="$enableval"],[enable_vty_tests="no"])
Kat7dac4862013-04-05 21:44:46 +020061if test "x$enable_vty_tests" = "xyes" ; then
62 AM_PATH_PYTHON
63 AC_CHECK_PROG(OSMOTESTVTY_CHECK,osmotestvty.py,yes)
64 if test "x$OSMOTESTVTY_CHECK" != "xyes" ; then
65 AC_MSG_ERROR([Please install osmocom-python to run the vty tests.])
66 fi
67fi
68AC_MSG_CHECKING([whether to enable VTY tests])
69AC_MSG_RESULT([$enable_vty_tests])
70AM_CONDITIONAL(ENABLE_VTY_TESTS, test "x$enable_vty_tests" = "xyes")
71
Harald Welte57f6b022012-06-14 21:05:44 +080072AC_OUTPUT(
73 src/Makefile
Harald Weltee4050112013-01-11 17:49:22 +010074 examples/Makefile
Holger Hans Peter Freytherbb007042013-07-28 16:15:41 +020075 tests/Makefile
Harald Welte57f6b022012-06-14 21:05:44 +080076 Makefile)