aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayer/files/patch-configure
blob: fbebd20efe24fc2745425976f48eb82479ced956 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
--- configure.orig  2014-12-17 22:02:44.000000000 +0100
+++ configure   2015-03-28 13:56:41.340987552 +0100
@@ -646,7 +646,7 @@
 _iwmmxt=auto
 _mtrr=auto
 _altivec=auto
-_install=install
+_install=@${BSD_INSTALL_PROGRAM}
 _ranlib=ranlib
 _windres=windres
 _cc=cc
@@ -988,7 +988,7 @@
     ld_static=''
     ;;
   --enable-profile)
-    _profile='-p'
+    _profile='-pg'
     ;;
   --disable-profile)
     _profile=
@@ -1459,7 +1459,6 @@
 
   *)
     echo "Unknown parameter: $ac_option"
-    exit 1
     ;;
 
   esac
@@ -1712,7 +1711,7 @@
   case "$1" in
       x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
       ia64) host_arch=ia64 ;;
-      macppc|ppc*|Power*) host_arch=ppc ;;
+      macppc|powerpc|ppc*|Power*) host_arch=ppc ;;
       alpha) host_arch=alpha ;;
       sun4*|sparc*) host_arch=sparc ;;
       parisc*|hppa*|9000*) host_arch=hppa ;;
@@ -1834,7 +1833,11 @@
 cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
 echo "yes"
 
-cflag_check "-lm" && libm="-lm"
+if test -z "$_profile" ; then
+  cflag_check "-lm" && libm="-lm"
+else
+  cflag_check "-lm_p" && libm="-lm_p"
+fi
 
 if test -z "$_target" ; then
   cat > $TMPC << EOF
@@ -3164,6 +3167,13 @@
   fi
   echores "$setend"
 
+  echocheck "ARM setend"
+  if test $setend = "auto" ; then
+    setend=no
+    inline_asm_check '"setend be"' && setend=yes
+  fi
+  echores "$setend"
+
   echocheck "softfloat ABI"
   softfloat=yes
   cpp_condition_check '' 'defined(__ARM_PCS_VFP) || (!defined(__ARM_PCS) && !defined(__SOFTFP__))' && softfloat=no
@@ -3798,17 +3808,17 @@
 echores "$aligned_malloc"
 
 
-echocheck "memalign()"
+echocheck "aligned_alloc()"
 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
-def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
+def_memalign='#define HAVE_MEMALIGN 0'
 _memalign=no
-statement_check malloc.h 'memalign(64, sizeof(char))' && _memalign=yes
+statement_check stdlib.h 'aligned_alloc(32, 32*sizeof(char))' && _memalign=yes
 if test "$_memalign" = yes ; then
-  def_memalign='#define HAVE_MEMALIGN 1'
+  def_map_memalign='#define memalign(a, b) aligned_alloc(a, b)'
+  def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
 else
-  def_memalign='#define HAVE_MEMALIGN 0'
   def_map_memalign='#define memalign(a, b) malloc(b)'
-  darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
+  def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
 fi
 echores "$_memalign"
 
@@ -3914,7 +3924,7 @@
 if linux ; then
   THREAD_CFLAGS=-D_REENTRANT
 elif freebsd || netbsd || openbsd || bsdos ; then
-  THREAD_CFLAGS=-D_THREAD_SAFE
+  THREAD_CFLAGS=
 fi
 if test "$_pthreads" = auto ; then
 cat > $TMPC << EOF
@@ -3924,7 +3934,7 @@
 EOF
 _pthreads=no
 if ! hpux ; then
-  for ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
+  for ld_tmp in "-lpthread" "-pthread" ; do
     # for crosscompilation, we cannot execute the program, be happy if we can link statically
     cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break
   done
@@ -4076,7 +4086,7 @@
   # NOTE: -L/usr/lib is a hack to avoid issues due to a
   # broken libiconv that e.g. macports installs into /opt/local/lib
   # which might get addded to the search path later by e.g. SDL
