-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
135 lines (104 loc) · 3.2 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
AC_PREREQ([2.68])
AC_INIT([festcat-voice-template], [0.2], [https://github.com/zeehio/festival-ca/issues],[festcat-voice-template], [http://festcat.talp.cat])
AC_ARG_VAR(INST, [The first part of the voice name, typically "upc" in FestCat voices. ])
AC_ARG_VAR(VOX, [ A nice speaker name, such as "pau", "ona" or "bet".])
AC_ARG_VAR(GENDER, [ Either "male" or "female".])
AC_ARG_VAR(DIALECT, [ Native speaker dialect.])
AC_ARG_VAR(PROMPTS, [ The prompts.data file ])
AC_ARG_VAR(CLOSESTVOICE, [ A similar existing voice ("upc_ca_ona_hts") ])
AC_ARG_VAR(FESTVOXDIR, [ Festvox directory ])
AC_ARG_VAR(WAVDIR, [ Directory where all *.wav files are. ])
AC_ARG_VAR(ESTDIR, [ Directory where Speech Tools is. ]) # FIXME: Replace this by the required individual components.
if test "x$ESTDIR" = x; then
AC_MSG_ERROR(ESTDIR was not set.)
fi
if test "x$INST" = x; then
AC_MSG_ERROR(INST was not set.)
fi
if test "x$VOX" = x; then
AC_MSG_ERROR(VOX was not set.)
fi
if test "x$GENDER" = x; then
AC_MSG_ERROR(GENDER was not set.)
exit -1
fi
if test "x$DIALECT" = x; then
AC_MSG_ERROR(DIALECT was not set.)
exit -1
fi
if test "x$PROMPTS" = x; then
AC_MSG_ERROR(PROMPTS file path was not set)
exit -1
fi
if test "x$WAVDIR" = x; then
AC_MSG_ERROR(WAVDIR file path was not set)
exit -1
fi
LANG="ca"
TYPE="clunits"
if test "x$CLOSESTVOICE" = x; then
AC_MSG_ERROR(CLOSESTVOICE was not set.)
exit -1
fi
if test "x$FESTVOXDIR" = x; then
AC_MSG_ERROR(FESTVOXDIR was not set.)
exit -1
fi
# Checks for programs.
# Checks for Festival: Required to build and to install.
AC_ARG_ENABLE(festivalpath,AS_HELP_STRING([--enable-festivalpath],[--enable-festivalpath=/path/to/festival (specify a custom festival path)]),[festivalpath=$enableval])
if test -d "${festivalpath}"; then
echo "using custom festival path: $festivalpath"
else
festivalpath="$PATH"
fi
# FESTIVALBIN
AC_PATH_PROG([FESTIVALBIN], [festival], [:], [${festivalpath}])
if test ! -f "${FESTIVALBIN}"; then
AC_MSG_ERROR(Can't find festival)
fi
# Checks for libdir and datadir
${FESTIVALBIN} --pipe > /dev/null 2>&1 << EOF
(set! fp (fopen "datadir.txt" "w"))
(if (boundp 'datadir)
(format fp datadir)
(format fp libdir)
)
(fclose fp)
EOF
FESTDATADIR=`cat "datadir.txt"`
rm "datadir.txt"
if test ! -d "${FESTDATADIR}"; then
AC_MSG_ERROR(Can't find neither datadir or libdir)
fi
echo "Festival data directory: ${FESTDATADIR} found."
# WAGON
# Checks for using Wagon:
AC_ARG_ENABLE(wagonpath,AS_HELP_STRING([--enable-wagonpath],[--enable-wagonpath=/path/to/wagon (specify a custom wagon path)]),[wagonpath=$enableval])
if test -d "${wagonpath}"; then
echo "using custom wagon path: $wagonpath"
else
wagonpath="$PATH"
fi
AC_PATH_PROG([WAGON], [wagon], [:], [${wagonpath}])
if test ! -f "${WAGON}"; then
AC_MSG_ERROR(Can't find wagon)
fi
AC_PROG_MKDIR_P
AC_PROG_INSTALL
AC_SUBST(INST)
AC_SUBST(LANG)
AC_SUBST(VOX)
AC_SUBST(TYPE)
AC_SUBST(GENDER)
AC_SUBST(DIALECT)
AC_SUBST(PROMPTS)
AC_SUBST(FESTIVALBIN)
AC_SUBST(FESTDATADIR)
AC_SUBST(FESTVOXDIR)
AC_SUBST(WAGON)
AC_SUBST(WAVDIR)
AC_SUBST(ESTDIR)
AC_SUBST(FESTVOXDIR)
AC_CONFIG_FILES([festvox/CLUNITS_clunits.scm festvox/build_clunits.scm etc/voice.defs Makefile])
AC_OUTPUT