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]), |
Harald Welte | 477e79e | 2012-06-18 12:21:03 +0800 | [diff] [blame] | 4 | [osmocom-pcu@lists.osmocom.org]) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 5 | |
| 6 | AM_INIT_AUTOMAKE([dist-bzip2]) |
| 7 | |
| 8 | dnl kernel style compile messages |
| 9 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 10 | |
| 11 | dnl checks for programs |
| 12 | AC_PROG_MAKE_SET |
| 13 | AC_PROG_CC |
| 14 | AC_PROG_CXX |
| 15 | AC_PROG_INSTALL |
| 16 | LT_INIT |
| 17 | |
| 18 | dnl checks for header files |
| 19 | AC_HEADER_STDC |
| 20 | |
| 21 | dnl Checks for typedefs, structures and compiler characteristics |
| 22 | |
| 23 | dnl checks for libraries |
| 24 | PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9) |
| 25 | PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) |
| 26 | PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3) |
Ivan Kluchnikov | ef7f28c | 2012-07-12 14:49:15 +0400 | [diff] [blame] | 27 | PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.1.4) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 28 | |
| 29 | AC_MSG_CHECKING([whether to enable sysmocom-bts hardware support]) |
| 30 | AC_ARG_ENABLE(sysmocom-bts, |
| 31 | AC_HELP_STRING([--enable-sysmocom-bts], |
| 32 | [enable code for sysmocom femto-bts [default=no]]), |
Holger Hans Peter Freyther | 827ed55 | 2013-01-23 21:54:19 +0100 | [diff] [blame] | 33 | [enable_sysmocom_bts="$enableval"],[enable_sysmocom_bts="no"]) |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 34 | AC_MSG_RESULT([$enable_sysmocom_bts]) |
| 35 | AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes") |
| 36 | |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 37 | AC_MSG_CHECKING([whether to enable direct DSP access for PDCH of sysmocom-bts]) |
| 38 | AC_ARG_ENABLE(sysmocom-dsp, |
| 39 | AC_HELP_STRING([--enable-sysmocom-dsp], |
| 40 | [enable code for sysmocom DSP [default=no]]), |
Holger Hans Peter Freyther | 827ed55 | 2013-01-23 21:54:19 +0100 | [diff] [blame] | 41 | [enable_sysmocom_dsp="$enableval"],[enable_sysmocom_dsp="no"]) |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 42 | AC_MSG_RESULT([$enable_sysmocom_dsp]) |
| 43 | AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") |
| 44 | |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 45 | AC_ARG_ENABLE([vty_tests], |
| 46 | AC_HELP_STRING([--enable-vty-tests], |
Ivan Kluchnikov | b6bb55d | 2013-04-24 15:53:25 +0400 | [diff] [blame^] | 47 | [Include the VTY tests in make check [default=no]]), |
| 48 | [enable_vty_tests="$enableval"],[enable_vty_tests="no"]) |
Kat | 7dac486 | 2013-04-05 21:44:46 +0200 | [diff] [blame] | 49 | if test "x$enable_vty_tests" = "xyes" ; then |
| 50 | AM_PATH_PYTHON |
| 51 | AC_CHECK_PROG(OSMOTESTVTY_CHECK,osmotestvty.py,yes) |
| 52 | if test "x$OSMOTESTVTY_CHECK" != "xyes" ; then |
| 53 | AC_MSG_ERROR([Please install osmocom-python to run the vty tests.]) |
| 54 | fi |
| 55 | fi |
| 56 | AC_MSG_CHECKING([whether to enable VTY tests]) |
| 57 | AC_MSG_RESULT([$enable_vty_tests]) |
| 58 | AM_CONDITIONAL(ENABLE_VTY_TESTS, test "x$enable_vty_tests" = "xyes") |
| 59 | |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 60 | AC_OUTPUT( |
| 61 | src/Makefile |
Harald Welte | e405011 | 2013-01-11 17:49:22 +0100 | [diff] [blame] | 62 | examples/Makefile |
Harald Welte | 57f6b02 | 2012-06-14 21:05:44 +0800 | [diff] [blame] | 63 | Makefile) |