add gsm48_decode_lai() to map file
[osmocom-bb.git] / configure.ac
blob3e88a1b0dcdde232b359e04b4f8ec67e5d95b640
1 AC_INIT([libosmocore],
2         m4_esyscmd([./git-version-gen .tarball-version]),
3         [openbsc@lists.osmocom.org])
5 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6])
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
12 AC_PROG_MAKE_SET
13 AC_PROG_MKDIR_P
14 AC_PROG_CC
15 AC_PROG_INSTALL
16 LT_INIT([pic-only])
18 AC_CONFIG_MACRO_DIR([m4])
20 dnl checks for header files
21 AC_HEADER_STDC
22 AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
23 # for src/conv.c
24 AC_FUNC_ALLOCA
25 AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
26 AC_SUBST(LIBRARY_DL)
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"],
38         AC_MSG_RESULT([no]))
39 CFLAGS="$saved_CFLAGS"
40 AC_SUBST(SYMBOL_VISIBILITY)
42 dnl Generate the output
43 AM_CONFIG_HEADER(config.h)
45 AC_ARG_ENABLE(talloc,
46         [AS_HELP_STRING(
47                 [--disable-talloc],
48                 [Disable building talloc memory allocator]
49         )],
50         [enable_talloc=$enableval], [enable_talloc="yes"])
51 AM_CONDITIONAL(ENABLE_TALLOC, [test x"$enable_talloc" = x"yes"])
53 AC_ARG_ENABLE(plugin,
54         [AS_HELP_STRING(
55                 [--disable-plugin],
56                 [Disable support for dlopen plugins],
57         )],
58         [enable_plugin=$enableval], [enable_plugin="yes"])
59 AM_CONDITIONAL(ENABLE_PLUGIN, test x"$enable_plugin" = x"yes")
61 AC_ARG_ENABLE(vty,
62         [AS_HELP_STRING(
63                 [--disable-vty],
64                 [Disable building VTY telnet interface]
65         )],
66         [enable_vty=$enableval], [enable_vty="yes"])
67 AM_CONDITIONAL(ENABLE_VTY, test x"$enable_vty" = x"yes")
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=$enableval], [panic_infloop="no"])
75 if test x"$panic_infloop" = x"yes"
76 then
77         AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
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=$enableval], [fd_check="no"])
86 if test x"$fd_check" = x"no"
87 then
88         AC_DEFINE([BSC_FD_CHECK],[1],[Instrument the bsc_register_fd])
91 AC_ARG_ENABLE(msgfile,
92         [AS_HELP_STRING(
93                 [--disable-msgfile],
94                 [Disable support for the msgfile],
95         )],
96         [enable_msgfile=$enableval], [enable_msgfile="yes"])
97 AM_CONDITIONAL(ENABLE_MSGFILE, test x"$enable_msgfile" = x"yes")
99 AC_ARG_ENABLE(serial,
100         [AS_HELP_STRING(
101                 [--disable-serial],
102                 [Disable support for the serial helpers],
103         )],
104         [enable_serial=$enableval], [enable_serial="yes"])
105 AM_CONDITIONAL(ENABLE_SERIAL, test x"$enable_serial" = x"yes")
107 AC_ARG_ENABLE(utilities,
108         [AS_HELP_STRING(
109                 [--disable-utilities],
110                 [Disable building utility programs],
111         )],
112         [enable_utilities=$enableval], [enable_utilities="yes"])
113 AM_CONDITIONAL(ENABLE_UTILITIES, test x"$enable_utilities" = x"yes")
115 AC_ARG_ENABLE(embedded,
116         [AS_HELP_STRING(
117                 [--enable-embedded],
118                 [Enable building for embedded use and disable unsupported features]
119         )],
120         [embedded=$enableval], [embedded="no"])
121 if test x"$embedded" = x"yes"
122 then
123         AC_DEFINE([EMBEDDED],[1],[Select building for embedded use])
124         AM_CONDITIONAL(ENABLE_PLUGIN, false)
125         AM_CONDITIONAL(ENABLE_MSGFILE, false)
126         AM_CONDITIONAL(ENABLE_SERIAL, false)
127         AM_CONDITIONAL(ENABLE_VTY, false)
128         AM_CONDITIONAL(ENABLE_TALLOC, false)
129         AM_CONDITIONAL(ENABLE_UTILITIES, false)
130         AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
134 AC_OUTPUT(
135         libosmocore.pc
136         libosmocodec.pc
137         libosmovty.pc
138         libosmogsm.pc
139         libosmogb.pc
140         include/Makefile
141         src/Makefile
142         src/vty/Makefile
143         src/codec/Makefile
144         src/gsm/Makefile
145         src/gb/Makefile
146         tests/Makefile
147         utils/Makefile
148         Doxyfile.core
149         Doxyfile.gsm
150         Doxyfile.vty
151         Doxyfile.codec
152         Makefile)