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