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 |
Harald Welte | e476442 | 2011-05-22 12:25:57 +0200 | [diff] [blame] | 21 | AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h) |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 22 | |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame^] | 23 | AC_PATH_PROG(DOXYGEN,doxygen,false) |
| 24 | AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false) |
| 25 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 26 | # The following test is taken from WebKit's webkit.m4 |
| 27 | saved_CFLAGS="$CFLAGS" |
| 28 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 29 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
Alexander Huemer | 3d79f53 | 2011-05-24 15:16:13 +0200 | [diff] [blame] | 30 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 31 | [ AC_MSG_RESULT([yes]) |
| 32 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 33 | AC_MSG_RESULT([no])) |
| 34 | CFLAGS="$saved_CFLAGS" |
| 35 | AC_SUBST(SYMBOL_VISIBILITY) |
| 36 | |
| 37 | dnl Generate the output |
| 38 | AM_CONFIG_HEADER(config.h) |
| 39 | |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 40 | AC_ARG_ENABLE(talloc, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 41 | [AS_HELP_STRING( |
| 42 | [--disable-talloc], |
| 43 | [Disable building talloc memory allocator] |
| 44 | )], |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 45 | [enable_talloc=0], [enable_talloc=1]) |
Harald Welte | cbb29f7 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 46 | AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1") |
| 47 | |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 48 | AC_ARG_ENABLE(plugin, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 49 | [AS_HELP_STRING( |
| 50 | [--disable-plugin], |
| 51 | [Disable support for dlopen plugins], |
| 52 | )], |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 53 | [enable_plugin=0], [enable_plugin=1]) |
| 54 | AM_CONDITIONAL(ENABLE_PLUGIN, test "x$enable_plugin" = "x1") |
| 55 | |
Harald Welte | f8b2ba7 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 56 | AC_ARG_ENABLE(tests, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 57 | [AS_HELP_STRING( |
| 58 | [--disable-tests], |
| 59 | [Disable building test programs] |
| 60 | )], |
Harald Welte | f8b2ba7 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 61 | [enable_tests=0], [enable_tests=1]) |
| 62 | AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1") |
| 63 | |
Harald Welte | 1067e8c | 2010-06-25 03:00:58 +0200 | [diff] [blame] | 64 | AC_ARG_ENABLE(vty, |
Sylvain Munaut | f23abab | 2010-07-25 16:16:42 +0200 | [diff] [blame] | 65 | [AS_HELP_STRING( |
| 66 | [--disable-vty], |
| 67 | [Disable building VTY telnet interface] |
| 68 | )], |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 69 | [enable_vty=0], [enable_vty=1]) |
| 70 | AM_CONDITIONAL(ENABLE_VTY, test "x$enable_vty" = "x1") |
| 71 | |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 72 | AC_ARG_ENABLE(panic_infloop, |
| 73 | [AS_HELP_STRING( |
| 74 | [--enable-panic-infloop], |
| 75 | [Trigger infinite loop on panic rather than fprintf/abort] |
| 76 | )], |
| 77 | [panic_infloop=1], [panic_infloop=0]) |
| 78 | if test "x$panic_infloop" = "x1" |
| 79 | then |
| 80 | AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) |
| 81 | fi |
| 82 | |
Holger Hans Peter Freyther | 4355831 | 2010-08-06 06:48:43 +0800 | [diff] [blame] | 83 | AC_ARG_ENABLE(bsc_fd_check, |
| 84 | [AS_HELP_STRING( |
| 85 | [--enable-bsc-fd-check], |
| 86 | [Instrument bsc_register_fd to check that the fd is registered] |
| 87 | )], |
| 88 | [fd_check=1], [fd_check=0]) |
| 89 | if test "x$fd_check" = "x1" |
| 90 | then |
| 91 | AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd]) |
| 92 | fi |
| 93 | |
Holger Hans Peter Freyther | c87f266 | 2010-10-07 00:00:15 +0800 | [diff] [blame] | 94 | AC_ARG_ENABLE(msgfile, |
| 95 | [AS_HELP_STRING( |
| 96 | [--disable-msgfile], |
| 97 | [Disable support for the msgfile], |
| 98 | )], |
| 99 | [enable_msgfile=0], [enable_msgfile=1]) |
| 100 | AM_CONDITIONAL(ENABLE_MSGFILE, test "x$enable_msgfile" = "x1") |
| 101 | |
Harald Welte | 5440377 | 2010-05-29 11:49:51 +0200 | [diff] [blame] | 102 | |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 103 | AC_OUTPUT( |
| 104 | libosmocore.pc |
Sylvain Munaut | b99b930 | 2010-10-24 18:23:10 +0200 | [diff] [blame] | 105 | libosmocodec.pc |
Harald Welte | e352c52 | 2010-05-19 19:42:32 +0200 | [diff] [blame] | 106 | libosmovty.pc |
Pablo Neira Ayuso | fba495e | 2011-03-23 18:08:08 +0100 | [diff] [blame] | 107 | libosmogsm.pc |
Harald Welte | 3fb0b6f | 2010-05-19 19:02:52 +0200 | [diff] [blame] | 108 | include/osmocom/Makefile |
| 109 | include/osmocom/vty/Makefile |
Sylvain Munaut | b99b930 | 2010-10-24 18:23:10 +0200 | [diff] [blame] | 110 | include/osmocom/codec/Makefile |
Harald Welte | b9ce51c | 2010-06-30 19:43:11 +0200 | [diff] [blame] | 111 | include/osmocom/crypt/Makefile |
Pablo Neira Ayuso | 8341934 | 2011-03-22 16:36:13 +0100 | [diff] [blame] | 112 | include/osmocom/gsm/Makefile |
| 113 | include/osmocom/gsm/protocol/Makefile |
| 114 | include/osmocom/core/Makefile |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 115 | include/Makefile |
| 116 | src/Makefile |
Harald Welte | 3fb0b6f | 2010-05-19 19:02:52 +0200 | [diff] [blame] | 117 | src/vty/Makefile |
Sylvain Munaut | 1a4ea5b | 2010-10-08 15:09:16 +0200 | [diff] [blame] | 118 | src/codec/Makefile |
Pablo Neira Ayuso | fba495e | 2011-03-23 18:08:08 +0100 | [diff] [blame] | 119 | src/gsm/Makefile |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 120 | tests/Makefile |
| 121 | tests/timer/Makefile |
| 122 | tests/sms/Makefile |
Holger Hans Peter Freyther | c87f266 | 2010-10-07 00:00:15 +0800 | [diff] [blame] | 123 | tests/msgfile/Makefile |
Holger Hans Peter Freyther | daa653f | 2010-10-11 07:56:06 +0200 | [diff] [blame] | 124 | tests/ussd/Makefile |
Holger Hans Peter Freyther | e05c7df | 2010-12-29 11:57:48 +0100 | [diff] [blame] | 125 | tests/smscb/Makefile |
Harald Welte | eeb78dd | 2011-08-02 13:44:54 +0200 | [diff] [blame] | 126 | utils/Makefile |
Harald Welte | 49e1056 | 2011-08-17 19:21:07 +0200 | [diff] [blame] | 127 | Doxyfile |
| 128 | Doxyfile.gsm |
| 129 | Doxyfile.vty |
| 130 | Doxyfile.codec |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 131 | Makefile) |