Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 1 | AC_INIT([libosmocore], |
| 2 | m4_esyscmd([./git-version-gen .tarball-version]), |
| 3 | [openbsc-devel@lists.openbsc.org]) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 4 | |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 5 | AM_INIT_AUTOMAKE([dist-bzip2]) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 6 | |
| 7 | dnl kernel style compile messages |
| 8 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 9 | |
| 10 | dnl checks for programs |
| 11 | AC_PROG_MAKE_SET |
| 12 | AC_PROG_CC |
| 13 | AC_PROG_INSTALL |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 14 | LT_INIT |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 15 | AC_PROG_LIBTOOL |
| 16 | |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 17 | AC_CONFIG_MACRO_DIR([m4]) |
| 18 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 19 | dnl checks for header files |
| 20 | AC_HEADER_STDC |
| 21 | AC_CHECK_HEADERS(execinfo.h sys/select.h) |
| 22 | |
| 23 | # The following test is taken from WebKit's webkit.m4 |
| 24 | saved_CFLAGS="$CFLAGS" |
| 25 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 26 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
| 27 | AC_COMPILE_IFELSE([char foo;], |
| 28 | [ AC_MSG_RESULT([yes]) |
| 29 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 30 | AC_MSG_RESULT([no])) |
| 31 | CFLAGS="$saved_CFLAGS" |
| 32 | AC_SUBST(SYMBOL_VISIBILITY) |
| 33 | |
| 34 | dnl Generate the output |
| 35 | AM_CONFIG_HEADER(config.h) |
| 36 | |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 37 | AC_ARG_ENABLE(talloc, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 38 | [AS_HELP_STRING( |
| 39 | [--disable-talloc], |
| 40 | [Disable building talloc memory allocator] |
| 41 | )], |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 42 | [enable_talloc=0], [enable_talloc=1]) |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 43 | AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1") |
| 44 | |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 45 | AC_ARG_ENABLE(plugin, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 46 | [AS_HELP_STRING( |
| 47 | [--disable-plugin], |
| 48 | [Disable support for dlopen plugins], |
| 49 | )], |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 50 | [enable_plugin=0], [enable_plugin=1]) |
| 51 | AM_CONDITIONAL(ENABLE_PLUGIN, test "x$enable_plugin" = "x1") |
| 52 | |
Harald Welte | f8b2ba7 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 53 | AC_ARG_ENABLE(tests, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 54 | [AS_HELP_STRING( |
| 55 | [--disable-tests], |
| 56 | [Disable building test programs] |
| 57 | )], |
Harald Welte | f8b2ba7 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 58 | [enable_tests=0], [enable_tests=1]) |
| 59 | AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1") |
| 60 | |
Harald Welte | 1067e8c | 2010-06-25 03:00:58 +0200 | [diff] [blame] | 61 | AC_ARG_ENABLE(vty, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 62 | [AS_HELP_STRING( |
| 63 | [--disable-vty], |
| 64 | [Disable building VTY telnet interface] |
| 65 | )], |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 66 | [enable_vty=0], [enable_vty=1]) |
| 67 | AM_CONDITIONAL(ENABLE_VTY, test "x$enable_vty" = "x1") |
| 68 | |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 69 | AC_ARG_ENABLE(panic_infloop, |
| 70 | [AS_HELP_STRING( |
| 71 | [--enable-panic-infloop], |
| 72 | [Trigger infinite loop on panic rather than fprintf/abort] |
| 73 | )], |
| 74 | [panic_infloop=1], [panic_infloop=0]) |
| 75 | if test "x$panic_infloop" = "x1" |
| 76 | then |
| 77 | AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) |
| 78 | fi |
| 79 | |
Holger Hans Peter Freyther | 4355831 | 2010-08-06 06:48:43 +0800 | [diff] [blame] | 80 | AC_ARG_ENABLE(bsc_fd_check, |
| 81 | [AS_HELP_STRING( |
| 82 | [--enable-bsc-fd-check], |
| 83 | [Instrument bsc_register_fd to check that the fd is registered] |
| 84 | )], |
| 85 | [fd_check=1], [fd_check=0]) |
| 86 | if test "x$fd_check" = "x1" |
| 87 | then |
| 88 | AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd]) |
| 89 | fi |
| 90 | |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 91 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 92 | AC_OUTPUT( |
| 93 | libosmocore.pc |
Harald Welte | e352c52 | 2010-05-19 19:42:32 +0200 | [diff] [blame] | 94 | libosmovty.pc |
Harald Welte | 3fb0b6f | 2010-05-19 19:02:52 +0200 | [diff] [blame] | 95 | include/osmocom/Makefile |
| 96 | include/osmocom/vty/Makefile |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 97 | include/osmocom/crypt/Makefile |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 98 | include/osmocore/Makefile |
| 99 | include/osmocore/protocol/Makefile |
| 100 | include/Makefile |
| 101 | src/Makefile |
Harald Welte | 3fb0b6f | 2010-05-19 19:02:52 +0200 | [diff] [blame] | 102 | src/vty/Makefile |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 103 | tests/Makefile |
| 104 | tests/timer/Makefile |
| 105 | tests/sms/Makefile |
| 106 | Makefile) |