summaryrefslogtreecommitdiff
path: root/multimedia/libvpx/patches/patch-ad
blob: 2a5cf49bf9ff6aa8268503e1f9c8ba14630f50ee (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
$NetBSD: patch-ad,v 1.3 2011/06/16 13:22:48 seanb Exp $

*BSD and qnx are identified as linux.

--- build/make/configure.sh.orig	2011-03-04 20:40:37.000000000 +0000
+++ build/make/configure.sh
@@ -559,7 +559,7 @@ process_common_toolchain() {
                 [ -z "$tgt_isa" ] && tgt_isa=x86
                 tgt_os=win32
                 ;;
-            *linux*|*bsd*)
+            *linux*|*bsd*|*qnx6*)
                 tgt_os=linux
                 ;;
             *solaris2.10)
@@ -975,10 +975,29 @@ EOF
     if enabled multithread; then
         case ${toolchain} in
             *-win*);;
-            *) check_header pthread.h && add_extralibs -lpthread
+            *) check_header pthread.h && add_extralibs ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
         esac
     fi
 
+    case ${tgt_os} in
+    darwin*)
+	add_extralibs -lm
+	;;
+    solaris*)
+	add_extralibs -lm -lrt
+	;;
+    linux*)
+	case ${gcctarget} in
+	*qnx6*)
+	    add_extralibs -lm
+	    ;;
+	*)
+	    add_extralibs -lm -lrt
+	    ;;
+	esac
+	;;
+    esac
+
     # glibc needs these
     if enabled linux; then
         add_cflags -D_LARGEFILE_SOURCE