$OpenBSD: patch-configure,v 1.2 2004/05/08 06:43:40 sturm Exp $
--- configure.orig	2004-04-25 09:25:25.000000000 +0200
+++ configure	2004-04-25 09:27:48.000000000 +0200
@@ -12734,7 +12734,7 @@ if test -z "$aix_libpath"; then aix_libp
       hardcode_shlibpath_var=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	hardcode_libdir_flag_spec='${wl}-R$libdir'
 	export_dynamic_flag_spec='${wl}-E'
       else
        case $host_os in
@@ -12744,7 +12744,7 @@ if test -z "$aix_libpath"; then aix_libp
 	   ;;
 	 *)
 	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	   hardcode_libdir_flag_spec='${wl}-R$libdir'
 	   ;;
        esac
       fi
@@ -13413,6 +13413,8 @@ openbsd*)
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec="/usr/lib $PREFIX/lib"
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     case $host_os in
       openbsd2.[89] | openbsd2.[89].*)
