~ubuntu-branches/ubuntu/trusty/speech-dispatcher/trusty-proposed

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Samuel Thibault, Luke Yelavich, Jason White, David Henningsson
  • Date: 2013-11-11 16:38:46 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131111163846-lvu37ypp5sy9z5so
Tags: 0.8-0ubuntu1
[ Samuel Thibault ]
* debian/control: Set libspeechd2 multi-arch: same.
* debian/rules: Set multiarch libdir.
* debian/libspeechd-dev.install,libspeechd2.install,
  speech-dispatcher.install: Use multiarch libdir.
* Do not depend on dpkg | install-info, now that we use the install-info
  trigger.
* Bump Standards-Version to 3.9.5.
* Bump dotconf dependency to >= 1.3.

[ Luke Yelavich ]
* New upstream release
* debian/patches/infinite-loop.patch: Refreshed
* Dropped patches:
  - debian/patches/build-doc.patch
  - debian/patches/procname.patch
  - debian/patches/paths+files.patch
  - debian/patches/pthread.patch
* Add libltdl-dev and intltool to build-depends
* Update packaging for speech-dispatcher python 3 bindings.
* Move speech-dispatcher modules to an architecture independant dir, since
  modules can be written in any language, and i386 only modules can be
  used on amd64 systems
* Create separate audio plugins package
* Convert to debhelper 7+ packaging.
* Use dh-autoreconf to handle autotools file rebuilds.
* Update standards version to 3.9.3.
* Add X-Python-Version related fields to debian/control.
* Patch in the speech-dispatcher-cs.texi file since it was forgotten in the
  0.8 tarball
* Add translations to speech-dispatcher
* Merge from debian unreleased git.  Remaining changes:
  - Moved the flite output module to a separate package, and added
    it to suggests, we don't want flite on the Ubuntu CD image
  - Don't build depend on libaudio-dev or libao-dev, Ubuntu CD size is an
    issue, every little bit helps
  - debian/gbp.conf: Adjust for the Ubuntu git branch
  - Python3-speechd needs to conflict against python-speechd

[ Jason White ]
* Raise level of subsection in fdl.texi to correct document structure.

[ David Henningsson ]
* debian/patches/pulse-default-latency.patch:
  Default to 20 ms latency instead of 1 ms latency (LP: #1208826)

[ Luke Yelavich ]
* spd_audio: Expose dlopened library's symbols to libs it loads. Thanks to
  Christopher Brannon <chris@the-brannons.com> for the patch, taken from
  the speech-dispatcher mailing list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                               -*- Autoconf -*-
 
2
# Process this file with autoconf to produce a configure script.
 
3
 
 
4
AC_PREREQ([2.63])
 
5
AC_INIT([speech-dispatcher], [0.8], [speechd@lists.freebsoft.org])
 
6
AM_INIT_AUTOMAKE([foreign])
 
7
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
 
8
LT_PREREQ([2.2])
 
9
LT_INIT([dlopen])
 
10
AC_CONFIG_SRCDIR([src/server/speechd.c])
 
11
AC_CONFIG_HEADERS([config.h])
 
12
IT_PROG_INTLTOOL([0.40.0])
 
13
AM_GLIB_GNU_GETTEXT
 
14
 
 
15
# Config test suite
 
16
AC_CONFIG_TESTDIR(src/tests)
 
17
 
 
18
# Checks for programs.
 
19
AC_PROG_CC
 
20
AC_PROG_INSTALL
 
21
 
 
22
# Checks for libraries.
 
23
AC_SEARCH_LIBS([sqrt], [m], [],
 
24
        [AC_MSG_FAILURE([Math library missing])])
 
25
AC_SEARCH_LIBS([pthread_create], [pthread], [],
 
26
        [AC_MSG_FAILURE([Threads library missing])])
 
27
AC_SEARCH_LIBS([lt_dlopen], [ltdl], [],
 
28
        [AC_MSG_FAILURE([ltdl library missing])])
 
29
 
 
30
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
 
31
AC_SUBST([GLIB_CFLAGS])
 
32
AC_SUBST([GLIB_LIBS])
 
33
 
 
34
PKG_CHECK_MODULES([GTHREAD], [gthread-2.0])
 
35
AC_SUBST([GTHREAD_CFLAGS])
 
36
AC_SUBST([GTHREAD_LIBS])
 
37
 
 
38
PKG_CHECK_MODULES([GMODULE], [gmodule-2.0])
 
39
AC_SUBST([GMODULE_CFLAGS])
 
40
AC_SUBST([GMODULE_LIBS])
 
41
 
 
42
PKG_CHECK_MODULES([DOTCONF], [dotconf >= 1.3])
 
43
AC_SUBST([DOTCONF_CFLAGS])
 
44
AC_SUBST([DOTCONF_LIBS])
 
45
 
 
46
PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.2],
 
