forked from rhasspy/rhasspy-tts-cli-hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
129 lines (96 loc) · 3.46 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
AC_INIT([rhasspy-tts-cli-hermes], [0.2.0], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])
PC_INIT([3.7.0])
dnl ---------------------------------------------------------------------------
AC_PREFIX_DEFAULT([$PWD/.venv])
dnl Template files to write
AC_CONFIG_FILES([Makefile rhasspy-tts-cli-hermes])
AC_CANONICAL_HOST
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_CC
AC_PROG_CXX
dnl ---------------------------------------------------------------------------
is_virtualenv_enabled=yes
dnl An in-place install does not include Rhasspy Python modules, since they will
dnl be used directly from source.
is_in_place=no
dnl --------------
dnl Text to Speech
dnl --------------
is_nanotts_enabled=UNKNOWN
nanotts_from=prebuilt
dnl Set architectures based on host CPU
AS_CASE([$host_cpu],
[armv6l],[
dnl ARM 32-bit v6 (Pi 1/0)
docker_arch=armv6
is_nanotts_enabled=yes
],
[armv7l],[
dnl ARM 32-bit v7 (Pi 2/3/4)
docker_arch=armv7
is_nanotts_enabled=yes
],
[aarch64],[
dnl ARM 64-bit (Pi 3/4)
docker_arch=arm64
is_nanotts_enabled=yes
],
[x86_64],[
dnl x86_64 compatible
docker_arch=amd64
is_nanotts_enabled=yes
])
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE([in-place],
AS_HELP_STRING([--enable-in-place],
[do not install Rhasspy Python modules in virtual environment (will be used from source)]))
precompiled_binaries_enabled=yes
AC_ARG_ENABLE([precompiled-binaries],
AS_HELP_STRING([--disable-precompiled-binaries],
[build dependencies from source instead of downloading prebuilt binaries]))
dnl ---------------------------------------------------------------------------
dnl Python virtual environment
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE([virtualenv],
[AS_HELP_STRING([--disable-virtualenv],
[don't create a Python virtual environment at prefix])])
AC_ARG_VAR([VIRTUALENV_FLAGS], [flags to pass to when creating virtual environment])
dnl In-place install
AS_CASE([$enable_in_place],
[yes],[is_in_place=yes],
[no],[is_in_place=no])
dnl ---------------------------------------------------------------------------
dnl Text to Speech
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE([nanotts],
AS_HELP_STRING([--disable-nanotts],
[disable installation of nanoTTS text to speech system]))
dnl ---------------------------------------------------------------------------
dnl Summary
dnl ---------------------------------------------------------------------------
dnl Prefix is NONE for some reason instead of default value
summary_prefix=$prefix
AS_IF([test "x$summary_prefix" = xNONE], [
summary_prefix=$PWD/.venv
])
AS_ECHO(["
configuration summary:
architecture: ${host_cpu}/${docker_arch}
prefix: ${summary_prefix}
virtualenv: ${is_virtualenv_enabled}
in-place: ${is_in_place}"])
AS_ECHO(["
text to speech:"])
AS_ECHO([" nanoTTS: ${is_nanotts_enabled} (${nanotts_from})"])
AS_ECHO([""])
dnl ---------------------------------------------------------------------------
dnl Output
dnl ---------------------------------------------------------------------------
AC_SUBST([VIRTUALENV], [$is_virtualenv_enabled])
AC_SUBST([DOCKER_ARCH], [$docker_arch])
AC_SUBST([ENABLE_NANOTTS], [$is_nanotts_enabled])
AC_SUBST([NANOTTS_FROM], [$nanotts_from])
AC_SUBST([IN_PLACE], [$is_in_place])
AC_OUTPUT