test_str_table_SOURCES = tests/libutil/str_table.c
test_str_table_LDADD = libutil.a libio.a libcompat.a
test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/libutil

test_rbtree_SOURCES = tests/libutil/rbtree.c
test_rbtree_LDADD = libutil.a libcompat.a

test_xxhash_SOURCES = tests/libutil/xxhash.c
test_xxhash_LDADD = libutil.a libcompat.a

test_threadpool_SOURCES = tests/libutil/threadpool.c
test_threadpool_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
test_threadpool_LDADD = libutil.a libcompat.a $(PTHREAD_LIBS)

test_ismemzero_SOURCES = tests/libutil/is_memory_zero.c
test_ismemzero_LDADD = libutil.a libcompat.a

test_canonicalize_name_SOURCES = tests/libutil/canonicalize_name.c
test_canonicalize_name_LDADD = libutil.a libcompat.a

test_filename_sane_SOURCES = tests/libutil/filename_sane.c
test_filename_sane_SOURCES += lib/util/filename_sane.c
test_filename_sane_LDADD = libcompat.a libutil.a

test_filename_sane_w32_SOURCES = tests/libutil/filename_sane.c
test_filename_sane_w32_SOURCES += lib/util/filename_sane.c
test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
test_filename_sane_w32_LDADD = libcompat.a

test_sdate_epoch_SOURCES = tests/libutil/epoch.c
test_sdate_epoch_LDADD = libutil.a libcompat.a

LIBUTIL_TESTS = \
	test_str_table test_rbtree test_xxhash test_threadpool test_ismemzero \
	test_canonicalize_name test_filename_sane test_filename_sane_w32 \
	test_sdate_epoch

check_PROGRAMS += $(LIBUTIL_TESTS)
TESTS += $(LIBUTIL_TESTS)
EXTRA_DIST += $(top_srcdir)/tests/libutil/words.txt