47
        [ac_cv_sndfile=1], [ac_cv_sndfile=0])
 
48
AC_SUBST([SNDFILE_CFLAGS])
 
49
AC_SUBST([SNDFILE_LIBS])
 
50
AC_DEFINE_UNQUOTED([HAVE_SNDFILE], [${ac_cv_sndfile}],
 
51
        [Set to 1 if you have libsndfile.])
 
52
 
 
53
# Checks for header files.
 
54
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h netdb.h])
 
55
AC_CHECK_HEADERS([ netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h])
 
56
AC_CHECK_HEADERS([sys/socket.h sys/time.h unistd.h wchar.h wctype.h])
 
57
 
 
58
# Checks for typedefs, structures, and compiler characteristics.
 
59
AC_HEADER_STDBOOL
 
60
AC_C_INLINE
 
61
AC_TYPE_PID_T
 
62
AC_TYPE_SIZE_T
 
63
AC_TYPE_SSIZE_T
 
64
AC_TYPE_UINT32_T
 
65
 
 
66
# Checks for library functions.
 
67
AC_FUNC_FORK
 
68
AC_FUNC_MALLOC
 
69
AC_FUNC_REALLOC
 
70
AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday memmove memset mkdir])
 
71
AC_CHECK_FUNCS([select socket strcasecmp strchr strcspn strdup])
 
72
AC_CHECK_FUNCS([strerror strncasecmp strndup strstr strtol])
 
73
 
 
74
# Extra libraries for sockets and espeak added by Willie Walker
 
75
# based upon how SunStudio libraries work.  Also
 
76
# conditionally set other compiler/linker flags.
 
77
#
 
78
if test "$GCC" = yes; then
 
79
        EXTRA_SOCKET_LIBS=""
 
80
        ERROR_CFLAGS="-Wall"
 
81
        RDYNAMIC="-rdynamic"
 
82
else
 
83
        EXTRA_ESPEAK_LIBS="-lCstd -lCrun"
 
84
        EXTRA_SOCKET_LIBS="-lsocket -lnsl"
 
85
        ERROR_CFLAGS="-errwarn=%all -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"
 
86
        RDYNAMIC=""
 
87
fi
 
88
AC_SUBST([EXTRA_ESPEAK_LIBS])
 
89
AC_SUBST([EXTRA_SOCKET_LIBS])
 
90
AC_SUBST([ERROR_CFLAGS])
 
91
AC_SUBST([RDYNAMIC])
 
92
 
 
93
# Check for python support.
 
94
# Python 3 or greater required
 
95
AC_ARG_ENABLE([python],
 
96
        [AS_HELP_STRING([--disable-python], [do not install python bindings])],
 
97
        [],
 
98
        [enable_python=check])
 
99
AS_IF([test $enable_python != "no"],
 
100
        [AM_PATH_PYTHON([3.0],
 
101
                [enable_python=yes],
 
102
                [AS_IF([test $enable_python = "yes"],
 
103
                        [AC_MSG_FAILURE([python 3 or greater is not available])])])])
 
104
AM_CONDITIONAL([HAVE_PYTHON], [test $enable_python = "yes"])
 
105
 
 
106
output_modules="cicero dummy festival generic"
 
107
# checks for output modules
 
108
# check for espeak support
 
