Harald Welte | 8abda69 | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 1 | AC_INIT([libosmocore], |
| 2 | m4_esyscmd([./git-version-gen .tarball-version]), |
| 3 | [openbsc-devel@lists.openbsc.org]) |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 4 | |
Harald Welte | 8abda69 | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 5 | AM_INIT_AUTOMAKE([dist-bzip2]) |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 6 | |
| 7 | dnl kernel style compile messages |
| 8 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 9 | |
| 10 | dnl checks for programs |
| 11 | AC_PROG_MAKE_SET |
| 12 | AC_PROG_CC |
| 13 | AC_PROG_INSTALL |
Harald Welte | 8abda69 | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 14 | LT_INIT |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 15 | AC_PROG_LIBTOOL |
| 16 | |
Harald Welte | 8abda69 | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 17 | AC_CONFIG_MACRO_DIR([m4]) |
| 18 | |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 19 | dnl checks for header files |
| 20 | AC_HEADER_STDC |
| 21 | AC_CHECK_HEADERS(execinfo.h sys/select.h) |
| 22 | |
| 23 | # The following test is taken from WebKit's webkit.m4 |
| 24 | saved_CFLAGS="$CFLAGS" |
| 25 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 26 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
| 27 | AC_COMPILE_IFELSE([char foo;], |
| 28 | [ AC_MSG_RESULT([yes]) |
| 29 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 30 | AC_MSG_RESULT([no])) |
| 31 | CFLAGS="$saved_CFLAGS" |
| 32 | AC_SUBST(SYMBOL_VISIBILITY) |
| 33 | |
| 34 | dnl Generate the output |
| 35 | AM_CONFIG_HEADER(config.h) |
| 36 | |
Harald Welte | 4fb31e2 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 37 | AC_ARG_ENABLE(talloc, |
Harald Welte | cf18189 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 38 | [ --disable-talloc Disable building talloc memory allocator ], |
Harald Welte | 4fb31e2 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 39 | [enable_talloc=0], [enable_talloc=1]) |
Harald Welte | 4fb31e2 | 2010-03-07 20:24:30 +0100 | [diff] [blame] | 40 | AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1") |
| 41 | |
Harald Welte | cf18189 | 2010-03-07 20:33:59 +0100 | [diff] [blame] | 42 | AC_ARG_ENABLE(tests, |
| 43 | [ --disable-tests Disable building test programs ], |
| 44 | [enable_tests=0], [enable_tests=1]) |
| 45 | AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1") |
| 46 | |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 47 | AC_OUTPUT( |
| 48 | libosmocore.pc |
| 49 | include/osmocore/Makefile |
| 50 | include/osmocore/protocol/Makefile |
| 51 | include/Makefile |
| 52 | src/Makefile |
| 53 | tests/Makefile |
| 54 | tests/timer/Makefile |
| 55 | tests/sms/Makefile |
| 56 | Makefile) |