-tests_testudp_SOURCES= tests/mem_udp.c
-tests_testudp_LDADD= \
- clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
- $(TESTS_LDADDS)
-tests_testudp_DEPENDENCIES= $(tests_testudp_LDADD)
-
-tests_startservers_SOURCES= tests/start.c
-tests_startservers_LDADD= tests/libserver.la $(TESTS_LDADDS)
-tests_startservers_DEPENDENCIES= $(tests_startservers_LDADD)
-
-tests_testhashkit_SOURCES = tests/hashkit_functions.c
-tests_testhashkit_LDADD = tests/libtest.la libhashkit/libhashkit.la
-tests_testhashkit_DEPENDENCIES = $(tests_testhashkit_LDADD)
-
-tests_hashplus_SOURCES = tests/hash_plus.cc
-tests_hashplus_LDADD = $(tests_testhashkit_LDADD)
-tests_hashplus_DEPENDENCIES = $(tests_testhashkit_LDADD)
-
-tests_memplus_SOURCES = tests/mem_plus.cc
-tests_memplus_LDADD = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
-tests_memplus_DEPENDENCIES = $(tests_memplus_LDADD)
-
-test: test-docs test-mem test-hash memcapable
- echo "Tests completed"
-
-test-x: test-docs test-plus test-mem test-hash memcapable test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
- echo "Tests completed"
-
-memcapable: clients/memcapable
- @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
- @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
- @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
- @rm tests/Xumemc.pid
+tests_testudp_SOURCES= tests/mem_udp.cc
+tests_testudp_DEPENDENCIES= $(TESTS_LDADDS)
+tests_testudp_LDADD= $(tests_testudp_DEPENDENCIES) $(LIBSASL)
+check_PROGRAMS+= tests/testudp
+noinst_PROGRAMS+= tests/testudp
+
+tests_testhashkit_SOURCES = tests/hashkit_functions.cc
+tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
+tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES)
+check_PROGRAMS+= tests/testhashkit
+noinst_PROGRAMS+= tests/testhashkit
+
+tests_hash_plus_SOURCES= tests/hash_plus.cc
+tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_hash_plus_DEPENDENCIES= $(tests_testhashkit_DEPENDENCIES)
+tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
+check_PROGRAMS+= tests/hash_plus
+noinst_PROGRAMS+= tests/hash_plus
+
+tests_memcapable_SOURCES= tests/memcapable.cc
+tests_memcapable_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memcapable_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS)
+tests_memcapable_LDADD= $(tests_memcapable_DEPENDENCIES)
+check_PROGRAMS+= tests/memcapable
+noinst_PROGRAMS+= tests/memcapable
+
+tests_memslap_SOURCES= tests/memslap.cc
+tests_memslap_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memslap_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS)
+tests_memslap_LDADD= $(tests_memslap_DEPENDENCIES)
+check_PROGRAMS+= tests/memslap
+noinst_PROGRAMS+= tests/memslap
+
+test: check
+
+check-local: tests/var $(TEST_DOCS)
+ @echo "Tests completed"
+
+test-x: tests/var test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
+ @echo "Tests completed"