109
AC_ARG_WITH([espeak],
 
110
        [AS_HELP_STRING([--with-espeak], [Compile with espeak support])],
 
111
        [],
 
112
        [with_espeak=check])
 
113
AS_IF([test $with_espeak != "no"],
 
114
        [AC_CHECK_LIB([espeak], [espeak_Synth],
 
115
                [with_espeak="yes"],
 
116
                [AS_IF([test $with_espeak = "yes"],
 
117
                        [AC_MSG_FAILURE([espeak is not available])])],
 
118
                [$EXTRA_ESPEAK_LIBS])])
 
119
AM_CONDITIONAL([espeak_support], [test $with_espeak = "yes"])
 
120
AS_IF([test $with_espeak = "yes"], [output_modules="${output_modules} espeak"])
 
121
 
 
122
# check for flite support
 
123
AC_ARG_WITH([flite],
 
124
        [AS_HELP_STRING([--with-flite], [include Festival Lite (Flite) support])],
 
125
        [],
 
126
        [with_flite=check])
 
127
AS_IF([test $with_flite != "no"],
 
128
        [AC_CHECK_LIB([flite], [flite_init],
 
129
                [flite_basic="-lflite"],
 
130
                [AS_IF([test $with_flite = "yes"],
 
131
                        [AC_MSG_FAILURE([libflite is not available])])],
 
132
                [-lm])
 
133
        AC_CHECK_LIB([flite_usenglish], [usenglish_init],
 
134
                [flite_basic="-lflite_usenglish ${flite_basic}"],
 
135
                [AS_IF([test $with_flite = "yes"],
 
136
                        [AC_MSG_FAILURE([libflite_usenglish is not available])])],
 
137
                [-lflite -lm])
 
138
        AC_CHECK_LIB([flite_cmulex], [cmu_lex_init],
 
139
                [flite_basic="-lflite_cmulex ${flite_basic}"],
 
140
                [AS_IF([test $with_flite = "yes"],
 
141
                        [AC_MSG_FAILURE([libflite_cmulex is not available])])],
 
142
                [-lflite -lm])
 
143
        AC_CHECK_LIB([flite_cmu_us_kal16], [register_cmu_us_kal16],
 
144
                [with_flite=yes;
 
145
                flite_kal="-lflite_cmu_us_kal16";
 
146
                AC_DEFINE([HAVE_REGISTER_CMU_US_KAL16], [1],
 
147
                        [Use cmu_register_us_kal16 to register the 16-bit voice.])],
 
148
                [AC_CHECK_LIB([flite_cmu_us_kal16], [register_cmu_us_kal],
 
149
                        [with_flite=yes;
 
150
                        flite_kal="-lflite_cmu_us_kal16"],
 
151
                        [AC_CHECK_LIB([flite_cmu_us_kal], [register_cmu_us_kal],
 
152
                                [with_flite=yes;
 
153
                                flite_kal="-lflite_cmu_us_kal"],
 
154
                                [AS_IF([test $with_flite = "yes"],
 
155
                                        [AC_MSG_FAILURE([no flite voices found])])],
 
156
                                [$flite_basic -lm])],
 
157
                        [$flite_basic -lm])],
 
158
                [$flite_basic -lm])])
 
159
AM_CONDITIONAL([flite_support], [test $with_flite = "yes"])
 
160
AC_SUBST([flite_basic])
 
161
AC_SUBST([flite_kal])
 
162
AS_IF([test $with_flite = "yes"], [output_modules="${output_modules} flite"])
 
163
 
 
164
# check for IBMTTS support
 
165
AC_ARG_WITH([ibmtts],
 
166
        [AS_HELP_STRING([--with-ibmtts], [include IBM TTS support])],
 
167
        [],
 
168
        [with_ibmtts=check])
 
169
AS_IF([test $with_ibmtts != "no"],
 
170
        [AC_CHECK_LIB([ibmeci], [eciStop],
 
171
                [with_ibmtts=yes;
 
172
                ibmtts_include="-I/opt/IBM/ibmtts/inc/"],
 
173
                [AS_IF([test $with_ibmtts = "yes"],
 
174
                        [AC_MSG_FAILURE([IBMTTS is not available])])])])
 
