$NetBSD: patch-ae,v 1.3 2004/05/15 21:00:58 itojun Exp $ --- lib/bind/configure.orig 2004-02-24 11:32:40.000000000 +0900 +++ lib/bind/configure 2004-05-16 05:09:21.000000000 +0900 @@ -4497,7 +4497,8 @@ echo "$as_me: WARNING: linking with PTL2 is highly experimental and not expected to work" >&2;} CC=ptlgcc else - if test ! -d $LOCALBASE/pthreads + if test ! -d $LOCALBASE/pthreads \ + -a ! -f /usr/include/pthread.h then echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 @@ -4506,14 +4507,23 @@ if $use_threads then - echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5 + if test -f /usr/include/pthread.h + then + echo "$as_me:$LINENO: result: native pthreads" >&5 +echo "${ECHO_T}native pthreads" >&6 + 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" + 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 ;;