-  for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
+  for ld_tmp in "" "-L$_prefix/lib -liconv" "-L%%LOCALBASE%%/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
     cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" &&
       ld_iconv="$ld_tmp" && _iconv=yes && break
   done
@@ -5474,15 +5484,6 @@
       break
     fi
   done
-  if test "$_x11" = yes && cc_check -DGL_EGL_X11 -lEGL ; then
-    _gl=yes
-    _gl_egl_x11=yes
-    libs_mplayer="$libs_mplayer -lEGL $ld_dl"
-  elif cc_check -DGL_EGL_ANDROID -lEGL ; then
-    _gl=yes
-    _gl_egl_android=yes
-    libs_mplayer="$libs_mplayer -lEGL $ld_dl"
-  fi
   if win32 && cc_check -DGL_WIN32 -lopengl32 ; then
     _gl=yes
     _gl_win32=yes
@@ -6046,7 +6047,7 @@
 elif dragonfly ; then
   default_cdrom_device="/dev/cd0"
 elif freebsd ; then
-  default_cdrom_device="/dev/acd0"
+  default_cdrom_device="/dev/cdrom"
 elif openbsd ; then
   default_cdrom_device="/dev/rcd0c"
 elif sunos ; then
@@ -6059,7 +6060,7 @@
   default_cdrom_device="/dev/cdrom"
 fi
 
-if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
+if win32 || os2 || dragonfly || openbsd || sunos || amigaos ; then
   default_dvd_device=$default_cdrom_device
 elif darwin ; then
   default_dvd_device="/dev/rdiskN"
@@ -6133,8 +6134,8 @@
         cat > $TMPC << EOF
 #include <stdio.h>
 #include <cdio/version.h>
-#include <cdio/cdda.h>
-#include <cdio/paranoia.h>
+#include <cdio/paranoia/cdda.h>
+#include <cdio/paranoia/paranoia.h>
 int main(void) {
     void *test = cdda_verbose_set;
     printf("%s\n", CDIO_VERSION);
@@ -6566,7 +6567,7 @@
 echocheck "libgsm"
 if test "$_libgsm" = auto ; then
   _libgsm=no
-  statement_check gsm/gsm.h 'gsm_create()' -lgsm && _libgsm=yes
+  statement_check gsm.h 'gsm_create()' -lgsm && _libgsm=yes
 fi
 if test "$_libgsm" = yes ; then
   def_libgsm='#define CONFIG_LIBGSM 1'
@@ -7051,6 +7052,16 @@
   nolibrtmp=no
   def_librtmp='#define CONFIG_LIBRTMP 1'
   inputmodules="librtmp $inputmodules"
+
+  if $_pkg_config --exists librtmp; then
+   _inc_tmp=$($_pkg_config --cflags librtmp)
+   _ld_tmp=$($_pkg_config --libs librtmp)
+  else
+   _inc_tmp="-I${LOCALBASE}/include"
+   _ld_tmp="-L${LOCALBASE}/lib -lrtmp -lz -lssl -lcrypto"
+  fi
+  extra_ldflags="$extra_ldflags $_ld_tmp"
+  extra_cflags="$extra_cflags $_inc_tmp"
 else
   nolibrtmp=yes
   _librtmp=no
@@ -7450,7 +7461,7 @@
 echocheck "mencoder"
 if test "$_mencoder" = no ; then
   # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
-  libavencoders="$mplayer_encoders MPEG1VIDEO_ENCODER SNOW_ENCODER"
+  libavencoders="$mplayer_encoders MPEG1VIDEO_ENCODER H263_ENCODER SNOW_ENCODER"
 fi
 echores "$_mencoder"
 
@@ -8329,7 +8340,7 @@
 EXESUF      = $_exesuf
 EXESUFS_ALL = .exe
 
-ARCH = $arch
+MPLAYER_ARCH = $arch
 $(mak_enable "$arch_all"    "$arch"    ARCH)
 $(mak_enable "$subarch_all" "$subarch" ARCH)
 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)