$NetBSD: patch-aa,v 1.3 2009/04/11 19:03:53 spz Exp $

--- configure.ac.orig	2009-04-01 13:35:15.000000000 +0000
+++ configure.ac
@@ -55,6 +55,7 @@ AM_CONDITIONAL([HAVE_CURSES], [test x$ha
 save_LIBS="${LIBS}"
 LIBS=""
 AC_SEARCH_LIBS(pthread_create, [thr pthread c_r])
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
 PTHREAD_LIBS="${LIBS}"
 LIBS="${save_LIBS}"
 AC_SUBST(PTHREAD_LIBS)
@@ -195,7 +196,7 @@ AC_ARG_ENABLE(kqueue,
 
 if test "$enable_kqueue" = yes; then
 	case $target in
-	*-*-freebsd* | *-*-darwin9* )
+	*-*-freebsd* | *-*-darwin9* | *-*-netbsd* )
 		AC_CHECK_FUNCS([kqueue])
 		;;
 	*-*-bsd*)
