-
Notifications
You must be signed in to change notification settings - Fork 31
/
configure.ac
310 lines (245 loc) · 9.52 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
dnl
dnl Autoconf configuration file for UniMRCP.
dnl
dnl Use ./bootstrap to produce a configure script.
dnl
AC_PREREQ(2.59)
AC_INIT([unimrcp],[1.6.0])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/acmacros])
dnl Set ac_macro_dir variable manually for autoconf 2.61 and above.
ac_macro_dir="build/acmacros"
AC_SUBST(ac_aux_dir)
AC_SUBST(ac_macro_dir)
dnl Include m4 macros for libtool 2.
sinclude(build/acmacros/libtool.m4)
sinclude(build/acmacros/ltoptions.m4)
sinclude(build/acmacros/ltsugar.m4)
sinclude(build/acmacros/ltversion.m4)
sinclude(build/acmacros/lt~obsolete.m4)
AC_PREFIX_DEFAULT(/usr/local/unimrcp)
dnl Define the directory layout.
APR_ENABLE_LAYOUT(classic, [plugindir logdir vardir])
AC_SUBST(plugindir)
AC_SUBST(logdir)
AC_SUBST(vardir)
dnl Reparse the configure arguments.
APR_PARSE_ARGUMENTS
dnl Generate ./config.nice to reuse ./configure command-line.
APR_CONFIG_NICE(config.nice)
AM_INIT_AUTOMAKE([no-define nostdinc foreign subdir-objects])
dnl Enable silent build rules available since automake 1.11.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Set default language.
AC_LANG_C
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_INSTALL
dnl Skip detection of Fortran.
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AC_PROG_LIBTOOL
dnl Suppress warning: ar: 'u' modifier ignored since 'D' is the default
AC_SUBST(AR_FLAGS, [cr])
dnl Do not use autoconf generated compiler DEFS.
rm confdefs.h
touch confdefs.h
dnl Check for C compiler vendor.
AX_COMPILER_VENDOR
dnl Search for pkg-config.
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([pkg-config is missing])
fi
dnl Get version information.
get_version="$srcdir/build/get-version.sh"
version_hdr="$srcdir/build/uni_version.h"
plugin_version_hdr="$srcdir/libs/mrcp-engine/include/mrcp_engine_plugin.h"
UNI_DOTTED_VERSION="`$get_version all $version_hdr UNI`"
UNI_LT_VERSION="-version-info `$get_version libtool $version_hdr UNI`"
PLUGIN_LT_VERSION="-version-info `$get_version libtool $plugin_version_hdr PLUGIN`"
AC_SUBST(UNI_DOTTED_VERSION)
AC_SUBST(UNI_LT_VERSION)
AC_SUBST(PLUGIN_LT_VERSION)
echo "UniMRCP Version: ${UNI_DOTTED_VERSION}"
dnl Check for the APR and APR-util libraries.
UNIMRCP_CHECK_APR
dnl Check for the Sofia-SIP library.
UNIMRCP_CHECK_SOFIA
dnl Enable inter-library dependencies.
AC_ARG_ENABLE(interlib-deps,
[AC_HELP_STRING([--disable-interlib-deps ],[disable inter-library dependencies (might break builds)])],
[enable_interlib_deps="$enableval"],
[enable_interlib_deps="yes"])
AC_MSG_NOTICE([enable inter-library dependencies: $enable_interlib_deps])
if test "${enable_interlib_deps}" == "yes"; then
link_all_deplibs=yes
link_all_deplibs_CXX=yes
else
link_all_deplibs=no
link_all_deplibs_CXX=no
fi
dnl Enable maintainer mode.
AC_ARG_ENABLE(maintainer-mode,
[AC_HELP_STRING([--enable-maintainer-mode ],[turn on debugging and compile time warnings])],
[enable_maintainer_mode="$enableval"],
[enable_maintainer_mode="no"])
AC_MSG_NOTICE([enable maintainer mode: $enable_maintainer_mode])
if test "${enable_maintainer_mode}" != "no"; then
APR_ADDTO(CFLAGS,-g)
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
APR_ADDTO(CFLAGS,-Wall -Werror)
fi
fi
dnl UniMRCP client library.
AC_ARG_ENABLE(client-lib,
[AC_HELP_STRING([--disable-client-lib ],[exclude unimrcpclient lib from build])],
[enable_client_lib="$enableval"],
[enable_client_lib="yes"])
AM_CONDITIONAL([UNIMRCP_CLIENT_LIB],[test "${enable_client_lib}" = "yes"])
dnl Sample UniMRCP client application in C.
AC_ARG_ENABLE(client-app,
[AC_HELP_STRING([--disable-client-app ],[exclude sample unimrcpclient app from build])],
[enable_client_app="$enableval"],
[enable_client_app="yes"])
AM_CONDITIONAL([UNIMRCP_CLIENT_APP],[test "${enable_client_lib}" = "yes" && test "${enable_client_app}" = "yes"])
dnl Sample UniMRCP client application in C++.
AC_ARG_ENABLE(umc,
[AC_HELP_STRING([--disable-umc ],[exclude sample unimrcpclient C++ app from build])],
[enable_umc="$enableval"],
[enable_umc="yes"])
AM_CONDITIONAL([UMC],[test "${enable_client_lib}" = "yes" && test "${enable_umc}" = "yes"])
dnl Miscellaneous ASR client library and application.
AC_ARG_ENABLE(asr-client,
[AC_HELP_STRING([--disable-asr-client ],[exclude misc ASR client lib and app from build])],
[enable_asr_client="$enableval"],
[enable_asr_client="yes"])
AM_CONDITIONAL([ASR_CLIENT],[test "${enable_client_lib}" = "yes" && test "${enable_asr_client}" = "yes"])
AM_CONDITIONAL([COMMON_CLIENT_DATA],[test "${enable_client_app}" = "yes" || test "${enable_umc}" = "yes" ||test "${enable_asr_client}" = "yes"])
dnl UniMRCP server library.
AC_ARG_ENABLE(server-lib,
[AC_HELP_STRING([--disable-server-lib ],[exclude unimrcpserver lib from build])],
[enable_server_lib="$enableval"],
[enable_server_lib="yes"])
AM_CONDITIONAL([UNIMRCP_SERVER_LIB],[test "${enable_server_lib}" = "yes"])
dnl UniMRCP server application.
AC_ARG_ENABLE(server-app,
[AC_HELP_STRING([--disable-server-app ],[exclude unimrcpserver app from build])],
[enable_server_app="$enableval"],
[enable_server_app="yes"])
AM_CONDITIONAL([UNIMRCP_SERVER_APP],[test "${enable_server_lib}" = "yes" && test "${enable_server_app}" = "yes"])
dnl Demo synthesizer plugin.
UNI_PLUGIN_ENABLED(demosynth)
AM_CONDITIONAL([DEMOSYNTH_PLUGIN],[test "${enable_demosynth_plugin}" = "yes"])
dnl Demo recognizer plugin.
UNI_PLUGIN_ENABLED(demorecog)
AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
dnl Alicloud synthesizer plugin.
UNI_PLUGIN_ENABLED(alicloudsynth)
AM_CONDITIONAL([ALICLOUDSYNTH_PLUGIN],[test "${enable_alicloudsynth_plugin}" = "yes"])
dnl Alicloud recognizer plugin.
UNI_PLUGIN_ENABLED(alicloudrecog)
AM_CONDITIONAL([ALICLOUDRECOG_PLUGIN],[test "${enable_alicloudrecog_plugin}" = "yes"])
dnl Xfyun synthesizer plugin.
UNI_PLUGIN_ENABLED(xfyunsynth)
AM_CONDITIONAL([XFYUNSYNTH_PLUGIN],[test "${enable_xfyunsynth_plugin}" = "yes"])
dnl Xfyun recognizer plugin.
UNI_PLUGIN_ENABLED(xfyunrecog)
AM_CONDITIONAL([XFYUNRECOG_PLUGIN],[test "${enable_xfyunrecog_plugin}" = "yes"])
dnl Demo verifier plugin.
UNI_PLUGIN_ENABLED(demoverifier)
AM_CONDITIONAL([DEMOVERIFIER_PLUGIN],[test "${enable_demoverifier_plugin}" = "yes"])
dnl Recorder plugin.
UNI_PLUGIN_ENABLED(recorder)
AM_CONDITIONAL([RECORDER_PLUGIN],[test "${enable_recorder_plugin}" = "yes"])
dnl Enable test suites.
AC_ARG_ENABLE(test-suites,
[AC_HELP_STRING([--enable-test-suites ],[build test suites])],
[enable_test_suites="$enableval"],
[enable_test_suites="no"])
AM_CONDITIONAL([TEST_SUITES],[test "${enable_test_suites}" != "no"])
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
AC_CONFIG_FILES([
Makefile
libs/Makefile
libs/apr-toolkit/Makefile
libs/mpf/Makefile
libs/mrcp/Makefile
libs/mrcp-signaling/Makefile
libs/mrcpv2-transport/Makefile
libs/mrcp-engine/Makefile
libs/mrcp-server/Makefile
libs/mrcp-client/Makefile
libs/uni-rtsp/Makefile
modules/Makefile
modules/mrcp-sofiasip/Makefile
modules/mrcp-unirtsp/Makefile
plugins/Makefile
plugins/mrcp-recorder/Makefile
plugins/demo-synth/Makefile
plugins/demo-recog/Makefile
plugins/alicloud-synth/Makefile
plugins/alicloud-recog/Makefile
plugins/xfyun-synth/Makefile
plugins/xfyun-recog/Makefile
plugins/demo-verifier/Makefile
platforms/Makefile
platforms/libunimrcp-server/Makefile
platforms/libunimrcp-client/Makefile
platforms/unimrcp-server/Makefile
platforms/unimrcp-client/Makefile
platforms/libasr-client/Makefile
platforms/asr-client/Makefile
platforms/umc/Makefile
tests/Makefile
tests/apttest/Makefile
tests/mpftest/Makefile
tests/mrcptest/Makefile
tests/rtsptest/Makefile
tests/strtablegen/Makefile
build/Makefile
build/pkgconfig/Makefile
build/pkgconfig/unimrcpclient.pc
build/pkgconfig/unimrcpserver.pc
build/pkgconfig/unimrcpplugin.pc
conf/Makefile
data/Makefile
docs/doxygen.conf
])
AC_OUTPUT
echo
echo '****************************** REPORT ******************************'
echo
echo UniMRCP version............... : $UNI_DOTTED_VERSION
echo
echo APR version................... : $apr_version
echo APR-util version.............. : $apu_version
echo Sofia-SIP version............. : $sofia_version
echo
echo Compiler...................... : $CC
echo Compiler flags................ : $CFLAGS
echo Preprocessor definitions...... : $CPPFLAGS
echo Linker flags.................. : $LDFLAGS
echo
echo UniMRCP client lib............ : $enable_client_lib
echo Sample UniMRCP client app..... : $enable_client_app
echo Sample UMC C++ client app..... : $enable_umc
echo Misc ASR client lib and app... : $enable_asr_client
echo
echo UniMRCP server lib............ : $enable_server_lib
echo UniMRCP server app............ : $enable_server_app
echo
echo Demo synthesizer plugin....... : $enable_demosynth_plugin
echo Demo recognizer plugin........ : $enable_demorecog_plugin
echo Alicloud synthesizer plugin... : $enable_alicloudsynth_plugin
echo Alicloud recognizer plugin.... : $enable_alicloudrecog_plugin
echo Xfyun synthesizer plugin...... : $enable_xfyunsynth_plugin
echo Xfyun recognizer plugin....... : $enable_xfyunrecog_plugin
echo Demo verifier plugin.......... : $enable_demoverifier_plugin
echo Recorder plugin............... : $enable_recorder_plugin
echo
echo Installation layout........... : $layout_name
echo Installation directory........ : $prefix
echo
echo '********************************************************************'