Properly guard drd/tests/thread_name with HAVE_PTHREAD_BARRIER. Partial fix for BZ#344416 (at least reduces required hacks).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15172 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am
index eb5b1ff..a21e709 100644
--- a/drd/tests/Makefile.am
+++ b/drd/tests/Makefile.am
@@ -373,7 +373,6 @@
   sem_as_mutex        \
   sem_open            \
   sigalrm             \
-  thread_name         \
   threaded-fork       \
   trylock             \
   unit_bitmap         \
@@ -417,7 +416,7 @@
 
 if HAVE_PTHREAD_BARRIER
 check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit \
-	pth_barrier_thr_cr
+	pth_barrier_thr_cr thread_name
 endif
 
 if HAVE_PTHREAD_CREATE_GLIBC_2_0