blob: abf098ccb87b246a731f2a58c124fa084a3c52d0 [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 Weltef8b2ba72010-03-07 20:33:59 +010042AC_ARG_ENABLE(tests,
43 [ --disable-tests Disable building test programs ],
44 [enable_tests=0], [enable_tests=1])
45AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1")
46
Harald Welte3cae0392010-02-20 21:09:24 +010047AC_OUTPUT(
48 libosmocore.pc
Harald Welte3fb0b6f2010-05-19 19:02:52 +020049 include/osmocom/Makefile
50 include/osmocom/vty/Makefile
Harald Welte3cae0392010-02-20 21:09:24 +010051 include/osmocore/Makefile
52 include/osmocore/protocol/Makefile
53 include/Makefile
54 src/Makefile
Harald Welte3fb0b6f2010-05-19 19:02:52 +020055 src/vty/Makefile
Harald Welte3cae0392010-02-20 21:09:24 +010056 tests/Makefile
57 tests/timer/Makefile
58 tests/sms/Makefile
59 Makefile)