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 | |
Neels Hofmeyr | da66f71 | 2016-10-01 00:52:10 +0200 | [diff] [blame] | 22 | dnl check for pkg-config (explained in detail in libosmocore/configure.ac) |
| 23 | AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) |
| 24 | if test "x$PKG_CONFIG_INSTALLED" = "xno"; then |
| 25 | AC_MSG_WARN([You need to install pkg-config]) |
| 26 | fi |
| 27 | PKG_PROG_PKG_CONFIG([0.20]) |
| 28 | |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 29 | dnl checks for header files |
| 30 | AC_HEADER_STDC |
| 31 | |
| 32 | dnl Checks for typedefs, structures and compiler characteristics |
| 33 | |
| 34 | dnl checks for libraries |
| 35 | PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9) |
| 36 | PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) |
| 37 | PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3) |
Ivan Kluchnikov | ef7f28c | 2012-07-12 14:49:15 +0400 | [diff] [blame] | 38 | PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.1.4) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 39 | |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 40 | AC_MSG_CHECKING([whether to enable direct DSP access for PDCH of sysmocom-bts]) |
| 41 | AC_ARG_ENABLE(sysmocom-dsp, |
| 42 | AC_HELP_STRING([--enable-sysmocom-dsp], |
| 43 | [enable code for sysmocom DSP [default=no]]), |
Holger Hans Peter Freyther | 827ed55 | 2013-01-23 21:54:19 +0100 | [diff] [blame] | 44 | [enable_sysmocom_dsp="$enableval"],[enable_sysmocom_dsp="no"]) |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 45 | AC_MSG_RESULT([$enable_sysmocom_dsp]) |
| 46 | AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") |
| 47 | |
Yves Godin | 660709d | 2016-05-19 11:08:03 +0200 | [diff] [blame] | 48 | AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS]) |
| 49 | AC_ARG_ENABLE(lc15bts-phy, |
| 50 | AC_HELP_STRING([--enable-lc15bts-phy], |
| 51 | [enable code for Litecell 1.5 PHY [default=no]]), |
| 52 | [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"]) |
| 53 | AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])], |
| 54 | [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"]) |
| 55 | AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir) |
| 56 | AC_MSG_RESULT([$enable_lc15bts_phy]) |
| 57 | AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes") |
| 58 | if test "$enable_litecell15" = "yes"; then |
| 59 | oldCPPFLAGS=$CPPFLAGS |
| 60 | CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" |
| 61 | AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[], |
| 62 | [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])], |
| 63 | [#include <nrw/litecell15/litecell15.h>]) |
| 64 | CPPFLAGS=$oldCPPFLAGS |
| 65 | fi |
| 66 | |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 67 | AC_ARG_ENABLE([vty_tests], |
| 68 | AC_HELP_STRING([--enable-vty-tests], |
Ivan Kluchnikov | b6bb55d | 2013-04-24 15:53:25 +0400 | [diff] [blame] | 69 | [Include the VTY tests in make check [default=no]]), |
| 70 | [enable_vty_tests="$enableval"],[enable_vty_tests="no"]) |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 71 | if test "x$enable_vty_tests" = "xyes" ; then |
| 72 | AM_PATH_PYTHON |
| 73 | AC_CHECK_PROG(OSMOTESTVTY_CHECK,osmotestvty.py,yes) |
| 74 | if test "x$OSMOTESTVTY_CHECK" != "xyes" ; then |
| 75 | AC_MSG_ERROR([Please install osmocom-python to run the vty tests.]) |
| 76 | fi |
| 77 | fi |
| 78 | AC_MSG_CHECKING([whether to enable VTY tests]) |
| 79 | AC_MSG_RESULT([$enable_vty_tests]) |
| 80 | AM_CONDITIONAL(ENABLE_VTY_TESTS, test "x$enable_vty_tests" = "xyes") |
| 81 | |
Neels Hofmeyr | 6348aea | 2016-09-30 16:25:16 +0200 | [diff] [blame] | 82 | STD_DEFINES_AND_INCLUDES="-Wall" |
| 83 | AC_SUBST(STD_DEFINES_AND_INCLUDES) |
| 84 | |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 85 | AC_OUTPUT( |
Max | 727295f | 2017-03-08 11:58:57 +0100 | [diff] [blame^] | 86 | osmo-pcu.pc |
Harald Welte | 68fc127 | 2016-11-16 22:48:33 +0100 | [diff] [blame] | 87 | include/Makefile |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 88 | src/Makefile |
Harald Welte | e405011 | 2013-01-11 17:49:22 +0100 | [diff] [blame] | 89 | examples/Makefile |
Holger Hans Peter Freyther | bb00704 | 2013-07-28 16:15:41 +0200 | [diff] [blame] | 90 | tests/Makefile |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 91 | Makefile) |