summaryrefslogtreecommitdiff
path: root/net/irrd/patches/patch-aa
blob: 6475d9d76e251014e618f7878e4b27b12a90b530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
$NetBSD: patch-aa,v 1.7 2004/12/31 23:01:33 kim Exp $

--- configure.in.orig	2003-11-17 15:29:46.000000000 -0500
+++ configure.in	2004-12-31 17:55:25.000000000 -0500
@@ -10,27 +10,23 @@
 dnl I've seen a report that pthread support is shaky in FreeBSD 2.x releases
 case "${host_os}" in
     freebsd2* )
-	disable_thread=yes
+	enable_thread=no
     ;;
     solaris*|linux*|freebsd* )
-	disable_thread=no
+	enable_thread=yes
     ;;
     * ) 
-	disable_thread=yes
+	enable_thread=no
     ;;
 esac
 
 AC_ARG_ENABLE(thread,
 [  --disable-thread        disable thread always],
-[disable_thread=yes],)
-
-AC_ARG_ENABLE(thread,
-[  --enable-thread         enable thread (on non-solaris platform)],
-[disable_thread=no],)
+)
 
 AC_ARG_ENABLE(wall,
 [  --disable-wall          disable -Wall option always],
-[disable_wall=yes],)
+)
 
 pwd=`pwd`
 pwd=`basename $pwd`
@@ -65,7 +61,7 @@
 dnl fi
 
 AC_MSG_CHECKING(for -Wall option)
-if test "$disable_wall" = yes; then
+if test "$enable_wall" != yes; then
    if test "$GCC" != "yes"; then
 dnl shut up SUN WorkShop Compilers
        CFLAGS="$CFLAGS -w"
@@ -115,12 +111,18 @@
         LIBS="$LIBS -lipc"
     ;;
     freebsd*|netbsd*|openbsd* )
-        if test "$disable_thread" != yes; then
+        if test "$enable_thread" = yes; then
 		LDFLAGS="$LDFLAGS -pthread"
                 THREAD_CFLAGS="-D_THREAD_SAFE -pthread"
         fi
 	CRYPT_LIB="-lcrypt"
-        ac_pthrlib="c_r"
+	case "${host_os}" in
+	    netbsd* )
+	    ;;
+	    * )
+		ac_pthrlib="c_r"
+	    ;;
+	esac
     ;;
     linux* )
 	CRYPT_LIB="-lcrypt"
@@ -129,7 +131,7 @@
 	if test $CC = "cc" ; then
            CPPFLAGS="$CPPFLAGS -taso -pthread"
         fi
-        if test "$disable_thread" != yes; then
+        if test "$enable_thead" = yes; then
 		LDFLAGS="$LDFLAGS -lc_r"
                 THREAD_CFLAGS="-D_THREAD_SAFE"
 	fi
@@ -152,7 +154,7 @@
 AC_SUBST(MAKEDEPCLEAN)
 
 dnl Checks for pthread libraries. (linux has pthread.h only, so ...)
-if test "$disable_thread" = yes; then
+if test "$enable_thread" != yes; then
   AC_MSG_CHECKING(for thread support)
   AC_MSG_RESULT(disabled)
 else