$NetBSD: patch-ab,v 1.5 2004/04/07 15:13:06 jmmv Exp $

--- ../dist/configure.orig	2001-07-13 03:34:11.000000000 +0200
+++ ../dist/configure	2004-04-07 17:02:25.000000000 +0200
@@ -4329,6 +4329,7 @@
 if test "$GXX" = "yes"; then
 	CXXVERSION=`${MAKEFILE_CXX} --version`
 	case ${CXXVERSION} in
+	egcs*)	CXXFLAGS="-fexceptions $CXXFLAGS";;
 	1.*|2.[01234567].*|*-1.*|*-2.[01234567].*)
 		CXXFLAGS="-fhandle-exceptions $CXXFLAGS";;
 	*)
@@ -8439,7 +8440,7 @@
 # Prevent multiple expansion
 
 LIBTOOL="\$(SHELL) ./libtool"
-SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool`
+SOSUFFIX=`./libtool --config | sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'`
 SOFLAGS="-rpath \$(libdir)"
 
 SAVE_CC="${MAKEFILE_CC}"
@@ -8449,7 +8450,7 @@
 MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
 MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${SAVE_CXX}"
 
-SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version"
+SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
 INSTALLER="\$(LIBTOOL) --mode=install cp"
 
 # Configure for shared libraries, static libraries, or both.  If both are
@@ -9165,6 +9166,7 @@
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthread  $LIBS"
+LIBSO_LIBS="-lpthread  $LIBSO_LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line 9169 "configure"
 #include "confdefs.h"
