summaryrefslogtreecommitdiff
path: root/lang/python21/patches/patch-bg
blob: a2eef90243c12c781ce05751064020711aaf0afb (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
$NetBSD: patch-bg,v 1.1 2005/11/08 18:14:49 joerg Exp $

--- configure.orig	2001-12-27 21:55:46.000000000 +0000
+++ configure
@@ -2966,6 +2966,7 @@ then
 		else
 			LDSHARED="ld -Bshareable"
 		fi;;
+	DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
 	FreeBSD*)
 		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
 		then
@@ -3003,7 +3004,7 @@ then
 	Linux*) CCSHARED="-fPIC";;
 	BSD/OS*/4*) CCSHARED="-fpic";;
 	OpenBSD*) CCSHARED="-fpic";;
-	FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
+	FreeBSD*|NetBSD*|DragonFly*) CCSHARED="-fPIC";;
 	UnixWare*)
 		if test "$GCC" = "yes"
 		then CCSHARED="-fPIC"
@@ -3042,7 +3043,7 @@ then
 	UnixWare*) LINKFORSHARED="-dy -Bdynamic -Wl,-Bexport";;
 	SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
 	ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
-	FreeBSD*|NetBSD*) 
+	FreeBSD*|NetBSD*|DragonFly*) 
 		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
 		then
 			LINKFORSHARED="-Wl,--export-dynamic"
@@ -3523,14 +3524,14 @@ EOF
 else
   
 	echo "$ac_t""no" 1>&6
-	echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:3528: checking for pthread_create in -lpthread" >&5
+	echo $ac_n "checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}""... $ac_c" 1>&6
+echo "configure:3528: checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 3536 "configure"
 #include "confdefs.h"
@@ -3567,7 +3568,7 @@ EOF
 EOF
 
 	posix_threads=yes
-	LIBS="-lpthread $LIBS"
+	LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
 	LIBOBJS="$LIBOBJS thread.o"
 else
   echo "$ac_t""no" 1>&6