2 m4_esyscmd([./git-version-gen .tarball-version]),
3 [openbsc@lists.osmocom.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
19 AC_CONFIG_MACRO_DIR([m4])
21 dnl checks for header files
23 AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
26 AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
29 AC_PATH_PROG(DOXYGEN,doxygen,false)
30 AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
32 # The following test is taken from WebKit's webkit.m4
33 saved_CFLAGS="$CFLAGS"
34 CFLAGS="$CFLAGS -fvisibility=hidden "
35 AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
36 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
37 [ AC_MSG_RESULT([yes])
38 SYMBOL_VISIBILITY="-fvisibility=hidden"],
40 CFLAGS="$saved_CFLAGS"
41 AC_SUBST(SYMBOL_VISIBILITY)
43 dnl Generate the output
44 AM_CONFIG_HEADER(config.h)
49 [Disable building talloc memory allocator]
51 [enable_talloc=$enableval], [enable_talloc="yes"])
52 AM_CONDITIONAL(ENABLE_TALLOC, [test x"$enable_talloc" = x"yes"])
57 [Disable support for dlopen plugins],
59 [enable_plugin=$enableval], [enable_plugin="yes"])
60 AM_CONDITIONAL(ENABLE_PLUGIN, test x"$enable_plugin" = x"yes")
65 [Disable building test programs]
67 [enable_tests=$enableval], [enable_tests="yes"])
68 AM_CONDITIONAL(ENABLE_TESTS, test x"$enable_tests" = x"yes")
73 [Disable building VTY telnet interface]
75 [enable_vty=$enableval], [enable_vty="yes"])
76 AM_CONDITIONAL(ENABLE_VTY, test x"$enable_vty" = x"yes")
78 AC_ARG_ENABLE(panic_infloop,
80 [--enable-panic-infloop],
81 [Trigger infinite loop on panic rather than fprintf/abort]
83 [panic_infloop=$enableval], [panic_infloop="no"])
84 if test x"$panic_infloop" = x"yes"
86 AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
89 AC_ARG_ENABLE(bsc_fd_check,
91 [--enable-bsc-fd-check],
92 [Instrument bsc_register_fd to check that the fd is registered]
94 [fd_check=$enableval], [fd_check="no"])
95 if test x"$fd_check" = x"no"
97 AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd])
100 AC_ARG_ENABLE(msgfile,
103 [Disable support for the msgfile],
105 [enable_msgfile=$enableval], [enable_msgfile="yes"])
106 AM_CONDITIONAL(ENABLE_MSGFILE, test x"$enable_msgfile" = x"yes")
108 AC_ARG_ENABLE(serial,
111 [Disable support for the serial helpers],
113 [enable_serial=$enableval], [enable_serial="yes"])
114 AM_CONDITIONAL(ENABLE_SERIAL, test x"$enable_serial" = x"yes")
116 AC_ARG_ENABLE(utilities,
118 [--disable-utilities],
119 [Disable building utility programs],
121 [enable_utilities=$enableval], [enable_utilities="yes"])
122 AM_CONDITIONAL(ENABLE_UTILITIES, test x"$enable_utilities" = x"yes")
124 AC_ARG_ENABLE(embedded,
127 [Enable building for embedded use and disable unsupported features]
129 [embedded=$enableval], [embedded="no"])
130 if test x"$embedded" = x"yes"
132 AC_DEFINE([EMBEDDED],[1],[Select building for embedded use])
133 AM_CONDITIONAL(ENABLE_TESTS, false)
134 AM_CONDITIONAL(ENABLE_PLUGIN, false)
135 AM_CONDITIONAL(ENABLE_MSGFILE, false)
136 AM_CONDITIONAL(ENABLE_SERIAL, false)
137 AM_CONDITIONAL(ENABLE_VTY, false)
138 AM_CONDITIONAL(ENABLE_TALLOC, false)
139 AM_CONDITIONAL(ENABLE_UTILITIES, false)
140 AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
149 include/osmocom/Makefile
150 include/osmocom/vty/Makefile
151 include/osmocom/codec/Makefile
152 include/osmocom/crypt/Makefile
153 include/osmocom/gsm/Makefile
154 include/osmocom/gsm/protocol/Makefile
155 include/osmocom/core/Makefile
164 tests/msgfile/Makefile
172 tests/gsm0808/Makefile