blob: 4e7097301c7d8d9590761b5648b0ee8adb2ceef4 [file] [log] [blame]
Harald Welte2b944cf2008-12-23 21:01:25 +00001dnl Process this file with autoconf to produce a configure script
Harald Weltefa13cad2010-03-23 00:09:32 +08002AC_INIT([openbsc],
3 m4_esyscmd([./git-version-gen .tarball-version]),
4 [openbsc-devel@lists.openbsc.org])
Harald Welte2b944cf2008-12-23 21:01:25 +00005
Harald Weltefa13cad2010-03-23 00:09:32 +08006AM_INIT_AUTOMAKE([dist-bzip2])
Harald Welte2b944cf2008-12-23 21:01:25 +00007
Holger Hans Peter Freytherc746e682009-10-27 03:34:49 +01008dnl kernel style compile messages
9m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10
Harald Welte2b944cf2008-12-23 21:01:25 +000011dnl checks for programs
12AC_PROG_MAKE_SET
13AC_PROG_CC
14AC_PROG_INSTALL
Holger Freyther91f49f62009-02-20 18:33:00 +000015AC_PROG_RANLIB
Harald Welte2b944cf2008-12-23 21:01:25 +000016
17dnl checks for libraries
Holger Freyther559bb712009-06-08 10:32:28 +000018AC_SEARCH_LIBS(crypt, crypt,
19 [LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
Harald Welteeaf33032010-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 Welte2b944cf2008-12-23 21:01:25 +000024
Harald Weltec19ae7e2010-06-01 12:04:03 +020025PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.10)
Harald Welte1d1a6b72010-05-31 16:04:12 +020026PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.1.9)
Harald Welte9c38ed62010-02-20 17:29:27 +010027
Harald Welte2b944cf2008-12-23 21:01:25 +000028dnl checks for header files
29AC_HEADER_STDC
Harald Welte2b944cf2008-12-23 21:01:25 +000030
31dnl Checks for typedefs, structures and compiler characteristics
32
Holger Freyther64026e92009-06-08 10:32:54 +000033# The following test is taken from WebKit's webkit.m4
34saved_CFLAGS="$CFLAGS"
35CFLAGS="$CFLAGS -fvisibility=hidden "
36AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
37AC_COMPILE_IFELSE([char foo;],
38 [ AC_MSG_RESULT([yes])
39 SYMBOL_VISIBILITY="-fvisibility=hidden"],
40 AC_MSG_RESULT([no]))
41CFLAGS="$saved_CFLAGS"
42AC_SUBST(SYMBOL_VISIBILITY)
43
44
45dnl Generate the output
46AM_CONFIG_HEADER(bscconfig.h)
47
Holger Freyther1bad6012008-12-27 09:42:59 +000048AC_OUTPUT(
Holger Freytherb27d8452009-06-08 10:32:39 +000049 openbsc.pc
Holger Hans Peter Freyther4db22132010-02-12 12:31:11 +010050 libsccp.pc
Holger Freyther1bad6012008-12-27 09:42:59 +000051 include/openbsc/Makefile
Holger Hans Peter Freyther6094ef22009-07-29 07:37:48 +020052 include/sccp/Makefile
Holger Freyther1bad6012008-12-27 09:42:59 +000053 include/Makefile
54 src/Makefile
Harald Welte5d733f32010-05-04 07:47:54 +020055 src/ipaccess/Makefile
Harald Welte48030cf2010-05-04 07:41:59 +020056 src/gprs/Makefile
Holger Freyther1bad6012008-12-27 09:42:59 +000057 tests/Makefile
Holger Freytherc95546b2008-12-27 12:03:07 +000058 tests/debug/Makefile
Holger Freytherec5b1d82008-12-28 21:55:40 +000059 tests/gsm0408/Makefile
Holger Freytherc1e11922008-12-31 23:25:05 +000060 tests/db/Makefile
Holger Hans Peter Freytherf8584a12009-06-10 12:36:38 +020061 tests/channel/Makefile
Holger Hans Peter Freyther6094ef22009-07-29 07:37:48 +020062 tests/sccp/Makefile
Holger Freyther1bad6012008-12-27 09:42:59 +000063 Makefile)