forked from ALIZE-Speaker-Recognition/LIA_RAL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
202 lines (184 loc) · 7.75 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
AC_INIT([LIA_RAL], [3.0], [[email protected]])
AM_INIT_AUTOMAKE([foreign subdir-objects])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_SUBST(OS,`uname -s`)
AC_SUBST(ARCH,`uname -m`)
AC_SUBST(ALIZE_PATH)
# enable debug compilation
AC_ARG_ENABLE(debug,
[ --enable-debug compile LIA_RAL with debug information [[default=no]] ],
enable_optimize=$enableval, enable_optimize=no)
if test "$enable_optimize" = "yes"; then
CXXFLAGS="-g -Wall"
AC_SUBST(DEBUG,"_debug")
else
CXXFLAGS="-O3 -ffast-math"
AC_SUBST(DEBUG,"")
fi
# link to LAPACK
AC_ARG_ENABLE(LAPACK,
[ --enable-LAPACK link LIA_RAL to LAPACK library [[default=no]] ],
Lapack=$enableval, Lapack=no)
if test "$Lapack" = "yes"; then
CXXFLAGS="$CXXFLAGS -DLAPACK"
AC_SUBST(LIBLAPACK,"-llapacke -llapack -lrefblas -lgfortran")
else
AC_SUBST(LIBLAPACK,"")
fi
# enable multi-threading
AC_ARG_ENABLE(MT,
[ --enable-MT compile LIA_RAL for multi-threading for X CPUs [[default=no]] ],
nbT=$enableval, nbT=no)
if test "$nbT" = "yes"; then
CXXFLAGS="$CXXFLAGS -DTHREAD"
AC_SUBST(LIBTHREAD,"-lpthread")
else
AC_SUBST(LIBTHREAD,"")
fi
# Checks for alize libraries.
AC_ARG_WITH([alize],
[AS_HELP_STRING([--with-alize=PATH],
[specify the location of the Alize library; defaults to ../alize-core])],
[ALIZE_PATH="$withval"],
[ALIZE_PATH="`pwd`/../alize-core"])
AC_SUBST(ALIZE_PATH)
lib_alize=0
AC_CHECK_FILE([${ALIZE_PATH}/lib/libalize_${OS}_${ARCH}${DEBUG}.a],lib_alize=-lalize_${OS}_${ARCH}${DEBUG},)
AC_CHECK_FILE([${ALIZE_PATH}/lib/libalize.a],lib_alize=-lalize,)
if [[ ${lib_alize} = 0 ]] ; then
AC_MSG_ERROR(alize library (libalize.a or libalize_${OS}_${ARCH}${DEBUG}) not found - searched in "${ALIZE_PATH}/lib")
fi
AC_SUBST(lib_alize)
# Checks for LAPACK libraries.
AC_ARG_WITH([lapack],
[AS_HELP_STRING([--with-lapack=PATH],
[specify the location of the Lapack library; defaults to ../lapack])],
[LAPACK_PATH="$withval"],
[LAPACK_PATH="`pwd`/../lapack"])
AC_SUBST(LAPACK_PATH)
# Link with SPro (for RemoteSpkDet).
AC_ARG_WITH([spro],
[AS_HELP_STRING([--with-spro[[=PATH]]], [link LIA_RAL with the SPro library; the path to SPro defaults to ../spro/ if not provided as an argument])],
[SPRO_PATH="$withval"],
[with_spro=no])
AS_IF([test "x$with_spro" != "xno"], [
AS_IF([test "x$SPRO_PATH" = "xyes"], [
SPRO_PATH="`pwd`/../spro"
])
AC_DEFINE([SPRO])
LIBSPRO="-lspro"
SPRO_LIB_PATH="-L$SPRO_PATH/lib"
AC_CHECK_HEADER([$SPRO_PATH/include/system.h],
[SPRO_INCLUDE_PATH="-I$SPRO_PATH/include"],
[
AC_CHECK_HEADER([$SPRO_PATH/system.h],
[SPRO_INCLUDE_PATH="-I$SPRO_PATH/include -I$SPRO_PATH"],
[AC_MSG_ERROR("cannot find system.h for SPro (neither in $SPRO_PATH/include nor in $SPRO_PATH)")])
])
])
AC_SUBST(SPRO_INCLUDE_PATH)
AC_SUBST(SPRO_LIB_PATH)
AC_SUBST(LIBSPRO)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h float.h netinet/in.h stdlib.h string.h strings.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([floor memmove memset pow sqrt strcasecmp strdup])
# Create the destination directories.
AC_CONFIG_COMMANDS([mkdir], [$MKDIR_P lib bin])
AC_OUTPUT([LIA_SpkTools/Makefile
LIA_SpkTools/src/Makefile
LIA_SpkDet/Makefile
LIA_SpkDet/TrainWorld/Makefile
LIA_SpkDet/TrainWorld/src/Makefile
LIA_SpkDet/ComputeJFAStats/Makefile
LIA_SpkDet/ComputeJFAStats/src/Makefile
LIA_SpkDet/ComputeNorm/Makefile
LIA_SpkDet/ComputeNorm/src/Makefile
LIA_SpkDet/ComputeTest/Makefile
LIA_SpkDet/ComputeTest/src/Makefile
LIA_SpkDet/CovIntra/Makefile
LIA_SpkDet/CovIntra/src/Makefile
LIA_SpkDet/CovIntra/src/SVDLIBC/Makefile
LIA_SpkDet/EigenChannel/Makefile
LIA_SpkDet/EigenChannel/src/Makefile
LIA_SpkDet/EigenVoice/Makefile
LIA_SpkDet/EigenVoice/src/Makefile
LIA_SpkDet/EstimateDMatrix/Makefile
LIA_SpkDet/EstimateDMatrix/src/Makefile
LIA_SpkDet/EnergyDetector/Makefile
LIA_SpkDet/EnergyDetector/src/Makefile
LIA_SpkDet/IvExtractor/Makefile
LIA_SpkDet/IvExtractor/src/Makefile
LIA_SpkDet/IvNorm/Makefile
LIA_SpkDet/IvNorm/src/Makefile
LIA_SpkDet/IvTest/Makefile
LIA_SpkDet/IvTest/src/Makefile
LIA_SpkDet/NormFeat/Makefile
LIA_SpkDet/NormFeat/src/Makefile
LIA_SpkDet/NormFeatWindowMode/Makefile
LIA_SpkDet/NormFeatWindowMode/src/Makefile
LIA_SpkDet/PLDA/Makefile
LIA_SpkDet/PLDA/src/Makefile
LIA_SpkDet/RemoteSpkDet/Makefile
LIA_SpkDet/RemoteSpkDet/src/Makefile
LIA_SpkDet/RemoteSpkDet/Client/Makefile
LIA_SpkDet/ShiftedDeltaFeat/Makefile
LIA_SpkDet/ShiftedDeltaFeat/src/Makefile
LIA_SpkDet/SpkAdapt/Makefile
LIA_SpkDet/SpkAdapt/src/Makefile
LIA_SpkDet/TotalVariability/Makefile
LIA_SpkDet/TotalVariability/src/Makefile
LIA_SpkDet/TrainTarget/Makefile
LIA_SpkDet/TrainTarget/src/Makefile
LIA_Utils/Makefile
LIA_Utils/ExtractParams/Makefile
LIA_Utils/ExtractParams/src/Makefile
LIA_Utils/FusionScore/Makefile
LIA_Utils/FusionScore/src/Makefile
LIA_Utils/Hist/Makefile
LIA_Utils/Hist/src/Makefile
LIA_Utils/LabelFusion/Makefile
LIA_Utils/LabelFusion/src/Makefile
LIA_Utils/NAPSV/Makefile
LIA_Utils/NAPSV/src/Makefile
LIA_Utils/PolyExp/Makefile
LIA_Utils/PolyExp/src/Makefile
LIA_Utils/ReadFeatFile/Makefile
LIA_Utils/ReadFeatFile/src/Makefile
LIA_Utils/ReadModel/Makefile
LIA_Utils/ReadModel/src/Makefile
LIA_Utils/ScoreWarp/Makefile
LIA_Utils/ScoreWarp/src/Makefile
LIA_Utils/Scoring/Makefile
LIA_Utils/Scoring/src/Makefile
LIA_Utils/Svm/Makefile
LIA_Utils/Svm/src/Makefile
LIA_Utils/TimeCluster/Makefile
LIA_Utils/TimeCluster/src/Makefile
LIA_Utils/ModelToSv/Makefile
LIA_Utils/ModelToSv/src/Makefile
LIA_SpkSeg/Makefile
LIA_SpkSeg/AcousticSegmentation/Makefile
LIA_SpkSeg/AcousticSegmentation/src/Makefile
LIA_SpkSeg/ReSegmentation/Makefile
LIA_SpkSeg/ReSegmentation/src/Makefile
LIA_SpkSeg/Segmentation/Makefile
LIA_SpkSeg/Segmentation/src/Makefile
LIA_SpkSeg/TurnDetection/Makefile
LIA_SpkSeg/TurnDetection/src/Makefile
Makefile])