-
Notifications
You must be signed in to change notification settings - Fork 154
/
configure.ac
522 lines (432 loc) · 17 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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
dnl Use autogen.sh to regenerate the configure script
AC_PREREQ([2.62])
AC_INIT([mimic],
[1.3.0.2],
[https://github.com/MycroftAI/mimic/issues])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_PROG_CC
AM_PROG_AR
LT_INIT([dlopen win32-dll disable-static disable-shared])
AM_SILENT_RULES([yes])
AC_PROG_INSTALL
AC_CONFIG_SRCDIR([include/mimic.h])
AC_CONFIG_HEADERS([include/config.h])
LT_PREREQ([2.2.6])
AC_C_BIGENDIAN
PKG_PROG_PKG_CONFIG
dnl By default disable building static and shared libraries.
dnl use ./configure --enable-shared (or --enable-static or both)
dnl to build them.
dnl openmp support for multi-threaded test:
AC_OPENMP
dnl
dnl Does this platform support mmap(2)
dnl Note we don't use AC_FUNC_MMAP because we really only care whether
dnl read-only mappings work.
dnl
MMAPTYPE=
dnl These numbers must match the assignments below
AC_DEFINE([MMAP_TYPE_NONE], [0], [enum for mmap_types])
AC_DEFINE([MMAP_TYPE_POSIX], [1], [enum for mmap_types])
AC_DEFINE([MMAP_TYPE_WIN32], [2], [enum for mmap_types])
AC_CHECK_FUNC([mmap], [MMAPTYPE=posix])
dnl Force no mmap for chrome
AS_IF([test "$host_os" = "chrome"], [MMAPTYPE=none])
dnl AC_CHECK_FUNC doesn't seem to work for Win32 API calls...
AS_IF([ test "x$MMAPTYPE" = "x" ],
[ AS_CASE([ "${host_os}" ],
[ cygwin*|mingw* ], [ MMAPTYPE=win32],
[ android* ], [ MMAPTYPE=posix],
[ MMAPTYPE=none] )])
dnl These numbers must match the definitions above
AS_CASE( [ ${MMAPTYPE} ],
[ win32 ], [ AC_DEFINE([MMAP_TYPE], [2], [setting an mmap type])],
[ posix ], [ AC_DEFINE([MMAP_TYPE], [1], [setting an mmap type])],
[ none ], [ AC_DEFINE([MMAP_TYPE], [0], [setting an mmap type])])
AC_CHECK_FUNCS([pow])
AC_CHECK_LIB([m], [pow])
dnl Whether or not we have sockets (we don't in Windows)
AC_CHECK_HEADERS([sys/socket.h])
dnl: Look for htsengine_API headers and library
AC_ARG_WITH([hts],
[AS_HELP_STRING([--without-hts],
[disable hts speech synthesis capabilities (for hts voices)])],
[],
[with_hts=yes])
AM_CONDITIONAL([HTSEngine], [test "x$with_hts" != xno])
HTS_LIBS=
with_hts_bundled="no"
AS_IF([test "x$with_hts" != "xno"],
[AC_DEFINE([HAVE_HTSENGINE], [1], [Define if you have hts_engine])
AC_CHECK_LIB([HTSEngine],
[HTS_Engine_initialize],
[AC_SUBST([HTS_LIBS], ["-lHTSEngine"])
],
[with_hts_bundled="yes"
AC_MSG_NOTICE([HTSEngine was not detected, using bundled HTSEngine])
],
[])
])
AM_CONDITIONAL([HTSEngineBundled], [test "x$with_hts_bundled" != "xno"])
dnl: pkg-config mimic.pc file:
PKGCONFIG_MIMIC_CFLAGS="-I${includedir}/ttsmimic -I${includedir}/ttsmimic/lang"
PKGCONFIG_MIMIC_LIBS="-L${libdir}"
PKGCONFIG_MIMIC_DEPS=
dnl Check libpcre2-8
PKG_CHECK_MODULES([PCRE2], [libpcre2-8])
PKGCONFIG_MIMIC_DEPS="${PKGCONFIG_MIMIC_DEPS} libpcre2-8"
dnl
dnl determine audio type or use none if none supported on this platform
dnl
AUDIODRIVER=none
dnl check for OSS in FreeBSD and Sun:
AUDIODETECTED_OSS="false"
AC_CHECK_HEADER(machine/soundcard.h,
[AUDIODRIVER="oss"
AUDIODETECTED_OSS="true"])
AUDIODEFS_OSS=-DCST_AUDIO_FREEBSD
AUDIOLIBS_OSS=
AUDIODETECTED_SUN="false"
AC_CHECK_HEADER(sys/audioio.h,
[AUDIODRIVER="sun"
AUDIODETECTED_SUN="true"
])
AUDIODEFS_SUN=-DCST_AUDIO_SUNOS
AUDIOLIBS_SUN=
dnl Check PulseAudio
AUDIODETECTED_PULSEAUDIO="false"
PKG_CHECK_MODULES([PULSEAUDIO], [libpulse],
[AUDIODRIVER="pulseaudio"
AUDIODETECTED_PULSEAUDIO="true"],
[m4_ignore])
AUDIODEFS_PULSEAUDIO="-DCST_AUDIO_PULSEAUDIO ${PULSEAUDIO_CFLAGS}"
AUDIOLIBS_PULSEAUDIO="${PULSEAUDIO_LIBS}"
dnl Check PortAudio is at least (v19-dev)
AUDIODETECTED_PORTAUDIO="false"
PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0 >= 19],
[AUDIODRIVER="portaudio"
AUDIODETECTED_PORTAUDIO="true"],
[m4_ignore])
AUDIODEFS_PORTAUDIO="-DCST_AUDIO_PORTAUDIO ${PORTAUDIO_CFLAGS}"
AUDIOLIBS_PORTAUDIO="${PORTAUDIO_LIBS}"
dnl Check for ALSA sound library
AUDIODETECTED_ALSA="false"
PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.11],
[AUDIODRIVER="alsa"
AUDIODETECTED_ALSA="true"],
[m4_ignore])
AUDIODEFS_ALSA="-DCST_AUDIO_ALSA ${ALSA_CFLAGS}"
AUDIOLIBS_ALSA="${ALSA_LIBS}"
dnl check for wince audio
AUDIODETECTED_WINCE="false"
AC_CHECK_HEADERS([mmsystem.h],
[AUDIODRIVER="wince"
AUDIODETECTED_WINCE="true"],
[],
AC_INCLUDES_DEFAULT)
AUDIODEFS_WINCE=-DCST_AUDIO_WINCE
AUDIOLIBS_WINCE=-lwinmm
dnl For wince you get wince, for android and chrome you get none:
AS_CASE([ ${host_os} ],
[ wince* ], [ AUDIODRIVER="wince"],
[ android* ], [ AUDIODRIVER="none"],
[ chrome* ], [AUDIODRIVER="none"])
dnl
dnl allow the user to override the one detected above
dnl
AC_ARG_WITH([audio],
[AS_HELP_STRING([--with-audio],
[with specific audio support (none alsa portaudio etc) ])],
[AUDIODRIVER=$with_audio])
AS_CASE( [ ${AUDIODRIVER} ],
[ alsa ],
[ AUDIODEFS="${AUDIODEFS_ALSA}"
AUDIOLIBS="${AUDIOLIBS_ALSA}"
AUDIODETECTED="${AUDIODETECTED_ALSA}"
PKGCONFIG_MIMIC_DEPS="${PKGCONFIG_MIMIC_DEPS} alsa"
],
[ pulseaudio ],
[ AUDIODEFS="${AUDIODEFS_PULSEAUDIO}"
AUDIOLIBS="${AUDIOLIBS_PULSEAUDIO}"
AUDIODETECTED="${AUDIODETECTED_PULSEAUDIO}"
PKGCONFIG_MIMIC_DEPS="${PKGCONFIG_MIMIC_DEPS} libpulse"
],
[ portaudio ],
[ AUDIODEFS="${AUDIODEFS_PORTAUDIO}"
AUDIOLIBS="${AUDIOLIBS_PORTAUDIO}"
AUDIODETECTED="${AUDIODETECTED_PORTAUDIO}"
PKGCONFIG_MIMIC_DEPS="${PKGCONFIG_MIMIC_DEPS} portaudio-2.0"
],
[ sun ],
[ AUDIODEFS="${AUDIODEFS_SUN}"
AUDIOLIBS="${AUDIOLIBS_SUN}"
AUDIODETECTED="${AUDIODETECTED_SUN}"
],
[ oss|*bsd ],
[ AUDIODRIVER=oss
AUDIODEFS="${AUDIODEFS_OSS}"
AUDIOLIBS="${AUDIOLIBS_OSS}"
AUDIODETECTED="${AUDIODETECTED_OSS}"
],
[ wince|win32 ],
[ AUDIODEFS="${AUDIODEFS_WINCE}"
AUDIOLIBS="${AUDIOLIBS_WINCE}"
AUDIODETECTED="${AUDIODETECTED_WINCE}"
],
[ none ],
[ AUDIODEFS=-DCST_AUDIO_NONE
AUDIOLIBS=
AUDIODETECTED="true"
])
AS_IF([ test "${AUDIODETECTED}" = "false" ],
[AC_MSG_WARN([Using $AUDIODRIVER as audio module, it was not autodetected])])
AC_SUBST(AUDIODRIVER)
AC_SUBST(AUDIODEFS)
AC_SUBST(AUDIOLIBS)
dnl
dnl language/lexicon/voice parameters
dnl
dnl By default all languages, lexicons and voices are compiled
dnl --------------------- Global language switch ---------------------
AC_ARG_ENABLE([lang-all],
[AS_HELP_STRING([--disable-lang-all],
[disable all languages support])],
[],
[enable_lang_all=yes]) dnl by default all languages are included
AC_ARG_ENABLE([voices-all],
[AS_HELP_STRING([--disable-voices-all],
[disable embedding all voices])],
[],
[enable_voices_all=yes])
AC_ARG_ENABLE([lang-english],
[AS_HELP_STRING([--disable-lang-english],
[disable English language support])],
[],
[enable_lang_english=${enable_lang_all}])
AC_ARG_ENABLE([lang-indic],
[AS_HELP_STRING([--disable-lang-indic],
[disable Indic language support])],
[],
[enable_lang_indic=${enable_lang_all}])
AC_ARG_ENABLE([lang-es],
[AS_HELP_STRING([--enable-lang-es],
[(NOT WORKING YET) enable Spanish language support])],
[],
[enable_lang_es=no])
dnl -------------------- Language analysis ---------------------------
dnl For US English en-us:
AC_ARG_ENABLE([usenglish],
[AS_HELP_STRING([--disable-usenglish],
[disable US English text analysis support])],
[],
[enable_usenglish=${enable_lang_english}])
dnl For indic:
AC_ARG_ENABLE([indic_analysis],
[AS_HELP_STRING([--disable-indic-analysis],
[disable indic text analysis support])],
[],
[enable_indic_analysis=${enable_lang_indic}])
AC_ARG_ENABLE([es_analysis],
[AS_HELP_STRING([--disable-es-analysis],
[disable Spanish text analysis support])],
[],
[enable_es_analysis=${enable_lang_es}])
dnl ------------------- Lexicons ------------------------------
dnl US Lexicon:
AC_ARG_ENABLE([cmulex],
[AS_HELP_STRING([--disable-cmulex],
[disable US English CMU Lexicon support])],
[],
[enable_cmulex=${enable_lang_english}])
dnl indic Lexicons:
AC_ARG_ENABLE([indiclex],
[AS_HELP_STRING([--disable-indiclex],
[disable indic and grapheme Lexicon support])],
[],
[enable_indiclex=${enable_lang_indic}])
dnl ----------------- Voices -------------------------------
AC_ARG_ENABLE([voices-english],
[AS_HELP_STRING([--disable-voices-english],
[disable embedding all English voices])],
[],
[enable_voices_english=${enable_voices_all}])
dnl cmu_us_kal
AC_ARG_ENABLE([cmu_us_kal],
[AS_HELP_STRING([--disable-cmu_us_kal],
[disable cmu_us_kal 8kHz diphone voice])],
[],
[enable_cmu_us_kal=${enable_voices_english}])
dnl: Dependencies for cmu_us_kal
AS_IF([test "x$enable_cmu_us_kal" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_time_awb
AC_ARG_ENABLE([cmu_time_awb],
[AS_HELP_STRING([--disable-cmu_time_awb],
[disable cmu_time_awb clunits voice])],
[],
[enable_cmu_time_awb=${enable_voices_english}])
dnl: Dependencies for cmu_time_awb
AS_IF([test "x$enable_cmu_time_awb" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_us_kal16
AC_ARG_ENABLE([cmu_us_kal16],
[AS_HELP_STRING([--disable-cmu_us_kal16],
[disable cmu_us_kal16 16kHz diphone voice])],
[],
[enable_cmu_us_kal16=${enable_voices_english}])
dnl: Dependencies for cmu_us_kal16
AS_IF([test "x$enable_cmu_us_kal16" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_us_awb
AC_ARG_ENABLE([cmu_us_awb],
[AS_HELP_STRING([--disable-cmu_us_awb],
[disable cmu_us_awb clustergen voice])],
[],
[enable_cmu_us_awb=${enable_voices_english}])
dnl: Dependencies for cmu_us_awb
AS_IF([test "x$enable_cmu_us_awb" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_us_rms
AC_ARG_ENABLE([cmu_us_rms],
[AS_HELP_STRING([--disable-cmu_us_rms],
[disable cmu_us_rms clustergen voice])],
[],
[enable_cmu_us_rms=${enable_voices_english}])
dnl: Dependencies for cmu_us_rms
AS_IF([test "x$enable_cmu_us_rms" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_us_slt
AC_ARG_ENABLE([cmu_us_slt],
[AS_HELP_STRING([--disable-cmu_us_slt],
[disable cmu_us_slt clustergen voice])],
[],
[enable_cmu_us_slt=${enable_voices_english}])
dnl: Dependencies for cmu_us_slt
AS_IF([test "x$enable_cmu_us_slt" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl cmu_us_slt_hts
AC_ARG_ENABLE([cmu_us_slt_hts],
[AS_HELP_STRING([--disable-cmu_us_slt_hts],
[disable cmu_us_slt_hts hts voice])],
[],
[enable_cmu_us_slt_hts=${enable_voices_english}])
AS_IF([test "x$enable_cmu_us_slt_hts" != "xno" -a "x$with_hts" = "xno"],
[enable_cmu_us_slt_hts="no"
AC_MSG_WARN([cmu_us_slt_hts disabled because hts support is not available])],
[])
dnl: Dependencies for cmu_us_slt_hts
AS_IF([test "x$enable_cmu_us_slt_hts" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl vid_gb_ap
AC_ARG_ENABLE([vid_gb_ap],
[AS_HELP_STRING([--disable-vid_gb_ap],
[disable vid_gb_ap clustergen voice])],
[],
[enable_vid_gb_ap=${enable_voices_english}])
dnl: Dependencies for vid_gb_ap
AS_IF([test "x$enable_vid_gb_ap" != xno],
[enable_usenglish="yes"
enable_cmulex="yes"])
dnl To generate the pkg-config file .pc we want the libraries in the order
dnl the linker will need them. For that reason, we first list voices, then
dnl lexicons then languages and we append the lib required on each case.
AM_CONDITIONAL([VOICE_CMU_US_KAL], [test "x$enable_cmu_us_kal" != xno])
AS_IF([test "x$enable_cmu_us_kal" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_KAL], [1], [Enable cmu_us_kal voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_kal"
],
[ AC_DEFINE([ENABLE_CMU_US_KAL], [0], [Enable cmu_us_kal voice]) ])
AM_CONDITIONAL([VOICE_CMU_TIME_AWB], [test "x$enable_cmu_time_awb" != xno])
AS_IF([test "x$enable_cmu_time_awb" != xno ],
[ AC_DEFINE([ENABLE_CMU_TIME_AWB], [1], [Enable cmu_time_awb voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_time_awb"
],
[ AC_DEFINE([ENABLE_CMU_TIME_AWB], [0], [Enable cmu_time_awb voice]) ])
AM_CONDITIONAL([VOICE_CMU_US_KAL16], [test "x$enable_cmu_us_kal16" != xno])
AS_IF([test "x$enable_cmu_us_kal16" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_KAL16], [1], [Enable cmu_us_kal16 voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_kal16"
],
[ AC_DEFINE([ENABLE_CMU_US_KAL16], [0], [Enable cmu_us_kal16 voice]) ])
AM_CONDITIONAL([VOICE_CMU_US_AWB], [test "x$enable_cmu_us_awb" != xno])
AS_IF([test "x$enable_cmu_us_awb" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_AWB], [1], [Enable cmu_us_awb voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_awb"
],
[ AC_DEFINE([ENABLE_CMU_US_AWB], [0], [Enable cmu_us_awb voice]) ])
AM_CONDITIONAL([VOICE_CMU_US_RMS], [test "x$enable_cmu_us_rms" != xno])
AS_IF([test "x$enable_cmu_us_rms" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_RMS], [1], [Enable cmu_us_rms voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_rms"
],
[ AC_DEFINE([ENABLE_CMU_US_RMS], [0], [Enable cmu_us_rms voice]) ])
AM_CONDITIONAL([VOICE_CMU_US_SLT], [test "x$enable_cmu_us_slt" != xno])
AS_IF([test "x$enable_cmu_us_slt" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_SLT], [1], [Enable cmu_us_slt voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_slt"
],
[ AC_DEFINE([ENABLE_CMU_US_SLT], [0], [Enable cmu_us_slt voice]) ])
AM_CONDITIONAL([VOICE_CMU_US_SLT_HTS], [test "x$enable_cmu_us_slt_hts" != xno])
AS_IF([test "x$enable_cmu_us_slt_hts" != xno ],
[ AC_DEFINE([ENABLE_CMU_US_SLT_HTS], [1], [Enable cmu_us_slt_hts voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_us_slt_hts"
],
[ AC_DEFINE([ENABLE_CMU_US_SLT_HTS], [0], [Enable cmu_us_slt_hts voice]) ])
AM_CONDITIONAL([VOICE_VID_GB_AP], [test "x$enable_vid_gb_ap" != xno])
AS_IF([test "x$enable_vid_gb_ap" != xno ],
[ AC_DEFINE([ENABLE_VID_GB_AP], [1], [Enable vid_gb_ap voice])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_vid_gb_ap"
],
[ AC_DEFINE([ENABLE_VID_GB_AP], [0], [Enable vid_gb_ap voice]) ])
AM_CONDITIONAL([LEX_CMULEX], [test "x$enable_cmulex" != xno])
AS_IF([test "x$enable_cmulex" != xno ],
[ AC_DEFINE([ENABLE_CMULEX], [1], [Enable CMU US English lexicon])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmulex"
],
[ AC_DEFINE([ENABLE_CMULEX], [0], [Enable CMU US English lexicon]) ])
AM_CONDITIONAL([LEX_INDIC], [test "x$enable_indiclex" != xno])
AS_IF([test "x$enable_indiclex" != xno ],
[ AC_DEFINE([ENABLE_INDICLEX], [1], [Enable Indic lexicon])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_indic_lex"
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_grapheme_lex"
],
[ AC_DEFINE([ENABLE_INDICLEX], [0], [Enable Indic lexicon]) ])
AM_CONDITIONAL([LANG_INDIC_ANALYSIS],
[test "x$enable_indic_analysis" != xno])
AS_IF([test "x$enable_indic_analysis" != xno ],
[ AC_DEFINE([ENABLE_INDIC_ANALYSIS], [1], [Enable Indic text analysis])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_grapheme_lang"
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_cmu_indic_lang"
],
[ AC_DEFINE([ENABLE_INDIC_ANALYSIS], [0], [Enable Indic text analysis]) ])
AM_CONDITIONAL([LANG_USENGLISH], [test "x$enable_usenglish" != xno])
AS_IF([test "x$enable_usenglish" != xno ],
[ AC_DEFINE([ENABLE_USENGLISH], [1], [Enable US English text analysis])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_usenglish" ],
[ AC_DEFINE([ENABLE_USENGLISH], [0], [Enable US English text analysis]) ])
AM_CONDITIONAL([LANG_ES_ANALYSIS], [test "x$enable_es_analysis" != xno])
AS_IF([test "x$enable_es_analysis" != xno ],
[ AC_DEFINE([ENABLE_ES_ANALYSIS], [1], [Enable Spanish text analysis])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_es" ],
[ AC_DEFINE([ENABLE_ES_ANALYSIS], [0], [Enable Spanish text analysis]) ])
PKGCONFIG_MIMIC_LIBS="${PKGCONFIG_MIMIC_LIBS} -lttsmimic_lang_all_langs -lttsmimic_lang_all_voices -lttsmimic"
AC_SUBST(PKGCONFIG_MIMIC_CFLAGS)
AC_SUBST(PKGCONFIG_MIMIC_LIBS)
AC_SUBST(PKGCONFIG_MIMIC_DEPS)
AC_SUBST(EXEEXT)
AC_CONFIG_FILES([Makefile mimic.pc])
AC_OUTPUT
AS_IF( [ test "${AUDIODRIVER}" = "none" && test "$with_audio" != "none" ],
[ AC_MSG_WARN([No audio driver could be determined, and no sound output will be possible. Mimic will work but only be able to write output to disk.])
])