blob: 71ed10b5f5560679c79290f657d7639ba9ffdef0 [file] [log] [blame]
Harald Welte2b944cf2008-12-23 21:01:25 +00001dnl Process this file with autoconf to produce a configure script
2AC_INIT
3
4AM_INIT_AUTOMAKE(openbsc, 0.0alpha1)
5
Holger Hans Peter Freytherc746e682009-10-27 03:34:49 +01006dnl kernel style compile messages
7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
8
Harald Welte2b944cf2008-12-23 21:01:25 +00009dnl checks for programs
10AC_PROG_MAKE_SET
11AC_PROG_CC
12AC_PROG_INSTALL
Holger Freyther91f49f62009-02-20 18:33:00 +000013AC_PROG_RANLIB
Harald Welte2b944cf2008-12-23 21:01:25 +000014
15dnl checks for libraries
Holger Freyther559bb712009-06-08 10:32:28 +000016AC_SEARCH_LIBS(crypt, crypt,
17 [LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
Harald Welte2b944cf2008-12-23 21:01:25 +000018
Harald Welte9c38ed62010-02-20 17:29:27 +010019PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)
20
Harald Welte2b944cf2008-12-23 21:01:25 +000021dnl checks for header files
22AC_HEADER_STDC
Harald Welte2b944cf2008-12-23 21:01:25 +000023
24dnl Checks for typedefs, structures and compiler characteristics
25
Holger Freyther64026e92009-06-08 10:32:54 +000026# The following test is taken from WebKit's webkit.m4
27saved_CFLAGS="$CFLAGS"
28CFLAGS="$CFLAGS -fvisibility=hidden "
29AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
30AC_COMPILE_IFELSE([char foo;],
31 [ AC_MSG_RESULT([yes])
32 SYMBOL_VISIBILITY="-fvisibility=hidden"],
33 AC_MSG_RESULT([no]))
34CFLAGS="$saved_CFLAGS"
35AC_SUBST(SYMBOL_VISIBILITY)
36
37
38dnl Generate the output
39AM_CONFIG_HEADER(bscconfig.h)
40
Holger Freyther1bad6012008-12-27 09:42:59 +000041AC_OUTPUT(
Holger Freytherb27d8452009-06-08 10:32:39 +000042 openbsc.pc
Holger Hans Peter Freyther4db22132010-02-12 12:31:11 +010043 libsccp.pc
Holger Freyther1bad6012008-12-27 09:42:59 +000044 include/openbsc/Makefile
Holger Freyther2ce20ff2009-03-11 03:29:43 +000045 include/vty/Makefile
Holger Hans Peter Freyther6094ef22009-07-29 07:37:48 +020046 include/sccp/Makefile
Holger Freyther1bad6012008-12-27 09:42:59 +000047 include/Makefile
48 src/Makefile
49 tests/Makefile
Holger Freytherc95546b2008-12-27 12:03:07 +000050 tests/debug/Makefile
Holger Freytherec5b1d82008-12-28 21:55:40 +000051 tests/gsm0408/Makefile
Holger Freytherc1e11922008-12-31 23:25:05 +000052 tests/db/Makefile
Holger Hans Peter Freytherf8584a12009-06-10 12:36:38 +020053 tests/channel/Makefile
Holger Hans Peter Freyther6094ef22009-07-29 07:37:48 +020054 tests/sccp/Makefile
Holger Freyther1bad6012008-12-27 09:42:59 +000055 Makefile)