$OpenBSD: patch-sigsegv_autoconf_ltconfig,v 1.1 2001/03/31 19:20:09 naddy Exp $
--- sigsegv/autoconf/ltconfig.orig	Tue Jul  4 14:05:20 2000
+++ sigsegv/autoconf/ltconfig	Sat Mar 31 19:59:32 2001
@@ -703,7 +703,7 @@ hardcode_shlibpath_var=unsupported
 runpath_var=
 
 case "$host_os" in
-amigaos* | beos* | sunos4*)
+amigaos* | beos* | sunos4* | openbsd*)
   # On these operating systems, we should treat GNU ld like the system ld.
   gnu_ld_acts_native=yes
   ;;
@@ -826,10 +826,21 @@ else
     ;;
 
   openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
+    case "$host_os" in
+      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	archive_cmds='$LD -Bshareable -o $lib$libobjs'
+	hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+      *)
+	archive_cmds='$CC -shared $pic_flag -o $lib$libobjs'
+	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+	  export_dynamic_flag_spec='${wl}-E'
+	fi
+      ;;
+    esac
     ;;
 
   os2*)