175
AM_CONDITIONAL([ibmtts_support], [test $with_ibmtts = "yes"])
 
176
AC_SUBST([ibmtts_include])
 
177
AS_IF([test $with_ibmtts = "yes"], [output_modules="${output_modules} ibmtts"])
 
178
 
 
179
# check for ivona support
 
180
AC_ARG_WITH([ivona],
 
181
        [AS_HELP_STRING([--with-ivona], [include ivona support])],
 
182
        [],
 
183
        [with_ivona=check])
 
184
AS_IF([test $with_ivona != "no"],
 
185
        [AC_CHECK_LIB([dumbtts], [dumbtts_TTSInit],
 
186
                [with_ivona=yes],
 
187
                [AS_IF([test $with_ivona = "yes"],
 
188
                        [AC_MSG_FAILURE([ivona is not available])])])])
 
189
AM_CONDITIONAL([ivona_support], [test $with_ivona = "yes"])
 
190
AS_IF([test $with_ivona = "yes"], [output_modules="${output_modules} ivona"])
 
191
 
 
192
# check for svox pico support
 
193
AC_ARG_WITH([pico],
 
194
        [AS_HELP_STRING([--with-pico], [include SVOX pico support])],
 
195
        [],
 
196
        [with_pico=check])
 
197
AS_IF([test $with_pico != "no"],
 
198
        [AC_CHECK_LIB([ttspico], [pico_initialize],
 
199
                [with_pico=yes],
 
200
                [AS_IF([test $with_pico = "yes"],
 
201
                        [AC_MSG_FAILURE([SVOX pico is not available])])])])
 
202
AM_CONDITIONAL([pico_support], [test $with_pico = "yes"])
 
203
AS_IF([test $with_pico = "yes"], [output_modules="${output_modules} pico"])
 
204
 
 
205
audio_dlopen_modules='-dlopen force'
 
206
 
 
207
# clear default audio method
 
208
default_audio_method=""
 
209
audio_methods=""
 
210
 
 
211
# checks for audio subsystems
 
212
# check for pulseaudio support
 
213
AC_ARG_WITH([pulse],
 
214
        [AS_HELP_STRING([--with-pulse], [include pulseaudio support])],
 
215
        [],
 
216
        [with_pulse=check])
 
217
AS_IF([test $with_pulse != "no"],
 
218
        [PKG_CHECK_MODULES([PULSE], [libpulse-simple],
 
219
                [with_pulse=yes
 
220
                AS_IF([test -z "$default_audio_method"],
 
221
                        [default_audio_method=pulse])
 
222
                audio_dlopen_modules="$audio_dlopen_modules -dlopen ../audio/spd_pulse.la"],
 
223
                [AS_IF([test $with_pulse = "yes"],
 
224
                        [AC_MSG_FAILURE([pulseaudio is not available])])])])
 
225
AM_CONDITIONAL([pulse_support], [test $with_pulse = "yes"])
 
226
AC_SUBST([PULSE_CFLAGS])
 
227
AC_SUBST([PULSE_LIBS])
 
228
AS_IF([test $with_pulse = "yes"], [audio_methods="${audio_methods} pulse"])
 
229
 
 
230
# check for alsa support
 
231
AC_ARG_WITH([alsa],
 
232
        [AS_HELP_STRING([--with-alsa], [include ALSA support])],
 
233
        [],
 
234
        [with_alsa=check])
 
235
AS_IF([test $with_alsa != "no"],
 
236
        [PKG_CHECK_MODULES([ALSA], [alsa],
 
237
                [with_alsa=yes
 
238
                AS_IF([test -z "$default_audio_method"],
 
239
                        [default_audio_method=alsa])
 
240
                audio_dlopen_modules="$audio_dlopen_modules -dlopen ../audio/spd_alsa.la"],
 
241
                [AS_IF([test $with_alsa = "yes"],
 
242
                        [AC_MSG_FAILURE([ALSA is not available])])])])
 
