]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1590. [port] netbsd: update thread support.
authorMark Andrews <marka@isc.org>
Wed, 10 Mar 2004 03:24:06 +0000 (03:24 +0000)
committerMark Andrews <marka@isc.org>
Wed, 10 Mar 2004 03:24:06 +0000 (03:24 +0000)
CHANGES
configure.in

diff --git a/CHANGES b/CHANGES
index 64972022b5b6db997b86286d3e7e40d11b1f3ca8..32919e49f63b3404f8e5d1e13fb9464d25c3ed27 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1590.  [port]          netbsd: update thread support.
+
 1588.  [bug]           win32: TCP sockets could become blocked. [RT #10115]
 
 1587.  [bug]           dns_message_settsigkey() failed to clear existing key.
index 42a0f34d378d468cf779fe9251c37eb61da35db8..87dbc128d304c79f2f5a5a452a733e0151bc854e 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-AC_REVISION($Revision: 1.294.2.30 $)
+AC_REVISION($Revision: 1.294.2.31 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -551,9 +551,14 @@ case $host in
         # UnixWare
        use_threads=false ;;
 *-netbsd*)
-       # Socket I/O optimizations introduced in 9.2 expose a
-       # bug in unproven-pthreads; see PR #12650
-       use_threads=false ;;
+       if test -r /usr/lib/libpthread.so ; then
+           use_threads=true
+       else
+           # Socket I/O optimizations introduced in 9.2 expose a
+           # bug in unproven-pthreads; see PR #12650
+           use_threads=false
+       fi
+       ;;
 *-openbsd*)
        # OpenBSD users have reported that named dumps core on
        # startup when built with threads.
@@ -628,21 +633,27 @@ then
 [linking with PTL2 is highly experimental and not expected to work])
                        CC=ptlgcc
                else
-                       if test ! -d $LOCALBASE/pthreads
+                       if test -r /usr/lib/libpthread.so
                        then
-                               AC_MSG_RESULT(none)
-                               AC_MSG_ERROR("could not find thread libraries")
-                       fi
+                               AC_MSG_RESULT(native)
+                               LIBS="-lpthread $LIBS"
+                       else
+                               if test ! -d $LOCALBASE/pthreads
+                               then
+                                       AC_MSG_RESULT(none)
+                                       AC_MSG_ERROR("could not find thread libraries")
+                               fi
 
-                       if $use_threads
-                       then
-                               AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
-                               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 $use_threads
+                               then
+                                       AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
+                                       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
                ;;