$OpenBSD: patch-Source_cmComputeLinkInformation_cxx,v 1.3 2012/06/14 09:32:00 dcoppa Exp $

Fix libpthread linking on OpenBSD: use '-pthread' instead of
'-lpthread'.

--- Source/cmComputeLinkInformation.cxx.orig	Wed Apr 18 20:10:54 2012
+++ Source/cmComputeLinkInformation.cxx	Mon Jun 11 14:28:03 2012
@@ -1304,7 +1304,19 @@ void cmComputeLinkInformation::AddUserItem(std::string
     }
 
   // Create an option to ask the linker to search for the library.
+#if defined(__OpenBSD__)
+  std::string out;
+  if(strcmp(lib.c_str(), "pthread") == 0)
+    {
+    out += "-";
+    }
+  else
+    {
+    out += this->LibLinkFlag;
+    }
+#else
   std::string out = this->LibLinkFlag;
+#endif
   out += lib;
   out += this->LibLinkSuffix;
   this->Items.push_back(Item(out, false));