243
AM_CONDITIONAL([alsa_support], [test $with_alsa = "yes"])
 
244
AC_SUBST([ALSA_CFLAGS])
 
245
AC_SUBST([ALSA_LIBS])
 
246
AS_IF([test $with_alsa = "yes"], [audio_methods="${audio_methods} alsa"])
 
247
 
 
248
# check for libao support
 
249
AC_ARG_WITH([libao],
 
250
        [AS_HELP_STRING([--with-libao], [include libao support])],
 
251
        [],
 
252
        [with_libao=check])
 
253
AS_IF([test $with_libao != "no"],
 
254
        [PKG_CHECK_MODULES([LIBAO], [ao],
 
255
                [with_libao=yes
 
256
                AS_IF([test -z "$default_audio_method"],
 
257
                        [default_audio_method=libao])
 
258
                audio_dlopen_modules="$audio_dlopen_modules -dlopen ../audio/spd_libao.la"],
 
259
                [AS_IF([test $with_libao = yes],
 
260
                        [AC_MSG_FAILURE([libao is not available])])])])
 
261
AM_CONDITIONAL([libao_support], [test $with_libao = "yes"])
 
262
AC_SUBST([LIBAO_CFLAGS])
 
263
AC_SUBST([LIBAO_LIBS])
 
264
AS_IF([test $with_libao = "yes"], [audio_methods="${audio_methods} libao"])
 
265
 
 
266
#check for OSS support
 
267
AC_ARG_WITH([oss],
 
268
        [AS_HELP_STRING([--with-oss], [include oss support])],
 
269
        [],
 
270
        [with_oss=check])
 
271
AS_IF([test $with_oss != "no"],
 
272
        [AC_CHECK_HEADER([sys/soundcard.h],
 
273
                [with_oss=yes
 
274
                AS_IF([test -z "$default_audio_method"],
 
275
                        [default_audio_method=oss])
 
276
                audio_dlopen_modules="$audio_dlopen_modules -dlopen ../audio/spd_oss.la"],
 
277
                [AS_IF([test $with_oss = "yes"],
 
278
                        [AC_MSG_FAILURE([oss is not available])])])])
 
279
AM_CONDITIONAL([oss_support], [test $with_oss = "yes"])
 
280
AS_IF([test $with_oss = "yes"], [audio_methods="${audio_methods} oss"])
 
281
 
 
282
# check for NAS support
 
283
AC_ARG_WITH([nas],
 
284
        [AS_HELP_STRING([--with-nas], [include network audio system (nas) support])],
 
285
        [],
 
286
        [with_nas=check])
 
287
AS_IF([test $with_nas != "no"],
 
288
        [AC_CHECK_LIB([audio], [AuOpenServer],
 
289
                [with_nas=yes
 
290
                AS_IF([test -z "$default_audio_method"],
 
291
                        [default_audio_method=nas])
 
292
                audio_dlopen_modules="$audio_dlopen_modules -dlopen ../audio/spd_nas.la";
 
293
                NAS_LIBS="-L/usr/X11R6/lib -lXau -laudio"],
 
294
                [AS_IF([test $with_nas = "yes"],
 
295
                        [AC_MSG_FAILURE([nas is not available])])],
 
296
        [-L/usr/X11R6/lib -lXau])])
 
297
AM_CONDITIONAL([nas_support], [test $with_nas = "yes"])
 
298
AC_SUBST([NAS_LIBS])
 
299
AS_IF([test $with_nas = "yes"], [audio_methods="${audio_methods} nas"])
 
300
 
 
301
AC_ARG_WITH([default-audio-method],
 
302
        [AS_HELP_STRING([--with-default-audio-method=<name>],
 
303
                [defines default audio method (default - first discovered)])],
 
304
        [default_audio_method="$withval"],
 
305
        [])
 
306
AC_SUBST([default_audio_method])
 
307
 
 
308
# We'll build these modules:
 
309
AC_SUBST([audio_dlopen_modules])
 
310
 
 
311
# current, age and revision values for libspeechd.
 
