Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 1 | AC_INIT |
| 2 | |
| 3 | AM_INIT_AUTOMAKE(libosmocore, 0.0alpha1) |
| 4 | |
| 5 | dnl kernel style compile messages |
| 6 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 7 | |
| 8 | dnl checks for programs |
| 9 | AC_PROG_MAKE_SET |
| 10 | AC_PROG_CC |
| 11 | AC_PROG_INSTALL |
| 12 | AC_PROG_RANLIB |
| 13 | AC_PROG_LIBTOOL |
| 14 | |
| 15 | dnl checks for header files |
| 16 | AC_HEADER_STDC |
| 17 | AC_CHECK_HEADERS(execinfo.h sys/select.h) |
| 18 | |
| 19 | # The following test is taken from WebKit's webkit.m4 |
| 20 | saved_CFLAGS="$CFLAGS" |
| 21 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 22 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
| 23 | AC_COMPILE_IFELSE([char foo;], |
| 24 | [ AC_MSG_RESULT([yes]) |
| 25 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 26 | AC_MSG_RESULT([no])) |
| 27 | CFLAGS="$saved_CFLAGS" |
| 28 | AC_SUBST(SYMBOL_VISIBILITY) |
| 29 | |
| 30 | dnl Generate the output |
| 31 | AM_CONFIG_HEADER(config.h) |
| 32 | |
Harald Welte | 4fb31e2 | 2010-03-07 20:24:30 +0100 | [diff] [blame^] | 33 | AC_ARG_ENABLE(talloc, |
| 34 | [ --disable-talloc Support message buffer ], |
| 35 | [enable_talloc=0], [enable_talloc=1]) |
| 36 | |
| 37 | AM_CONDITIONAL(ENABLE_TALLOC, test "x$enable_talloc" = "x1") |
| 38 | |
Harald Welte | 0038fb2 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 39 | AC_OUTPUT( |
| 40 | libosmocore.pc |
| 41 | include/osmocore/Makefile |
| 42 | include/osmocore/protocol/Makefile |
| 43 | include/Makefile |
| 44 | src/Makefile |
| 45 | tests/Makefile |
| 46 | tests/timer/Makefile |
| 47 | tests/sms/Makefile |
| 48 | Makefile) |