blob: e3e178c02ec78f92a148657515c66edf0a92c1f9 [file] [log] [blame]
Harald Welte4cd3d8a2010-03-23 00:30:19 +08001AC_INIT([libosmocore],
2 m4_esyscmd([./git-version-gen .tarball-version]),
3 [openbsc-devel@lists.openbsc.org])
Harald Welte3cae0392010-02-20 21:09:24 +01004
Harald Welte4cd3d8a2010-03-23 00:30:19 +08005AM_INIT_AUTOMAKE([dist-bzip2])
Harald Welte3cae0392010-02-20 21:09:24 +01006
7dnl kernel style compile messages
8m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9
10dnl checks for programs
11AC_PROG_MAKE_SET
12AC_PROG_CC
13AC_PROG_INSTALL
Harald Welte4cd3d8a2010-03-23 00:30:19 +080014LT_INIT
Harald Welte3cae0392010-02-20 21:09:24 +010015AC_PROG_LIBTOOL
16
Harald Welte4cd3d8a2010-03-23 00:30:19 +080017AC_CONFIG_MACRO_DIR([m4])
18
Harald Welte3cae0392010-02-20 21:09:24 +010019dnl checks for header files
20AC_HEADER_STDC
21AC_CHECK_HEADERS(execinfo.h sys/select.h)
22
23# The following test is taken from WebKit's webkit.m4
24saved_CFLAGS="$CFLAGS"
25CFLAGS="$CFLAGS -fvisibility=hidden "
26AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
27AC_COMPILE_IFELSE([char foo;],
28 [ AC_MSG_RESULT([yes])
29 SYMBOL_VISIBILITY="-fvisibility=hidden"],
30 AC_MSG_RESULT([no]))
31CFLAGS="$saved_CFLAGS"
32AC_SUBST(SYMBOL_VISIBILITY)
33
34dnl Generate the output
35AM_CONFIG_HEADER(config.h)
36
Harald Weltecbb29f72010-03-07 20:24:30 +010037AC_ARG_ENABLE(talloc,
Harald Weltef8b2ba72010-03-07 20:33:59 +010038 [ --disable-talloc Disable building talloc memory allocator ],
Harald Weltecbb29f72010-03-07 20:24:30 +010039 [enable_talloc=0], [enable_talloc=1])
Harald Weltecbb29f72010-03-07 20:24:30 +010040AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1")
41
Harald Welteb9ce51c2010-06-30 19:43:11 +020042AC_ARG_ENABLE(plugin,
43 [ --disable-plugin Disable support for dlopen plugins ],
44 [enable_plugin=0], [enable_plugin=1])
45AM_CONDITIONAL(ENABLE_PLUGIN, test "x$enable_plugin" = "x1")
46
Harald Weltef8b2ba72010-03-07 20:33:59 +010047AC_ARG_ENABLE(tests,
48 [ --disable-tests Disable building test programs ],
49 [enable_tests=0], [enable_tests=1])
50AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1")
51
Harald Welte1067e8c2010-06-25 03:00:58 +020052AC_ARG_ENABLE(vty,
Harald Welte54403772010-05-29 11:49:51 +020053 [ --disable-vty Disable building VTY telnet interface ],
54 [enable_vty=0], [enable_vty=1])
55AM_CONDITIONAL(ENABLE_VTY, test "x$enable_vty" = "x1")
56
57
Harald Welte3cae0392010-02-20 21:09:24 +010058AC_OUTPUT(
59 libosmocore.pc
Harald Weltee352c522010-05-19 19:42:32 +020060 libosmovty.pc
Harald Welte3fb0b6f2010-05-19 19:02:52 +020061 include/osmocom/Makefile
62 include/osmocom/vty/Makefile
Harald Welteb9ce51c2010-06-30 19:43:11 +020063 include/osmocom/crypt/Makefile
Harald Welte3cae0392010-02-20 21:09:24 +010064 include/osmocore/Makefile
65 include/osmocore/protocol/Makefile
66 include/Makefile
67 src/Makefile
Harald Welte3fb0b6f2010-05-19 19:02:52 +020068 src/vty/Makefile
Harald Welte3cae0392010-02-20 21:09:24 +010069 tests/Makefile
70 tests/timer/Makefile
71 tests/sms/Makefile
72 Makefile)