312
LIB_SPD_CURRENT=6 # Current main version (increment on every API change -- incompatible AND extensions)
 
313
LIB_SPD_REVISION=0 # Current minor version (increment on every implementation change)
 
314
LIB_SPD_AGE=4 # Number of backward compatible main versions (LIB_SPD_CURRENT incrementations since last incompatible)
 
315
AC_SUBST([LIB_SPD_CURRENT])
 
316
AC_SUBST([LIB_SPD_REVISION])
 
317
AC_SUBST([LIB_SPD_AGE])
 
318
 
 
319
# Setup GETTEXT
 
320
GETTEXT_PACKAGE=speech-dispatcher
 
321
AC_SUBST([GETTEXT_PACKAGE])
 
322
 
 
323
# Paths for configuration files:
 
324
spdconfdir='${sysconfdir}/speech-dispatcher'
 
325
AC_SUBST([spdconfdir])
 
326
clientconfdir='${spdconfdir}/clients'
 
327
AC_SUBST([clientconfdir])
 
328
moduleconfdir='${spdconfdir}/modules'
 
329
AC_SUBST([moduleconfdir])
 
330
 
 
331
# Paths for read-only copy of configuration files:
 
332
spdconforigdir='${datadir}/speech-dispatcher/conf'
 
333
AC_SUBST([spdconforigdir])
 
334
clientconforigdir='${spdconforigdir}/clients'
 
335
AC_SUBST([clientconforigdir])
 
336
spddesktopconforigdir='${spdconforigdir}/desktop'
 
337
AC_SUBST([spddesktopconforigdir])
 
338
moduleconforigdir='${spdconforigdir}/modules'
 
339
AC_SUBST([moduleconforigdir])
 
340
 
 
341
# Path for sound files:
 
342
snddatadir='${datadir}/sounds/speech-dispatcher'
 
343
AC_SUBST([snddatadir])
 
344
 
 
345
# Path for module binaries:
 
346
AC_ARG_WITH([module-bindir],
 
347
        AS_HELP_STRING([--with-module-bindir],[Directory where to install speech-dispatcher modules (defaults to ${libdir}/speech-dispatcher-modules)]),
 
348
        [modulebindir=$withval], [modulebindir='${libdir}/speech-dispatcher-modules'])
 
349
 
 
350
AC_SUBST([modulebindir])
 
351
 
 
352
# Path for speech-dispatcher libraries:
 
353
spdlibdir='${libdir}/speech-dispatcher'
 
354
AC_SUBST([spdlibdir])
 
355
 
 
356
# Path for audio libraries and plugins:
 
357
audiodir="$spdlibdir"
 
358
AC_SUBST([audiodir])
 
359
 
 
360
# Path for speech-dispatcher include files:
 
361
spdincludedir=${includedir}/speech-dispatcher
 
362
AC_SUBST([spdincludedir])
 
363
 
 
364
AC_CONFIG_FILES([Makefile
 
365
                 speech-dispatcher.pc
 
366
                 config/Makefile
 
367
                 config/clients/Makefile
 
368
                 config/modules/Makefile
 
369
                 doc/Makefile
 
370
                 include/Makefile
 
371
                 po/Makefile.in
 
372
                 src/Makefile
 
373
                 src/api/Makefile
 
374
                 src/api/c/Makefile
 
375
                 src/api/python/Makefile
 
376
                 src/api/python/speechd/Makefile
 
377
                 src/api/python/speechd_config/Makefile
 
378
                 src/audio/Makefile
 
379
                 src/clients/Makefile
 
380
                 src/clients/say/Makefile
 
381
                 src/clients/spdsend/Makefile
 
382
                 src/common/Makefile
 
383
                 src/modules/Makefile
 
384
                 src/server/Makefile
 
385
                 src/tests/Makefile])
 
386
AC_OUTPUT
 
387
AC_MSG_NOTICE([output modules to be built are $output_modules])
 
388
AC_MSG_NOTICE([audio methods to be built are $audio_methods])
 
389
AC_MSG_NOTICE([Default audio method is $default_audio_method])