summaryrefslogtreecommitdiff
path: root/devel/pwlib/patches/patch-ae
blob: dbc681a5e8844505aa6ff10a747ac074cf72db97 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
$NetBSD: patch-ae,v 1.6 2006/10/12 17:28:16 rillig Exp $

--- configure.orig	2004-11-22 00:15:48.000000000 +0100
+++ configure	2006-10-12 19:26:05.000000000 +0200
@@ -2059,6 +2059,14 @@ case "$target_os" in
                    need_pragma=yes ;
 		   ;;
 
+  dragonfly* )     OSTYPE=DragonFly ;
+		   OS_TAG="P_DRAGONFLY" ;
+                   if test "x$OSRELEASE" = "x"; then
+                     OSRELEASE="`sysctl -n kern.osreldate`" ;
+                   fi
+                   need_pragma=yes ;
+		   ;;
+
   openbsd* )       OSTYPE=OpenBSD ;
 		   OS_TAG="P_OPENBSD" ;
                    OSRELEASE="`sysctl -n kern.osrevision`" ;
@@ -3144,13 +3152,13 @@ fi
 
 
 
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
+echo $ECHO_N "checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6
 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3214,7 +3222,7 @@ else
 fi
 
 if test ${HAS_PTHREADS} = yes ; then
-  ENDLDLIBS="$ENDLDLIBS -lpthread"
+  ENDLDLIBS="$ENDLDLIBS ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
   STDCCFLAGS="$STDCCFLAGS -D_REENTRANT"
 else
     echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
@@ -3303,6 +3311,8 @@ fi
 if test ${HAS_PTHREADS} = yes ; then
   echo "$as_me:$LINENO: checking if pthread_mutex_timedlock is available" >&5
 echo $ECHO_N "checking if pthread_mutex_timedlock is available... $ECHO_C" >&6
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}  $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3320,7 +3330,7 @@ pthread_mutex_timedlock(NULL, NULL);
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -3346,6 +3356,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 HAS_PTHREADS_XPG6=no
 fi
+LIBS=$ac_check_lib_save_LIBS
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   if test ${HAS_PTHREADS_XPG6} = yes ; then
     echo "$as_me:$LINENO: result: yes" >&5
@@ -3360,13 +3371,13 @@ _ACEOF
 echo "${ECHO_T}no" >&6
   fi
 
-  echo "$as_me:$LINENO: checking for sem_timedwait in -lpthread" >&5
-echo $ECHO_N "checking for sem_timedwait in -lpthread... $ECHO_C" >&6
+  echo "$as_me:$LINENO: checking for sem_timedwait in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
+echo $ECHO_N "checking for sem_timedwait in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6
 if test "${ac_cv_lib_pthread_sem_timedwait+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3504,7 +3515,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
   ;
   return 0;
 }
@@ -6483,7 +6494,7 @@ fi
 done
 
   if test "${HAS_SDL:-unset}" != "unset" ; then
-    if test "${X11LIBDIR:-unset}" == "unset" ; then
+    if test "${X11LIBDIR:-unset}" = "unset" ; then
 	X11LIBDIR=/usr/X11R6/lib
     fi
     echo "$as_me:$LINENO: checking for SDL_CreateYUVOverlay in -lSDL" >&5
@@ -6492,7 +6503,7 @@ if test "${ac_cv_lib_SDL_SDL_CreateYUVOv
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lSDL -L${X11LIBDIR} -lpthread -lX11 -lXext -laa $LIBS"
+LIBS="-lSDL -L${X11LIBDIR} ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} -lX11 -lXext -laa $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF