$NetBSD: patch-ab,v 1.1.1.1 2002/01/29 22:35:59 jlam Exp $

--- configure.orig	Sat Oct 13 17:09:16 2001
+++ configure
@@ -8288,6 +8288,10 @@
 EOF
 
 		;;
+		*netbsd*)
+			LDSHFLAGS="-shared -Wl,--export-dynamic"
+			PICFLAG="-fPIC"
+		;;
 		*bsd*) LDSHFLAGS="-shared -Bshareable"
 		;;
 		*irix*) cat >> confdefs.h <<\EOF
@@ -8392,6 +8396,7 @@
 			;;
 esac
 
+if test x$PICFLAG = x; then
 # try to work out how to produce pic code with this compiler
 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
 echo "configure:8398: checking whether ${CC-cc} accepts -fpic" >&5
@@ -8411,6 +8416,7 @@
 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
 if test $ac_cv_prog_cc_fpic = yes; then
     PICFLAG="-fpic";
+fi
 fi
 if test x$PICFLAG = x; then
   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
