Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script |
| 2 | AC_INIT([osmo-pcu], |
| 3 | m4_esyscmd([./git-version-gen .tarball-version]), |
Holger Hans Peter Freyther | 5752285 | 2015-05-22 10:43:34 +0800 | [diff] [blame] | 4 | [osmocom-net-gprs@lists.osmocom.org]) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 5 | |
Neels Hofmeyr | da933e0 | 2016-10-01 00:35:06 +0200 | [diff] [blame^] | 6 | dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ |
| 7 | AC_CONFIG_AUX_DIR([.]) |
| 8 | |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 9 | AM_INIT_AUTOMAKE([dist-bzip2]) |
Holger Hans Peter Freyther | e13298d | 2013-07-28 16:45:54 +0200 | [diff] [blame] | 10 | AC_CONFIG_TESTDIR(tests) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 11 | |
| 12 | dnl kernel style compile messages |
| 13 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 14 | |
| 15 | dnl checks for programs |
| 16 | AC_PROG_MAKE_SET |
| 17 | AC_PROG_CC |
| 18 | AC_PROG_CXX |
| 19 | AC_PROG_INSTALL |
| 20 | LT_INIT |
| 21 | |
| 22 | dnl checks for header files |
| 23 | AC_HEADER_STDC |
| 24 | |
| 25 | dnl Checks for typedefs, structures and compiler characteristics |
| 26 | |
| 27 | dnl checks for libraries |
| 28 | PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9) |
| 29 | PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) |
| 30 | PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3) |
Ivan Kluchnikov | ef7f28c | 2012-07-12 14:49:15 +0400 | [diff] [blame] | 31 | PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.1.4) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 32 | |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 33 | AC_MSG_CHECKING([whether to enable direct DSP access for PDCH of sysmocom-bts]) |
| 34 | AC_ARG_ENABLE(sysmocom-dsp, |
| 35 | AC_HELP_STRING([--enable-sysmocom-dsp], |
| 36 | [enable code for sysmocom DSP [default=no]]), |
Holger Hans Peter Freyther | 827ed55 | 2013-01-23 21:54:19 +0100 | [diff] [blame] | 37 | [enable_sysmocom_dsp="$enableval"],[enable_sysmocom_dsp="no"]) |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 38 | AC_MSG_RESULT([$enable_sysmocom_dsp]) |
| 39 | AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") |
| 40 | |
Yves Godin | 660709d | 2016-05-19 11:08:03 +0200 | [diff] [blame] | 41 | AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS]) |
| 42 | AC_ARG_ENABLE(lc15bts-phy, |
| 43 | AC_HELP_STRING([--enable-lc15bts-phy], |
| 44 | [enable code for Litecell 1.5 PHY [default=no]]), |
| 45 | [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"]) |
| 46 | AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])], |
| 47 | [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"]) |
| 48 | AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir) |
| 49 | AC_MSG_RESULT([$enable_lc15bts_phy]) |
| 50 | AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes") |
| 51 | if test "$enable_litecell15" = "yes"; then |
| 52 | oldCPPFLAGS=$CPPFLAGS |
| 53 | CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" |
| 54 | AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[], |
| 55 | [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])], |
| 56 | [#include <nrw/litecell15/litecell15.h>]) |
| 57 | CPPFLAGS=$oldCPPFLAGS |
| 58 | fi |
| 59 | |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 60 | AC_ARG_ENABLE([vty_tests], |
| 61 | AC_HELP_STRING([--enable-vty-tests], |
Ivan Kluchnikov | b6bb55d | 2013-04-24 15:53:25 +0400 | [diff] [blame] | 62 | [Include the VTY tests in make check [default=no]]), |
| 63 | [enable_vty_tests="$enableval"],[enable_vty_tests="no"]) |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 64 | if test "x$enable_vty_tests" = "xyes" ; then |
| 65 | AM_PATH_PYTHON |
| 66 | AC_CHECK_PROG(OSMOTESTVTY_CHECK,osmotestvty.py,yes) |
| 67 | if test "x$OSMOTESTVTY_CHECK" != "xyes" ; then |
| 68 | AC_MSG_ERROR([Please install osmocom-python to run the vty tests.]) |
| 69 | fi |
| 70 | fi |
| 71 | AC_MSG_CHECKING([whether to enable VTY tests]) |
| 72 | AC_MSG_RESULT([$enable_vty_tests]) |
| 73 | AM_CONDITIONAL(ENABLE_VTY_TESTS, test "x$enable_vty_tests" = "xyes") |
| 74 | |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 75 | AC_OUTPUT( |
| 76 | src/Makefile |
Harald Welte | e405011 | 2013-01-11 17:49:22 +0100 | [diff] [blame] | 77 | examples/Makefile |
Holger Hans Peter Freyther | bb00704 | 2013-07-28 16:15:41 +0200 | [diff] [blame] | 78 | tests/Makefile |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 79 | Makefile) |