$NetBSD: patch-ad,v 1.4 2004/10/03 09:20:41 tron Exp $ --- configure- 2004-05-16 05:05:10.000000000 +0900 +++ configure 2004-05-16 05:08:20.000000000 +0900 @@ -5416,14 +5416,22 @@ if $use_threads then - echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5 -echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6 - pkg="$LOCALBASE/pthreads" - lib1="-L$pkg/lib -Wl,-R$pkg/lib" - lib2="-lpthread -lm -lgcc -lpthread" - LIBS="$lib1 $lib2 $LIBS" - CPPFLAGS="$CPPFLAGS -I$pkg/include" - STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" + if test -f /usr/include/pthreads.h + then + echo "$as_me:$LINENO: result: native pthreads" >&5 + LIBS="-lpthread $LIBS" + CPPFLAGS="$CPPFLAGS -I/usr/include" + STD_CINCLUDES="$STD_CINCLUDES -I/usr/include" + else + echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5 + echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6 + pkg="$LOCALBASE/pthreads" + lib1="-L$pkg/lib -Wl,-R$pkg/lib" + lib2="-lpthread -lm -lgcc -lpthread" + LIBS="$lib1 $lib2 $LIBS" + CPPFLAGS="$CPPFLAGS -I$pkg/include" + STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" + fi fi fi fi