blob: 0f4836379f957aac8bcd6c41589a3e26759a1b5b [file] [log] [blame]
Harald Weltede729a12008-12-23 21:01:25 +00001dnl Process this file with autoconf to produce a configure script
Harald Welte5a29c7f2010-03-23 00:09:32 +08002AC_INIT([openbsc],
3 m4_esyscmd([./git-version-gen .tarball-version]),
4 [openbsc-devel@lists.openbsc.org])
Harald Weltede729a12008-12-23 21:01:25 +00005
Harald Welte5a29c7f2010-03-23 00:09:32 +08006AM_INIT_AUTOMAKE([dist-bzip2])
Harald Weltede729a12008-12-23 21:01:25 +00007
Holger Hans Peter Freyther1f59ac42009-10-27 03:34:49 +01008dnl kernel style compile messages
9m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10
Harald Weltede729a12008-12-23 21:01:25 +000011dnl checks for programs
12AC_PROG_MAKE_SET
13AC_PROG_CC
14AC_PROG_INSTALL
Holger Freyther3281f6e2009-02-20 18:33:00 +000015AC_PROG_RANLIB
Harald Weltede729a12008-12-23 21:01:25 +000016
17dnl checks for libraries
Holger Freytherb424ecb2009-06-08 10:32:28 +000018AC_SEARCH_LIBS(crypt, crypt,
19 [LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
Harald Welte03800ba2010-05-18 00:20:21 +020020AC_SEARCH_LIBS(gtp_new, gtp,
21 [LIBCRYPT="-lgtp"; AC_SUBST([GPRS_LIBGTP], [1])])
22
23AM_CONDITIONAL(HAVE_LIBGTP, test "x$GPRS_LIBGTP" != "x")
Harald Weltede729a12008-12-23 21:01:25 +000024
Harald Welte6f656962010-05-11 11:12:37 +020025PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.6)
Harald Weltef98a4972010-02-20 17:29:27 +010026
Harald Weltede729a12008-12-23 21:01:25 +000027dnl checks for header files
28AC_HEADER_STDC
Harald Weltede729a12008-12-23 21:01:25 +000029
30dnl Checks for typedefs, structures and compiler characteristics
31
Holger Freyther6d9f77a2009-06-08 10:32:54 +000032# The following test is taken from WebKit's webkit.m4
33saved_CFLAGS="$CFLAGS"
34CFLAGS="$CFLAGS -fvisibility=hidden "
35AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
36AC_COMPILE_IFELSE([char foo;],
37 [ AC_MSG_RESULT([yes])
38 SYMBOL_VISIBILITY="-fvisibility=hidden"],
39 AC_MSG_RESULT([no]))
40CFLAGS="$saved_CFLAGS"
41AC_SUBST(SYMBOL_VISIBILITY)
42
43
44dnl Generate the output
45AM_CONFIG_HEADER(bscconfig.h)
46
Holger Freyther5f755982008-12-27 09:42:59 +000047AC_OUTPUT(
Holger Freytherc7aa3c42009-06-08 10:32:39 +000048 openbsc.pc
Holger Hans Peter Freyther5e6f52f2010-02-12 12:31:11 +010049 libsccp.pc
Holger Freyther5f755982008-12-27 09:42:59 +000050 include/openbsc/Makefile
Holger Freyther10479402009-03-11 03:29:43 +000051 include/vty/Makefile
Holger Hans Peter Freytherac967702009-07-29 07:37:48 +020052 include/sccp/Makefile
Holger Freyther5f755982008-12-27 09:42:59 +000053 include/Makefile
54 src/Makefile
Harald Weltec9a341b2010-05-04 07:47:54 +020055 src/ipaccess/Makefile
Harald Weltee2365962010-05-04 07:41:59 +020056 src/gprs/Makefile
Holger Freyther5f755982008-12-27 09:42:59 +000057 tests/Makefile
Holger Freytherd546e312008-12-27 12:03:07 +000058 tests/debug/Makefile
Holger Freytheraa0fb362008-12-28 21:55:40 +000059 tests/gsm0408/Makefile
Holger Freytherdbede4e2008-12-31 23:25:05 +000060 tests/db/Makefile
Holger Hans Peter Freyther800d29d2009-06-10 12:36:38 +020061 tests/channel/Makefile
Holger Hans Peter Freytherac967702009-07-29 07:37:48 +020062 tests/sccp/Makefile
Holger Freyther5f755982008-12-27 09:42:59 +000063 Makefile)