forked from festvox/festvox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
173 lines (161 loc) · 5.94 KB
/
configure.in
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
dnl########################################################################
dnl ##
dnl Language Technologies Institute ##
dnl Carnegie Mellon University ##
dnl Copyright (c) 1999-2002 ##
dnl All Rights Reserved. ##
dnl ##
dnl Permission is hereby granted, free of charge, to use and distribute ##
dnl this software and its documentation without restriction, including ##
dnl without limitation the rights to use, copy, modify, merge, publish, ##
dnl distribute, sublicense, and/or sell copies of this work, and to ##
dnl permit persons to whom this work is furnished to do so, subject to ##
dnl the following conditions: ##
dnl 1. The code must retain the above copyright notice, this list of ##
dnl conditions and the following disclaimer. ##
dnl 2. Any modifications must be clearly marked as such. ##
dnl 3. Original authors' names are not deleted. ##
dnl 4. The authors' names are not used to endorse or promote products ##
dnl derived from this software without specific prior written ##
dnl permission. ##
dnl ##
dnl CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
dnl DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
dnl ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
dnl SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
dnl ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
dnl THIS SOFTWARE. ##
dnl ##
dnl########################################################################
AC_INIT(src/unitsel/setup_clunits)
AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_C_BIGENDIAN
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
SHFLAGS=
OTHERLIBS=
if test "$shared" = true; then
case "$host_os" in
linux*)
SHFLAGS="-fPIC"
;;
solaris*)
SHFLAGS="-fPIC"
OTHERLIBS="-lsocket -ldl"
;;
*)
;;
esac
fi
AC_SUBST(SHFLAGS)
dnl Apple doesn't support the elif construct, so else if them ...
if test "x$ESTDIR" = x; then
if test -f /usr/src/speech_tools-1.4.2/include/EST.h; then
ESTDIR=/usr/src/speech_tools-1.4.2
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/local/src/speech_tools-1.4.2/include/EST.h; then
ESTDIR=/usr/local/src/speech_tools-1.4.2
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/local/speech_tools-1.4.2/include/EST.h; then
ESTDIR=/usr/local/speech_tools-1.4.2
fi
fi
if test "x$ESTDIR" = x; then
if test -f /opt/speech_tools-1.4.2/include/EST.h; then
ESTDIR=/opt/speech_tools-1.4.2
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/src/speech_tools/include/EST.h; then
ESTDIR=/usr/src/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/local/src/speech_tools/include/EST.h; then
ESTDIR=/usr/local/src/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/local/speech_tools/include/EST.h; then
ESTDIR=/usr/local/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f /opt/speech_tools/include/EST.h; then
ESTDIR=/opt/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f /usr/include/EST.h; then
ESTDIR=/usr
fi
fi
if test "x$ESTDIR" = x; then
if test -f /home/awb/projects/1.4.3/speech_tools/include/EST.h; then
ESTDIR=/home/awb/projects/1.4.3/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f /home/awb/projects/1.4.2/speech_tools/include/EST.h; then
ESTDIR=/home/awb/projects/1.4.2/speech_tools
fi
fi
if test "x$ESTDIR" = x; then
if test -f "$PWD/../speech_tools/include/EST.h"; then
ESTDIR="$PWD/../speech_tools"
fi
fi
if test "x$ESTDIR" = x; then
if test -f "$cwd/../speech_tools/include/EST.h"; then
ESTDIR="$cwd/../speech_tools"
fi
fi
if test "x$ESTDIR" = x; then
AC_MSG_ERROR("Cannot locate Edinburgh Speech Tools. please specify ESTDIR explicitly.")
fi
echo Edinburgh Speech Tools found in $ESTDIR
AC_SUBST(ESTDIR)
dnl Add support to check for thread support
NOPTHREADFLAGS=""
multithreading=true
AC_ARG_ENABLE( multithreading,
[ --disable-multithreading build without multithreading support],
[ multithreading=false ])
if test "x$multithreading" = xtrue; then
have_pthreads=no
AC_SEARCH_LIBS([pthread_create], [pthread],
[have_pthreads=yes])
if test "x${have_pthreads}" = xyes; then
AC_CHECK_HEADER([pthread.h], [],
[have_pthreads=no])
fi
if test "x${have_pthreads}" = xno; then
echo "------------------------------------------"
echo " Unable to find pthread on this system. "
echo " Building a single-threaded version. "
echo "------------------------------------------"
NOPTHREADFLAGS="${NOPTHREADFLAGS} -DFESTVOX_NO_THREADS"
fi
else
NOPTHREADFLAGS="${NOPTHREADFLAGS} -DFESTVOX_NO_THREADS"
echo "------------------------------------------"
echo " Multithreading support disabled. "
echo " "
echo " Run without --disable-multithreading "
echo " if you want thread support "
echo "------------------------------------------"
fi dnl test for multithreading
AC_SUBST(NOPTHREADFLAGS)
AC_OUTPUT(config/config)