$OpenBSD: patch-configure_ac,v 1.2 2013/04/28 00:51:34 fgsch Exp $

SOVERSION defaults to 1.0. SHARED_LIBS, however, could be changed
at any point.  Ensure they are on sync in case INSTSONAME is used
by a third party.

Also disable the tests for sem_open. We provide our own
implementation in Modules/_multiprocessing/semaphore.c

--- configure.ac.old	Thu Oct 24 19:48:54 2013
+++ configure.ac	Thu Oct 24 19:48:57 2013
@@ -890,6 +890,9 @@
 	      FreeBSD*)
 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
 		;;
+	      OpenBSD*)
+		SOVERSION=0.0
+		;;
 	  esac
 	  INSTSONAME="$LDLIBRARY".$SOVERSION
 	  ;;
@@ -3784,6 +3787,7 @@
 #include <sys/stat.h>
 
 int main(void) {
+#ifndef __OpenBSD__
   sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
   if (a == SEM_FAILED) {
     perror("sem_open");
@@ -3791,6 +3795,7 @@
   }
   sem_close(a);
   sem_unlink("/autoconf");
+#endif
   return 0;
 }
 ]])],
@@ -3816,6 +3821,7 @@
 #include <sys/stat.h>
 
 int main(void){
+#ifndef __OpenBSD__
   sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
   int count;
   int res;
@@ -3828,6 +3834,9 @@
   sem_close(a);
   sem_unlink("/autocftw");
   return res==-1 ? 1 : 0;
+#else
+  return 0;
+#endif
 }
 ]])],
 [ac_cv_broken_sem_getvalue=no],
