summaryrefslogtreecommitdiff
path: root/multimedia/mplayerxp/files/patch-ad
blob: 6550647eebf3f5ee48a154b1c795adc282569bf6 (plain) (blame)
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
--- configure.orig	Mon Jun 10 20:46:18 2002
+++ configure	Mon Jun 10 20:48:32 2002
@@ -469,19 +469,10 @@
 
 # Try to find the available options for the current CPU
 if x86 || ppc; then
-  if test -r /proc/cpuinfo ; then
-    # linux with /proc mounted, extract cpu information from it
-    _cpuinfo="cat /proc/cpuinfo"
-  elif test -r /compat/linux/proc/cpuinfo ; then
-    # FreeBSD with linux emulation /proc mounted,
-    # extract cpu information from it
-    _cpuinfo="cat /compat/linux/proc/cpuinfo"
-  elif x86; then
     # all other OS try to extract cpu information from a small helper
     # program TOOLS/cpuinfo instead
     $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
     _cpuinfo="TOOLS/cpuinfo"
-  fi
 
   pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
   pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2 | head -1`
@@ -1485,13 +1476,7 @@
 
 
 echocheck "memalign()"
-# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
-cat > $TMPC << EOF
-#include <malloc.h>
-int main (void) { (void) memalign(64, sizeof(char)); return 0; }
-EOF
 _memalign=no
-cc_check && _memalign=yes
 if test "$_memalign" = yes ; then
  _def_memalign='#define HAVE_MEMALIGN 1'
 else
@@ -1568,31 +1553,7 @@
 
 
 echocheck "pthread"
-cat > $TMPC << EOF
-#include <pthread.h>
-void* func(void *arg) { return arg; }
-int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
-EOF
-if ( cc_check && $TMPO ) ; then              # QNX
-  _ld_pthread=''
-elif ( cc_check -lpthread && $TMPO ) ; then
-  _ld_pthread='-lpthread'
-elif ( cc_check -pthread && $TMPO ) ; then
-  _ld_pthread='-pthread'
-else
-  if test "$_ld_static" ; then
-    # for crosscompilation, we cannot execute the program, be happy if we can link statically
-    if ( cc_check -lpthread ) ; then
-      _ld_pthread='-lpthread'
-    elif ( cc_check -pthread ) ; then
-     _ld_pthread='-pthread'
-    else
-      die "Static lib pthread not found. (needed by windows and networking stuff)"
-    fi
-  else
-    die "Lib pthread not found. (needed by windows and networking stuff)"
-  fi
-fi
+_ld_pthread="${PTHREAD_LIBS}"
 echores "yes (using $_ld_pthread)"
 
 
@@ -3219,11 +3180,7 @@
 
 echocheck "iconv"
 if test "$_iconv" = auto ; then
-  if freebsd ; then
-    _iconv_tmp='#include <giconv.h>'
-  else
     _iconv_tmp='#include <iconv.h>'
-  fi
   cat > $TMPC << EOF
 #include <stdio.h>
 #include <unistd.h>
@@ -3257,7 +3214,7 @@
 EOF
   _iconv=no
   if freebsd ; then
-    cc_check  -lm -lgiconv && _iconv=yes
+    cc_check  -lm -liconv && _iconv=yes
   elif bsdos ; then
     cc_check  -lm -liconv && _iconv=yes
   else
@@ -3266,7 +3223,7 @@
 fi
 if test "$_iconv" = yes ; then
   _def_iconv='#define USE_ICONV 1'
-  freebsd && _ld_iconv='-lgiconv'
+  freebsd && _ld_iconv='-liconv'
   bsdos && _ld_iconv='-liconv'
 else
   _def_iconv='#undef USE_ICONV'
@@ -3733,7 +3690,7 @@
   CFLAGS="$CFLAGS -D_REENTRANT"
 elif bsd ; then
   # FIXME bsd needs this so maybe other OS'es
-  CFLAGS="$CFLAGS -D_THREAD_SAFE"
+  CFLAGS="$CFLAGS ${PTHREAD_CFLAGS}"
 fi
 
 # 64 bit file offsets?