$OpenBSD: patch-admin_ltmain_sh,v 1.1 2006/05/08 16:41:41 espie Exp $
--- admin/ltmain.sh.orig	Tue Apr 18 03:18:14 2006
+++ admin/ltmain.sh	Mon May  8 13:08:02 2006
@@ -1301,6 +1301,17 @@ EOF
 	continue
 	;;
 
+      -pthread)
+        case $host in
+	*-*-openbsd*)
+	  deplibs="$deplibs $arg"
+	  ;;
+	*)
+	  continue
+	  ;;
+	esac
+	;;
+
       -module)
 	module=yes
 	continue
@@ -1997,6 +2008,30 @@ EOF
 	  fi
 	  continue
 	  ;;
+	-pthread)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    ;;
+	  *)
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -pthread
 	%DEPLIBS%)
 	  alldeplibs=yes
 	  continue
