Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script |
Harald Welte | fa13cad | 2010-03-23 00:09:32 +0800 | [diff] [blame] | 2 | AC_INIT([openbsc], |
| 3 | m4_esyscmd([./git-version-gen .tarball-version]), |
| 4 | [openbsc-devel@lists.openbsc.org]) |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 5 | |
Harald Welte | fa13cad | 2010-03-23 00:09:32 +0800 | [diff] [blame] | 6 | AM_INIT_AUTOMAKE([dist-bzip2]) |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 7 | |
Holger Hans Peter Freyther | c746e68 | 2009-10-27 03:34:49 +0100 | [diff] [blame] | 8 | dnl kernel style compile messages |
| 9 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 10 | |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 11 | dnl checks for programs |
| 12 | AC_PROG_MAKE_SET |
| 13 | AC_PROG_CC |
| 14 | AC_PROG_INSTALL |
Holger Freyther | 91f49f6 | 2009-02-20 18:33:00 +0000 | [diff] [blame] | 15 | AC_PROG_RANLIB |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 16 | |
| 17 | dnl checks for libraries |
Holger Freyther | 559bb71 | 2009-06-08 10:32:28 +0000 | [diff] [blame] | 18 | AC_SEARCH_LIBS(crypt, crypt, |
| 19 | [LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])]) |
Harald Welte | eaf3303 | 2010-05-18 00:20:21 +0200 | [diff] [blame] | 20 | AC_SEARCH_LIBS(gtp_new, gtp, |
| 21 | [LIBCRYPT="-lgtp"; AC_SUBST([GPRS_LIBGTP], [1])]) |
| 22 | |
| 23 | AM_CONDITIONAL(HAVE_LIBGTP, test "x$GPRS_LIBGTP" != "x") |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 24 | |
Harald Welte | 5c8dcf7 | 2010-06-14 20:48:26 +0200 | [diff] [blame] | 25 | PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.11) |
Harald Welte | 1d1a6b7 | 2010-05-31 16:04:12 +0200 | [diff] [blame] | 26 | PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.1.9) |
Harald Welte | 9c38ed6 | 2010-02-20 17:29:27 +0100 | [diff] [blame] | 27 | |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 28 | dnl checks for header files |
| 29 | AC_HEADER_STDC |
Harald Welte | 2b944cf | 2008-12-23 21:01:25 +0000 | [diff] [blame] | 30 | |
| 31 | dnl Checks for typedefs, structures and compiler characteristics |
| 32 | |
Holger Freyther | 64026e9 | 2009-06-08 10:32:54 +0000 | [diff] [blame] | 33 | # The following test is taken from WebKit's webkit.m4 |
| 34 | saved_CFLAGS="$CFLAGS" |
| 35 | CFLAGS="$CFLAGS -fvisibility=hidden " |
| 36 | AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) |
| 37 | AC_COMPILE_IFELSE([char foo;], |
| 38 | [ AC_MSG_RESULT([yes]) |
| 39 | SYMBOL_VISIBILITY="-fvisibility=hidden"], |
| 40 | AC_MSG_RESULT([no])) |
| 41 | CFLAGS="$saved_CFLAGS" |
| 42 | AC_SUBST(SYMBOL_VISIBILITY) |
| 43 | |
| 44 | |
| 45 | dnl Generate the output |
| 46 | AM_CONFIG_HEADER(bscconfig.h) |
| 47 | |
Holger Freyther | 1bad601 | 2008-12-27 09:42:59 +0000 | [diff] [blame] | 48 | AC_OUTPUT( |
Holger Freyther | b27d845 | 2009-06-08 10:32:39 +0000 | [diff] [blame] | 49 | openbsc.pc |
Holger Hans Peter Freyther | 4db2213 | 2010-02-12 12:31:11 +0100 | [diff] [blame] | 50 | libsccp.pc |
Holger Freyther | 1bad601 | 2008-12-27 09:42:59 +0000 | [diff] [blame] | 51 | include/openbsc/Makefile |
Holger Hans Peter Freyther | 6094ef2 | 2009-07-29 07:37:48 +0200 | [diff] [blame] | 52 | include/sccp/Makefile |
Holger Freyther | 1bad601 | 2008-12-27 09:42:59 +0000 | [diff] [blame] | 53 | include/Makefile |
| 54 | src/Makefile |
Harald Welte | 5d733f3 | 2010-05-04 07:47:54 +0200 | [diff] [blame] | 55 | src/ipaccess/Makefile |
Harald Welte | 48030cf | 2010-05-04 07:41:59 +0200 | [diff] [blame] | 56 | src/gprs/Makefile |
Holger Freyther | 1bad601 | 2008-12-27 09:42:59 +0000 | [diff] [blame] | 57 | tests/Makefile |
Holger Freyther | c95546b | 2008-12-27 12:03:07 +0000 | [diff] [blame] | 58 | tests/debug/Makefile |
Holger Freyther | ec5b1d8 | 2008-12-28 21:55:40 +0000 | [diff] [blame] | 59 | tests/gsm0408/Makefile |
Holger Freyther | c1e1192 | 2008-12-31 23:25:05 +0000 | [diff] [blame] | 60 | tests/db/Makefile |
Holger Hans Peter Freyther | f8584a1 | 2009-06-10 12:36:38 +0200 | [diff] [blame] | 61 | tests/channel/Makefile |
Holger Hans Peter Freyther | 6094ef2 | 2009-07-29 07:37:48 +0200 | [diff] [blame] | 62 | tests/sccp/Makefile |
Holger Freyther | 1bad601 | 2008-12-27 09:42:59 +0000 | [diff] [blame] | 63 | Makefile) |