From: Eugeniy Meshcheryakov <eugen@debian.org>
Subject: Add -pthread flag when adding -D_REENTRANT

This is an attempt to fix build failure on Hurd. This is the only architecture in
Debian that should be affected by the change.

See also bug #697133.
--- a/src/configure.in
+++ b/src/configure.in
@@ -778,7 +778,8 @@
   AC_CHECK_LIB(pthread, main)
     if test "$ac_cv_lib_pthread_main" = "yes"; then
       pthread_ok=true
-      CMFLAGS="$CMFLAGS -D_REENTRANT"
+      CMFLAGS="$CMFLAGS -D_REENTRANT -pthread"
+      LDFLAGS="$LDFLAGS -pthread"
     fi
   fi
 
