2 m4_esyscmd([./git-version-gen .tarball-version]),
3 [openbsc-devel@lists.openbsc.org])
5 AM_INIT_AUTOMAKE([dist-bzip2])
6 AC_CONFIG_TESTDIR(tests)
8 dnl kernel style compile messages
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11 dnl checks for programs
18 AC_CONFIG_MACRO_DIR([m4])
20 dnl checks for header files
22 AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
25 AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
28 AC_PATH_PROG(DOXYGEN,doxygen,false)
29 AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
31 # The following test is taken from WebKit's webkit.m4
32 saved_CFLAGS="$CFLAGS"
33 CFLAGS="$CFLAGS -fvisibility=hidden "
34 AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
35 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
36 [ AC_MSG_RESULT([yes])
37 SYMBOL_VISIBILITY="-fvisibility=hidden"],
39 CFLAGS="$saved_CFLAGS"
40 AC_SUBST(SYMBOL_VISIBILITY)
42 dnl Generate the output
43 AM_CONFIG_HEADER(config.h)
48 [Disable building talloc memory allocator]
50 [enable_talloc=$enableval], [enable_talloc="yes"])
51 AM_CONDITIONAL(ENABLE_TALLOC, [test x"$enable_talloc" = x"yes"])
56 [Disable support for dlopen plugins],
58 [enable_plugin=$enableval], [enable_plugin="yes"])
59 AM_CONDITIONAL(ENABLE_PLUGIN, test x"$enable_plugin" = x"yes")
64 [Disable building test programs]
66 [enable_tests=$enableval], [enable_tests="yes"])
67 AM_CONDITIONAL(ENABLE_TESTS, test x"$enable_tests" = x"yes")
72 [Disable building VTY telnet interface]
74 [enable_vty=$enableval], [enable_vty="yes"])
75 AM_CONDITIONAL(ENABLE_VTY, test x"$enable_vty" = x"yes")
77 AC_ARG_ENABLE(panic_infloop,
79 [--enable-panic-infloop],
80 [Trigger infinite loop on panic rather than fprintf/abort]
82 [panic_infloop=$enableval], [panic_infloop="no"])
83 if test x"$panic_infloop" = x"yes"
85 AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
88 AC_ARG_ENABLE(bsc_fd_check,
90 [--enable-bsc-fd-check],
91 [Instrument bsc_register_fd to check that the fd is registered]
93 [fd_check=$enableval], [fd_check="no"])
94 if test x"$fd_check" = x"no"
96 AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd])
99 AC_ARG_ENABLE(msgfile,
102 [Disable support for the msgfile],
104 [enable_msgfile=$enableval], [enable_msgfile="yes"])
105 AM_CONDITIONAL(ENABLE_MSGFILE, test x"$enable_msgfile" = x"yes")
107 AC_ARG_ENABLE(serial,
110 [Disable support for the serial helpers],
112 [enable_serial=$enableval], [enable_serial="yes"])
113 AM_CONDITIONAL(ENABLE_SERIAL, test x"$enable_serial" = x"yes")
115 AC_ARG_ENABLE(utilities,
117 [--disable-utilities],
118 [Disable building utility programs],
120 [enable_utilities=$enableval], [enable_utilities="yes"])
121 AM_CONDITIONAL(ENABLE_UTILITIES, test x"$enable_utilities" = x"yes")
123 AC_ARG_ENABLE(embedded,
126 [Enable building for embedded use and disable unsupported features]
128 [embedded=$enableval], [embedded="no"])
129 if test x"$embedded" = x"yes"
131 AC_DEFINE([EMBEDDED],[1],[Select building for embedded use])
132 AM_CONDITIONAL(ENABLE_TESTS, false)
133 AM_CONDITIONAL(ENABLE_PLUGIN, false)
134 AM_CONDITIONAL(ENABLE_MSGFILE, false)
135 AM_CONDITIONAL(ENABLE_SERIAL, false)
136 AM_CONDITIONAL(ENABLE_VTY, false)
137 AM_CONDITIONAL(ENABLE_TALLOC, false)
138 AM_CONDITIONAL(ENABLE_UTILITIES, false)
139 AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
148 include/osmocom/Makefile
149 include/osmocom/vty/Makefile
150 include/osmocom/codec/Makefile
151 include/osmocom/crypt/Makefile
152 include/osmocom/gsm/Makefile
153 include/osmocom/gsm/protocol/Makefile
154 include/osmocom/core/Makefile
163 tests/msgfile/Makefile
171 tests/gsm0808/Makefile