-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
executable file
·168 lines (147 loc) · 4.8 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
ubuntu nn#############################################################################
#
# WhiteBoard library
#
# Copyright (C) Nokia Corporation. All rights reserved.
#
#
#
#############################################################################
AC_INIT()
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(libwhiteboard, 2.2-beta1)
AM_CONFIG_HEADER(config.h)
AC_LANG_C
AC_PROG_CC
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_CHECK_HEADERS(stdlib.h string.h,,AC_MSG_ERROR(Required header file missing))
AC_CHECK_HEADERS(expat.h,,AC_MSG_ERROR(Required header file missing, expat installed?))
AC_CHECK_HEADERS(uuid/uuid.h,,AC_MSG_ERROR(Required header file missing, uuid installed?))
PKG_CHECK_MODULES(DBUS,
[
dbus-1 >= 0.61
dbus-glib-1 >= 0.61
])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
PKG_CHECK_MODULES(GLIB,
[
glib-2.0 >= 2.8.6
gobject-2.0 >= 2.8.6
])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
##############################################################################
# Check compile target
##############################################################################
case $host in
i386-* | i686-*)
CFLAGS="$CFLAGS -Di686"
USE_i686=yes
USE_ARM=no
;;
arm-*)
CFLAGS="$CFLAGS -DARM"
USE_ARM=yes
USE_i686=no
;;
esac
AM_CONDITIONAL(ARM, test "x$USE_ARM"="xyes")
AM_CONDITIONAL(i686, test "x$USE_i686"="xyes")
#############################################################################
# Check whether debug prints should be used
#############################################################################
AC_ARG_WITH(debug,
AS_HELP_STRING([--with-debug],
[Print additional debug messages (default = no)]),
[
AC_DEFINE([WHITEBOARD_DEBUG],[1],[Print debug messages])
with_debug=yes
],
[with_debug=no]
)
#############################################################################
# Check whether debug prints should be used
#############################################################################
AC_ARG_WITH(ssaprole,
AS_HELP_STRING([--with-ssaprole=ARG],
[Which SSAP role, available values kp, sib, both. (Default=both)]),
[
case "x$withval" in
"xkp")
with_ssaprole=kp
with_sib=no
AC_DEFINE([SIBUSER_ROLE],,[Compile user role parsers])
;;
"xsib")
with_ssaprole=sib
with_sib=yes
AC_DEFINE([SIB_ROLE],,[Compile SIB role parsers])
;;
"xboth")
with_ssaprole=both
with_sib=yes
AC_DEFINE([SIB_ROLE],,[Compile SIB role parsers])
AC_DEFINE([SIBUSER_ROLE],,[Compile user role parsers])
;;
*)
AC_MSG_ERROR(Invalid value for --with-ssaprole)
esac
],
[with_ssaprole=both
AC_DEFINE([SIB_ROLE],,[Compile SIB role parsers])
AC_DEFINE([SIBUSER_ROLE],,[Compile user role parsers])
with_sib=yes
]
)
AM_CONDITIONAL(WITHSIB, test "x$with_sib"="xyes" )
#AM_CONDITIONAL( SSAP_ROLE_SIB, test "x$with_ssaprole" == "xsib" )
#AM_CONDITIONAL( SSAP_ROLE_BOTH, test "x$with_ssaprole" == "xboth" )
#############################################################################
# Check whether timestamp prints should be used
#############################################################################
AC_ARG_WITH(timestamps,
AS_HELP_STRING([--with-timestamps],
[Print timestamps for benchmarking (default = no)]),
[AC_DEFINE([WHITEBOARD_TIMESTAMP_ENABLED],[1],[Print timestamp messages])],
[with_timestamps=no])
#############################################################################
# Check whether unit tests should be built
#############################################################################
AC_ARG_WITH(unit-tests,
[AS_HELP_STRING([--with-unit-tests], [Build unit tests (default = no)])],
[AC_DEFINE([WHITEBOARD_UNIT_TESTS_ENABLED], [1], [Build unit tests])
PKG_CHECK_MODULES(CHECK, check >= 0.9.4)
with_unit_tests=yes],
[with_unit_tests=no]
)
AM_CONDITIONAL(UNIT_TESTS, test $with_unit_tests=yes)
#############################################################################
# Check whether doxygen documentation should be created
#############################################################################
AC_ARG_WITH(docs,
AS_HELP_STRING([--with-docs],
[Create additional doxygen documentation (default = no)]),
[with_docs=yes],
[with_docs=no]
)
AM_CONDITIONAL(WITH_DOCS, test $with_docs = yes)
AC_OUTPUT(
Makefile
include/Makefile
libssap_parse_n_gen/Makefile
libm3_parse_n_gen/Makefile
libutil/Makefile
libsib/Makefile
src/Makefile
etc/Makefile
etc/libwhiteboard.pc
etc/libssap_parse_n_gen.pc
etc/libm3_parse_n_gen.pc
etc/libwhiteboard-util.pc
etc/libsib.pc
)
echo "Debug logs: ${with_debug}"
echo "SSAP ROLE: ${with_ssaprole}"