$OpenBSD: patch-configure_in,v 1.19 2011/06/15 19:34:45 sthen Exp $
--- configure.in.orig	Tue Jun 14 21:17:28 2011
+++ configure.in	Wed Jun 15 19:57:56 2011
@@ -1566,8 +1566,7 @@ DSO_EXPORTS=""
 			;;
 		*openbsd*)  BLDSHARED="true"
 			LDSHFLAGS="-shared"
-			DYNEXP="-Wl,-Bdynamic"
-			SONAMEFLAG="-Wl,-soname,"
+			DYNEXP="-Wl,--export-dynamic"
 			PICFLAG="-fPIC"
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
 			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
@@ -1713,38 +1712,6 @@ if test x"$BLDSHARED" = x"true" ; then
 fi
 
 AC_MSG_RESULT($BLDSHARED)
-
-saved_before_as_needed_ldflags="$LDFLAGS"
-for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
-	saved_ldflags="$LDFLAGS"
-	AC_MSG_CHECKING([if $flags works])
-	LDFLAGS="$flags $saved_ldflags"
-	AC_TRY_LINK([],[],
-		[AC_MSG_RESULT([yes])
-		LD_AS_NEEDED_FLAG=$flags
-		ld_as_needed_flag_found=yes],
-		AC_MSG_RESULT([no]))
-	LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
-	test x"$ld_as_needed_flag_found" = xyes && break
-done
-
-# check if we have to disable LD_AS_NEEDED_FLAG:
-# On some systems for a veriety of reasons linking with
-# -Wl,--as-needed -lreadline -lncurses fails
-# we have to retest, if these combination is detected before.
-# Bugzilla #7209
-
-if test x$ac_cv_lib_readline_rl_callback_handler_install = xyes ; then
-	if test x$ld_as_needed_flag_found = xyes ; then
-		AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG works with readline])
-		# try if check no fails
-		save_LIBS=$LIBS
-		LIBS="$LIBS $TERMLIBS"
-		AC_TRY_LINK([], [rl_callback_handler_install();], [AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no]); LDFLAGS="$saved_before_as_needed_ldflags"])
-		LIBS="$save_LIBS"
-        fi
-fi
-
 
 
 # for historical reasons almost all linkers don't complain about unresolved
