blob: abf7bf47797607319b777ee13d7af382e1cc663b [file] [log] [blame]
Harald Welte3cae0392010-02-20 21:09:24 +01001AC_INIT
2
3AM_INIT_AUTOMAKE(libosmocore, 0.0alpha1)
4
5dnl kernel style compile messages
6m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7
8dnl checks for programs
9AC_PROG_MAKE_SET
10AC_PROG_CC
11AC_PROG_INSTALL
12AC_PROG_RANLIB
13AC_PROG_LIBTOOL
14
15dnl checks for header files
16AC_HEADER_STDC
17AC_CHECK_HEADERS(execinfo.h sys/select.h)
18
19# The following test is taken from WebKit's webkit.m4
20saved_CFLAGS="$CFLAGS"
21CFLAGS="$CFLAGS -fvisibility=hidden "
22AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
23AC_COMPILE_IFELSE([char foo;],
24 [ AC_MSG_RESULT([yes])
25 SYMBOL_VISIBILITY="-fvisibility=hidden"],
26 AC_MSG_RESULT([no]))
27CFLAGS="$saved_CFLAGS"
28AC_SUBST(SYMBOL_VISIBILITY)
29
30dnl Generate the output
31AM_CONFIG_HEADER(config.h)
32
Harald Weltecbb29f72010-03-07 20:24:30 +010033AC_ARG_ENABLE(talloc,
Harald Weltef8b2ba72010-03-07 20:33:59 +010034 [ --disable-talloc Disable building talloc memory allocator ],
Harald Weltecbb29f72010-03-07 20:24:30 +010035 [enable_talloc=0], [enable_talloc=1])
Harald Weltecbb29f72010-03-07 20:24:30 +010036AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1")
37
Harald Weltef8b2ba72010-03-07 20:33:59 +010038AC_ARG_ENABLE(tests,
39 [ --disable-tests Disable building test programs ],
40 [enable_tests=0], [enable_tests=1])
41AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1")
42
Harald Welte3cae0392010-02-20 21:09:24 +010043AC_OUTPUT(
44 libosmocore.pc
45 include/osmocore/Makefile
46 include/osmocore/protocol/Makefile
47 include/Makefile
48 src/Makefile
49 tests/Makefile
50 tests/timer/Makefile
51 tests/sms/Makefile
52 Makefile)