$OpenBSD: patch-configure,v 1.5 2011/11/08 23:38:57 jeremy Exp $

Fix so name, checking for DOT and DOXYGEN, and use -pthread.

Override the arch setting to remove OpenBSD version from it,
so ports don't have to be bumped when OpenBSD version changes.

--- configure.orig	Sun Oct 30 02:55:52 2011
+++ configure	Sun Oct 30 19:07:09 2011
@@ -15503,13 +15503,13 @@ fi
 if test x"$enable_pthread" = xyes; then
     for pthread_lib in thr pthread pthreads c c_r root; do
 	as_ac_Lib=`$as_echo "ac_cv_lib_$pthread_lib''_pthread_kill" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -l$pthread_lib" >&5
-$as_echo_n "checking for pthread_kill in -l$pthread_lib... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -$pthread_lib" >&5
+$as_echo_n "checking for pthread_kill in -$pthread_lib... " >&6; }
 if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$pthread_lib  $LIBS"
+LIBS="-$pthread_lib  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -15576,7 +15576,7 @@ done
   c_r) :
     MAINLIBS="-pthread $MAINLIBS" ;; #(
   *) :
-    LIBS="-l$pthread_lib $LIBS" ;;
+    LIBS="-pthread $LIBS" ;;
 esac
     else
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&5
@@ -16568,7 +16568,7 @@ case "$enable_shared" in #(
   openbsd*) :
 
 	SOLIBS='$(LIBS)'
-	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
+	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.'${LIBruby19_VERSION}
 	 ;; #(
   solaris*) :
 
@@ -17390,7 +17390,10 @@ _ACEOF
 _ACEOF
 
 else
-    arch="${target_cpu}-${target_os}"
+    case "$target_os" in
+      openbsd*) arch="$target_cpu-openbsd" ;;
+      *) arch="${target_cpu}-${target_os}" ;;
+    esac
     cat >>confdefs.h <<_ACEOF
 #define RUBY_PLATFORM "${arch}"
 _ACEOF
