| 1 |
--- |
| 2 |
test/regression/testfuncs.sh.in | 8 ++++---- |
| 3 |
test/unit/test_alloc/Makefile.am | 6 ++---- |
| 4 |
test/unit/test_bitvec/Makefile.am | 6 ++---- |
| 5 |
test/unit/test_case/Makefile.am | 8 +++----- |
| 6 |
test/unit/test_cmdln/Makefile.am | 7 ++----- |
| 7 |
test/unit/test_fe/Makefile.am | 6 ++---- |
| 8 |
test/unit/test_feat/Makefile.am | 6 ++---- |
| 9 |
test/unit/test_fsg/Makefile.am | 6 ++---- |
| 10 |
test/unit/test_hash/Makefile.am | 9 +++------ |
| 11 |
test/unit/test_lineiter/Makefile.am | 6 ++---- |
| 12 |
test/unit/test_logmath/Makefile.am | 7 ++----- |
| 13 |
test/unit/test_matrix/Makefile.am | 7 ++----- |
| 14 |
test/unit/test_ngram/Makefile.am | 6 ++---- |
| 15 |
test/unit/test_string/Makefile.am | 6 ++---- |
| 16 |
test/unit/test_thread/Makefile.am | 6 ++---- |
| 17 |
test/unit/test_util/Makefile.am | 6 ++---- |
| 18 |
test/unit/testfuncs.sh.in | 4 ++-- |
| 19 |
17 files changed, 38 insertions(+), 72 deletions(-) |
| 20 |
|
| 21 |
--- a/test/unit/test_alloc/Makefile.am |
| 22 |
+++ b/test/unit/test_alloc/Makefile.am |
| 23 |
@@ -4,12 +4,10 @@ check_PROGRAMS = test_ckd_alloc test_ckd |
| 24 |
TESTS = test_ckd_alloc test_ckd_alloc_catch test_ckd_alloc_fail.sh test_ckd_alloc_abort.sh \ |
| 25 |
test_listelem_alloc |
| 26 |
AM_CFLAGS =\ |
| 27 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 28 |
- -I$(top_srcdir)/include \ |
| 29 |
- -I$(top_builddir)/include \ |
| 30 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 31 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" |
| 32 |
|
| 33 |
noinst_HEADERS = test_macros.h |
| 34 |
EXTRA_DIST = test_ckd_alloc_fail.sh test_ckd_alloc_abort.sh |
| 35 |
|
| 36 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 37 |
+LDADD = -lsphinxbase |
| 38 |
--- a/test/unit/test_bitvec/Makefile.am |
| 39 |
+++ b/test/unit/test_bitvec/Makefile.am |
| 40 |
@@ -2,11 +2,9 @@ check_PROGRAMS = test_bitvec |
| 41 |
|
| 42 |
TESTS = test_bitvec |
| 43 |
AM_CFLAGS =\ |
| 44 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 45 |
- -I$(top_srcdir)/include \ |
| 46 |
- -I$(top_builddir)/include \ |
| 47 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 48 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" |
| 49 |
|
| 50 |
noinst_HEADERS = test_macros.h |
| 51 |
|
| 52 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 53 |
+LDADD = -lsphinxbase |
| 54 |
--- a/test/unit/test_case/Makefile.am |
| 55 |
+++ b/test/unit/test_case/Makefile.am |
| 56 |
@@ -1,12 +1,10 @@ |
| 57 |
check_PROGRAMS = chgCase |
| 58 |
|
| 59 |
|
| 60 |
-AM_CFLAGS =\ |
| 61 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 62 |
- -I$(top_srcdir)/include \ |
| 63 |
- -I$(top_builddir)/include |
| 64 |
|
| 65 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la -lm |
| 66 |
+AM_CFLAGS = $(shell pkg-config --cflags sphinxbase) |
| 67 |
+ |
| 68 |
+LDADD = -lsphinxbase -lm |
| 69 |
|
| 70 |
TESTS = _lcase1.test \ |
| 71 |
_lcase2.test \ |
| 72 |
--- a/test/unit/test_cmdln/Makefile.am |
| 73 |
+++ b/test/unit/test_cmdln/Makefile.am |
| 74 |
@@ -1,11 +1,8 @@ |
| 75 |
check_PROGRAMS = cmdln_parse cmdln_parse_multiple cmdln_parse_r |
| 76 |
|
| 77 |
-AM_CFLAGS =\ |
| 78 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 79 |
- -I$(top_srcdir)/include \ |
| 80 |
- -I$(top_builddir)/include |
| 81 |
+AM_CFLAGS = $(shell pkg-config --cflags sphinxbase) |
| 82 |
|
| 83 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la -lm |
| 84 |
+LDADD = -lsphinxbase -lm |
| 85 |
|
| 86 |
CLEANFILES = _test*.err _test*.out |
| 87 |
|
| 88 |
--- a/test/unit/test_fe/Makefile.am |
| 89 |
+++ b/test/unit/test_fe/Makefile.am |
| 90 |
@@ -2,11 +2,9 @@ check_PROGRAMS = test_fe test_pitch |
| 91 |
|
| 92 |
TESTS = test_fe test_pitch |
| 93 |
AM_CFLAGS =\ |
| 94 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 95 |
- -I$(top_srcdir)/include \ |
| 96 |
- -I$(top_builddir)/include \ |
| 97 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 98 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" |
| 99 |
|
| 100 |
noinst_HEADERS = test_macros.h |
| 101 |
|
| 102 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 103 |
+LDADD = -lsphinxbase |
| 104 |
--- a/test/unit/test_feat/Makefile.am |
| 105 |
+++ b/test/unit/test_feat/Makefile.am |
| 106 |
@@ -2,13 +2,11 @@ check_PROGRAMS = test_feat test_feat_liv |
| 107 |
noinst_HEADERS = test_macros.h |
| 108 |
|
| 109 |
AM_CFLAGS =\ |
| 110 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 111 |
- -I$(top_srcdir)/include \ |
| 112 |
- -I$(top_builddir)/include \ |
| 113 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 114 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" |
| 115 |
|
| 116 |
|
| 117 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 118 |
+LDADD = -lsphinxbase |
| 119 |
|
| 120 |
TESTS = _test_feat.test test_feat_live test_feat_fe test_subvq |
| 121 |
EXTRA_DIST = _test_feat.res _test_feat.test |
| 122 |
--- a/test/unit/test_fsg/Makefile.am |
| 123 |
+++ b/test/unit/test_fsg/Makefile.am |
| 124 |
@@ -6,12 +6,10 @@ check_PROGRAMS = \ |
| 125 |
TESTS = $(check_PROGRAMS) |
| 126 |
|
| 127 |
AM_CFLAGS =\ |
| 128 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 129 |
- -I$(top_srcdir)/include \ |
| 130 |
- -I$(top_builddir)/include \ |
| 131 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 132 |
-DLMDIR=\"${srcdir}\" |
| 133 |
|
| 134 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 135 |
+LDADD = -lsphinxbase |
| 136 |
|
| 137 |
noinst_HEADERS = test_macros.h |
| 138 |
|
| 139 |
--- a/test/unit/test_hash/Makefile.am |
| 140 |
+++ b/test/unit/test_hash/Makefile.am |
| 141 |
@@ -2,12 +2,9 @@ check_PROGRAMS = displayhash deletehash |
| 142 |
|
| 143 |
noinst_HEADERS = test_macros.h |
| 144 |
|
| 145 |
-AM_CFLAGS =\ |
| 146 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 147 |
- -I$(top_srcdir)/include \ |
| 148 |
- -I$(top_builddir)/include |
| 149 |
+AM_CFLAGS = $(shell pkg-config --cflags sphinxbase) |
| 150 |
|
| 151 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 152 |
+LDADD = -lsphinxbase |
| 153 |
|
| 154 |
TESTS = test_hash_iter \ |
| 155 |
_hash_delete1.test \ |
| 156 |
@@ -28,4 +25,4 @@ EXTRA_DIST = display.res \ |
| 157 |
_hash_delete5.res \ |
| 158 |
_hash_delete5.test |
| 159 |
|
| 160 |
-CLEANFILES = *.out |
| 161 |
\ No newline at end of file |
| 162 |
+CLEANFILES = *.out |
| 163 |
--- a/test/unit/test_lineiter/Makefile.am |
| 164 |
+++ b/test/unit/test_lineiter/Makefile.am |
| 165 |
@@ -2,12 +2,10 @@ check_PROGRAMS = test_lineiter |
| 166 |
TESTS = test_lineiter |
| 167 |
|
| 168 |
AM_CFLAGS =\ |
| 169 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 170 |
- -I$(top_srcdir)/include \ |
| 171 |
- -I$(top_builddir)/include \ |
| 172 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 173 |
-DFILEDIR=\"$(srcdir)\" |
| 174 |
|
| 175 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la -lm |
| 176 |
+LDADD = -lsphinxbase -lm |
| 177 |
|
| 178 |
noinst_HEADERS = test_macros.h |
| 179 |
|
| 180 |
--- a/test/unit/test_logmath/Makefile.am |
| 181 |
+++ b/test/unit/test_logmath/Makefile.am |
| 182 |
@@ -1,12 +1,9 @@ |
| 183 |
check_PROGRAMS = test_log_int16 test_log_int8 test_log_shifted |
| 184 |
TESTS = test_log_int16 test_log_int8 test_log_shifted |
| 185 |
|
| 186 |
-AM_CFLAGS =\ |
| 187 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 188 |
- -I$(top_srcdir)/include \ |
| 189 |
- -I$(top_builddir)/include |
| 190 |
+AM_CFLAGS = $(shell pkg-config --cflags sphinxbase) |
| 191 |
|
| 192 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la -lm |
| 193 |
+LDADD = -lsphinxbase -lm |
| 194 |
|
| 195 |
noinst_HEADERS = test_macros.h |
| 196 |
|
| 197 |
--- a/test/unit/test_matrix/Makefile.am |
| 198 |
+++ b/test/unit/test_matrix/Makefile.am |
| 199 |
@@ -5,12 +5,9 @@ test_solve_SRCS = test_solve.c |
| 200 |
test_invert_SRCS = test_invert.c |
| 201 |
test_determinant_SRCS = test_determinant.c |
| 202 |
|
| 203 |
-AM_CFLAGS =\ |
| 204 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 205 |
- -I$(top_srcdir)/include \ |
| 206 |
- -I$(top_builddir)/include |
| 207 |
+AM_CFLAGS = $(shell pkg-config --cflags sphinxbase) |
| 208 |
|
| 209 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la -lm |
| 210 |
+LDADD = -lsphinxbase -lm |
| 211 |
|
| 212 |
|
| 213 |
TESTS = _test_determinant.test \ |
| 214 |
--- a/test/unit/test_ngram/Makefile.am |
| 215 |
+++ b/test/unit/test_ngram/Makefile.am |
| 216 |
@@ -10,12 +10,10 @@ check_PROGRAMS = \ |
| 217 |
TESTS = $(check_PROGRAMS) |
| 218 |
|
| 219 |
AM_CFLAGS =\ |
| 220 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 221 |
- -I$(top_srcdir)/include \ |
| 222 |
- -I$(top_builddir)/include \ |
| 223 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 224 |
-DLMDIR=\"${srcdir}\" |
| 225 |
|
| 226 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 227 |
+LDADD = -lsphinxbase |
| 228 |
|
| 229 |
noinst_HEADERS = test_macros.h |
| 230 |
|
| 231 |
--- a/test/unit/test_string/Makefile.am |
| 232 |
+++ b/test/unit/test_string/Makefile.am |
| 233 |
@@ -1,12 +1,10 @@ |
| 234 |
check_PROGRAMS = strtest test_atof |
| 235 |
|
| 236 |
AM_CFLAGS =\ |
| 237 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 238 |
- -I$(top_srcdir)/include \ |
| 239 |
- -I$(top_builddir)/include \ |
| 240 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 241 |
-DTESTDATADIR=\"$(srcdir)\" |
| 242 |
|
| 243 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 244 |
+LDADD = -lsphinxbase |
| 245 |
|
| 246 |
TESTS = _fread_line.test \ |
| 247 |
_nextword.test \ |
| 248 |
--- a/test/unit/test_thread/Makefile.am |
| 249 |
+++ b/test/unit/test_thread/Makefile.am |
| 250 |
@@ -6,12 +6,10 @@ check_PROGRAMS = \ |
| 251 |
TESTS = $(check_PROGRAMS) |
| 252 |
|
| 253 |
AM_CFLAGS =\ |
| 254 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 255 |
- -I$(top_srcdir)/include \ |
| 256 |
- -I$(top_builddir)/include \ |
| 257 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 258 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" |
| 259 |
|
| 260 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 261 |
+LDADD = -lsphinxbase |
| 262 |
|
| 263 |
noinst_HEADERS = test_macros.h |
| 264 |
|
| 265 |
--- a/test/unit/test_util/Makefile.am |
| 266 |
+++ b/test/unit/test_util/Makefile.am |
| 267 |
@@ -10,13 +10,11 @@ check_PROGRAMS = \ |
| 268 |
TESTS = $(check_PROGRAMS) |
| 269 |
|
| 270 |
AM_CFLAGS =\ |
| 271 |
- -I$(top_srcdir)/include/sphinxbase \ |
| 272 |
- -I$(top_srcdir)/include \ |
| 273 |
- -I$(top_builddir)/include \ |
| 274 |
+ $(shell pkg-config --cflags sphinxbase) \ |
| 275 |
-DTESTDATADIR=\"$(top_srcdir)/test/regression\" \ |
| 276 |
-DLMDIR=\"${top_srcdir}/test/unit/test_ngram\" |
| 277 |
|
| 278 |
-LDADD = ${top_builddir}/src/libsphinxbase/libsphinxbase.la |
| 279 |
+LDADD = -lsphinxbase |
| 280 |
|
| 281 |
noinst_HEADERS = test_macros.h |
| 282 |
|
| 283 |
--- a/test/regression/testfuncs.sh.in |
| 284 |
+++ b/test/regression/testfuncs.sh.in |
| 285 |
@@ -11,21 +11,21 @@ failures="" |
| 286 |
trap "report_failures" 0 |
| 287 |
|
| 288 |
run_program() { |
| 289 |
- program="$1" |
| 290 |
+ program="${1/*\/}" |
| 291 |
shift |
| 292 |
- $builddir/libtool --mode=execute "$builddir/src/$program" $@ |
| 293 |
+ "/usr/bin/$program" $@ |
| 294 |
} |
| 295 |
|
| 296 |
debug_program() { |
| 297 |
program="$1" |
| 298 |
shift |
| 299 |
- $builddir/libtool --mode=execute gdb --args "$builddir/src/$program" $@ |
| 300 |
+ gdb --args "/usr/bin/$program" $@ |
| 301 |
} |
| 302 |
|
| 303 |
memcheck_program() { |
| 304 |
program="$1" |
| 305 |
shift |
| 306 |
- $builddir/libtool --mode=execute valgrind --leak-check=full "$builddir/src/$program" $@ |
| 307 |
+ valgrind --leak-check=full "/usr/bin/$program" $@ |
| 308 |
} |
| 309 |
|
| 310 |
pass() { |
| 311 |
--- a/test/unit/testfuncs.sh.in |
| 312 |
+++ b/test/unit/testfuncs.sh.in |
| 313 |
@@ -11,9 +11,9 @@ failures="" |
| 314 |
trap "report_failures" 0 |
| 315 |
|
| 316 |
run_program() { |
| 317 |
- program="$1" |
| 318 |
+ program="${1/*\/}" |
| 319 |
shift |
| 320 |
- $builddir/libtool --mode=execute "$builddir/src/$program/$program" $@ |
| 321 |
+ "/usr/bin/$program" $@ |
| 322 |
} |
| 323 |
|
| 324 |
pass() { |