1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # FFmpeg configure script
|
---|
4 | #
|
---|
5 | # Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
---|
6 | # Copyright (c) 2005-2006 Diego Biurrun
|
---|
7 | # Copyright (c) 2005-2006 Mans Rullgard
|
---|
8 | #
|
---|
9 |
|
---|
10 | # make sure we are running under a compatible shell
|
---|
11 | # try to make this part work with most shells
|
---|
12 |
|
---|
13 | try_exec(){
|
---|
14 | echo "Trying shell $1"
|
---|
15 | type "$1" >/dev/null 2>&1 && exec "$@"
|
---|
16 | }
|
---|
17 |
|
---|
18 | unset foo
|
---|
19 | (: ${foo%%bar}) 2>/dev/null
|
---|
20 | E1="$?"
|
---|
21 |
|
---|
22 | (: ${foo?}) 2>/dev/null
|
---|
23 | E2="$?"
|
---|
24 |
|
---|
25 | if test "$E1" != 0 || test "$E2" = 0; then
|
---|
26 | echo "Broken shell detected. Trying alternatives."
|
---|
27 | export FF_CONF_EXEC
|
---|
28 | if test "0$FF_CONF_EXEC" -lt 1; then
|
---|
29 | FF_CONF_EXEC=1
|
---|
30 | try_exec bash "$0" "$@"
|
---|
31 | fi
|
---|
32 | if test "0$FF_CONF_EXEC" -lt 2; then
|
---|
33 | FF_CONF_EXEC=2
|
---|
34 | try_exec ksh "$0" "$@"
|
---|
35 | fi
|
---|
36 | if test "0$FF_CONF_EXEC" -lt 3; then
|
---|
37 | FF_CONF_EXEC=3
|
---|
38 | try_exec /usr/xpg4/bin/sh "$0" "$@"
|
---|
39 | fi
|
---|
40 | echo "No compatible shell script interpreter found."
|
---|
41 | echo "This configure script requires a POSIX-compatible shell"
|
---|
42 | echo "such as bash or ksh."
|
---|
43 | echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH."
|
---|
44 | echo "Instead, install a working POSIX-compatible shell."
|
---|
45 | echo "Disabling this configure test will create a broken FFmpeg."
|
---|
46 | if test "$BASH_VERSION" = '2.04.0(1)-release'; then
|
---|
47 | echo "This bash version ($BASH_VERSION) is broken on your platform."
|
---|
48 | echo "Upgrade to a later version if available."
|
---|
49 | fi
|
---|
50 | exit 1
|
---|
51 | fi
|
---|
52 |
|
---|
53 | show_help(){
|
---|
54 | echo "Usage: configure [options]"
|
---|
55 | echo "Options: [defaults in brackets after descriptions]"
|
---|
56 | echo
|
---|
57 | echo "Standard options:"
|
---|
58 | echo " --help print this message"
|
---|
59 | #echo " --log[=FILE|yes|no] log tests and output to FILE [config.err]"
|
---|
60 | echo " --previous use previous configure parameters if possible"
|
---|
61 | echo " --compile-type=CTYPE one of release, profile, debug [$compile_type]"
|
---|
62 | echo " NOTE: profile is for sampling profilers"
|
---|
63 | echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
|
---|
64 | echo " --libdir-name=LIBNAME search/install libraries in PREFIX/LIBNAME [$libdir_name]"
|
---|
65 | echo " --disable-ccache disable compiler cache (ccache)"
|
---|
66 | echo " --disable-distcc disable distributed compilation (distcc)"
|
---|
67 | #echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
|
---|
68 | #echo " --shlibdir=DIR install shared libs in DIR [PREFIX/lib]"
|
---|
69 | #echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
|
---|
70 | #echo " --mandir=DIR install man page in DIR [PREFIX/man]"
|
---|
71 | #echo " --enable-mingw32 enable MinGW native/cross Windows compile"
|
---|
72 | #echo " --enable-mingwce enable MinGW native/cross WinCE compile"
|
---|
73 | #echo " --enable-static build static libraries [default=yes]"
|
---|
74 | #echo " --disable-static do not build static libraries [default=no]"
|
---|
75 | #echo " --enable-shared build shared libraries [default=no]"
|
---|
76 | #echo " --disable-shared do not build shared libraries [default=yes]"
|
---|
77 | #echo " --enable-pp enable GPLed postprocessing support [default=no]"
|
---|
78 | #echo " --enable-swscaler software scaler support [default=no]"
|
---|
79 | #echo " --enable-beosthreads use BeOS threads [default=no]"
|
---|
80 | #echo " --enable-os2threads use OS/2 threads [default=no]"
|
---|
81 | #echo " --enable-pthreads use pthreads [default=no]"
|
---|
82 | #echo " --enable-w32threads use Win32 threads [default=no]"
|
---|
83 | #echo
|
---|
84 | #echo "External library support:"
|
---|
85 | #echo " --enable-sunmlib use Sun medialib [default=no]"
|
---|
86 | #echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
|
---|
87 | #echo " and libraw1394 [default=no]"
|
---|
88 | #echo " --enable-a52 enable GPLed liba52 support [default=no]"
|
---|
89 | #echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
|
---|
90 | #echo " --enable-avisynth allow reading AVISynth script files [default=no]"
|
---|
91 | #echo " --enable-libdts enable GPLed libdts support [default=no]"
|
---|
92 | #echo " --enable-libfaac enable FAAC support via libfaac [default=no]"
|
---|
93 | #echo " --enable-libfaad enable FAAD support via libfaad [default=no]"
|
---|
94 | #echo " --enable-libfaadbin build FAAD support with runtime linking [default=no]"
|
---|
95 | #echo " --enable-libgsm enable GSM support via libgsm [default=no]"
|
---|
96 | #echo " --enable-libmp3lame enable MP3 encoding via libmp3lame [default=no]"
|
---|
97 | #echo " --enable-libnut enable NUT (de)muxing via libnut,"
|
---|
98 | #echo " native demuxer exists [default=no]"
|
---|
99 | #echo " --enable-libogg enable Ogg muxing via libogg [default=no]"
|
---|
100 | #echo " --enable-libtheora enable Theora encoding via libtheora [default=no]"
|
---|
101 | #echo " --enable-libvorbis enable Vorbis en/decoding via libvorbis,"
|
---|
102 | #echo " native implementations exist [default=no]"
|
---|
103 | #echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
|
---|
104 | #echo " --enable-xvid enable Xvid encoding via xvidcore,"
|
---|
105 | #echo " native MPEG-4/Xvid encoder exists [default=no]"
|
---|
106 | #echo " --enable-amr-nb enable amr-nb floating point audio codec"
|
---|
107 | #echo " --enable-amr-nb-fixed enable amr-nb fixed-point codec"
|
---|
108 | #echo " --enable-amr-wb enable amr-wb floating point audio codec"
|
---|
109 | echo ""
|
---|
110 | echo "Advanced options (experts only):"
|
---|
111 | #echo " --source-path=PATH path to source code [$source_path]"
|
---|
112 | #echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
|
---|
113 | #echo " --cross-compile assume a cross-compiler is used"
|
---|
114 | #echo " --target-os=OS compiler targets OS [$targetos]"
|
---|
115 | #echo " --cc=CC use C compiler CC [$cc]"
|
---|
116 | #echo " --make=MAKE use specified make [$make]"
|
---|
117 | echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
|
---|
118 | echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
|
---|
119 | echo " --enable-symbol-visibility enables symbol visibility options"
|
---|
120 | #echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
|
---|
121 | #echo " --build-suffix=SUFFIX suffix for application specific build []"
|
---|
122 | echo " --arch=ARCH select architecture [$arch]"
|
---|
123 | echo " --tune=CPU tune instruction usage for a particular CPU [$tune]"
|
---|
124 | echo " --cpu=CPU selects the minimum cpu required (affects"
|
---|
125 | echo " instruction selection, may crash on older CPUs)"
|
---|
126 | #echo " --enable-powerpc-perf enable performance report on PPC"
|
---|
127 | #echo " (requires enabling PMC)"
|
---|
128 | echo " --disable-mmx disable MMX usage"
|
---|
129 | #echo " --disable-armv5te disable armv5te usage"
|
---|
130 | #echo " --disable-armv6 disable armv6 usage"
|
---|
131 | #echo " --disable-iwmmxt disable iwmmxt usage"
|
---|
132 | #echo " --disable-altivec disable AltiVec usage"
|
---|
133 | echo "Advanced features (experts only):"
|
---|
134 | echo " --disable-audio-oss disable OSS audio support [default=no]"
|
---|
135 | echo " --disable-audio-alsa disable ALSA audio support"
|
---|
136 | echo " --disable-audio-arts disable aRts audio support"
|
---|
137 | echo " --disable-audio-jack disable JACK audio support"
|
---|
138 | echo " --enable-libdts enable DTS passthrough, requires libdts"
|
---|
139 | echo " --enable-valgrind disables timeouts for valgrind memory debugging"
|
---|
140 | # Don't print disable frontend/backend options, these
|
---|
141 | # cause breakage and people use them inappropriately. -- dtk
|
---|
142 | #echo " --disable-frontend disable frontend [breaks dependency checking, previews]"
|
---|
143 | #echo " --disable-backend disable backend [breaks dependency checking]"
|
---|
144 | echo " --disable-lirc disable lirc support (Infrared Remotes)"
|
---|
145 | echo " --disable-joystick-menu disable joystick menu"
|
---|
146 | echo " --disable-lmsensors disable linux hw monitor support"
|
---|
147 | echo " --disable-firewire disable support for FireWire cable boxes"
|
---|
148 | echo " --disable-iptv disable support for recording RTSP/UDP/RTP streams"
|
---|
149 | echo " --disable-dbox2 disable support for Nokia DBOX2 DVB boxes (or compatibles)"
|
---|
150 | echo " --disable-hdhomerun disable support for HDHomeRun boxes"
|
---|
151 | echo " --disable-v4l disable Video4Linux support"
|
---|
152 | echo " --disable-ivtv disable ivtv support (PVR-x50) req. v4l support"
|
---|
153 | echo " --enable-dvb enable DVB support (must supply header directory)"
|
---|
154 | echo " --dvb-path=HDRLOC location of directory containing"
|
---|
155 | echo " 'linux/dvb/frontend.h', not the"
|
---|
156 | echo " directory with frontend.h [$dvb_path]"
|
---|
157 | echo " --disable-x11 disable X11 support"
|
---|
158 | echo " --x11-path=X11LOC location of X11 include files [$x11_include_path-path]"
|
---|
159 | echo " --disable-xrandr disable X11 resolution switching"
|
---|
160 | echo " --disable-xv disable XVideo (X11 video output accel.)"
|
---|
161 | echo " --enable-xvmc enable XvMC (Linux/BSD MPEG accel.)"
|
---|
162 | echo " --enable-xvmcw disable XvMC Wrapper, use --xvmc-lib if autodetection fails"
|
---|
163 | echo " --enable-xvmc-pro enable XvMC for the unichrome pro (NOT unichrome) chipset"
|
---|
164 | echo " --enable-xvmc-opengl enable nVidia XvMC OpenGL texture method"
|
---|
165 | echo " --xvmc-lib=LIB XvMC library override (for crosscompiling)"
|
---|
166 | #echo " --disable-xvmc-vld disable XvMC-VLD (VIA Epia MPEG accel.)"
|
---|
167 | echo " --enable-mac-accel enable Mac OS X MPEG acceleration"
|
---|
168 | echo " --enable-opengl-vsync enable OpenGL vsync method"
|
---|
169 | echo " --enable-directfb enable DirectFB (Linux non-X11 video)"
|
---|
170 | echo " --enable-directx enable DirectX (Microsoft video)"
|
---|
171 | echo ""
|
---|
172 | echo " --enable-mac-bundle produce standalone OS X apps (e.g. mythfrontend.app)"
|
---|
173 | echo ""
|
---|
174 | echo " --with-bindings=LIST install the bindings specified in the"
|
---|
175 | echo " comma-separated list"
|
---|
176 | echo " Supported bindings: perl"
|
---|
177 | #echo " --disable-audio-beos disable BeOS audio support [default=no]"
|
---|
178 | #echo " --disable-v4l disable video4linux grabbing [default=no]"
|
---|
179 | #echo " --disable-v4l2 disable video4linux2 grabbing [default=no]"
|
---|
180 | #echo " --disable-bktr disable bktr video grabbing [default=no]"
|
---|
181 | #echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
|
---|
182 | #echo " --disable-network disable network support [default=no]"
|
---|
183 | #echo " --disable-ipv6 disable ipv6 support [default=no]"
|
---|
184 | #echo " --disable-zlib disable zlib [default=no]"
|
---|
185 | #echo " --disable-vhook disable video hooking support"
|
---|
186 | #echo " --disable-debug disable debugging symbols"
|
---|
187 | #echo " --disable-mpegaudio-hp faster (but less accurate)"
|
---|
188 | #echo " MPEG audio decoding [default=no]"
|
---|
189 | #echo " --disable-protocols disable I/O protocols support [default=no]"
|
---|
190 | #echo " --disable-ffmpeg disable ffmpeg build"
|
---|
191 | #echo " --disable-ffserver disable ffserver build"
|
---|
192 | #echo " --disable-ffplay disable ffplay build"
|
---|
193 | #echo " --enable-small optimize for size instead of speed"
|
---|
194 | #echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
|
---|
195 | #echo " --disable-encoder=NAME disables encoder NAME"
|
---|
196 | #echo " --enable-encoder=NAME enables encoder NAME"
|
---|
197 | #echo " --disable-decoder=NAME disables decoder NAME"
|
---|
198 | #echo " --enable-decoder=NAME enables decoder NAME"
|
---|
199 | #echo " --disable-encoders disables all encoders"
|
---|
200 | #echo " --disable-decoders disables all decoders"
|
---|
201 | #echo " --disable-muxer=NAME disables muxer NAME"
|
---|
202 | #echo " --enable-muxer=NAME enables muxer NAME"
|
---|
203 | #echo " --disable-muxers disables all muxers"
|
---|
204 | #echo " --disable-demuxer=NAME disables demuxer NAME"
|
---|
205 | #echo " --enable-demuxer=NAME enables demuxer NAME"
|
---|
206 | #echo " --disable-demuxers disables all demuxers"
|
---|
207 | #echo " --enable-parser=NAME enables parser NAME"
|
---|
208 | #echo " --disable-parser=NAME disables parser NAME"
|
---|
209 | #echo " --disable-parsers disables all parsers"
|
---|
210 | #echo
|
---|
211 | #echo "Developer options (useful when working on FFmpeg itself):"
|
---|
212 | #echo " --enable-gprof enable profiling with gprof [$gprof]"
|
---|
213 | #echo " --disable-opts disable compiler optimizations"
|
---|
214 | #echo " --enable-extra-warnings enable more compiler warnings"
|
---|
215 | #echo " --disable-strip disable stripping of executables and shared libraries"
|
---|
216 | #echo ""
|
---|
217 | #echo "NOTE: Object files are built at the place where configure is launched."
|
---|
218 | exit 1
|
---|
219 | }
|
---|
220 |
|
---|
221 | log(){
|
---|
222 | echo "$@" >>$logfile
|
---|
223 | }
|
---|
224 |
|
---|
225 | log_file(){
|
---|
226 | log BEGIN $1
|
---|
227 | cat -n $1 >>$logfile
|
---|
228 | log END $1
|
---|
229 | }
|
---|
230 |
|
---|
231 | echolog(){
|
---|
232 | log "$@"
|
---|
233 | echo "$@"
|
---|
234 | }
|
---|
235 |
|
---|
236 | die(){
|
---|
237 | echolog "$@"
|
---|
238 | cat <<EOF
|
---|
239 | If you think configure made a mistake, make sure you are using the latest
|
---|
240 | version from SVN. If the latest version fails, report the problem to the
|
---|
241 | mythtv-dev@mythtv.org mailing list or IRC #mythtv on irc.freenode.net
|
---|
242 | EOF
|
---|
243 | if enabled logging; then
|
---|
244 | cat <<EOF
|
---|
245 | Include the log file "$logfile" produced by configure as this will help
|
---|
246 | solving the problem.
|
---|
247 | EOF
|
---|
248 | else
|
---|
249 | cat <<EOF
|
---|
250 | Rerun configure with logging enabled (do not use --log=no), and include the
|
---|
251 | log this produces with your report.
|
---|
252 | EOF
|
---|
253 | fi
|
---|
254 | rm -f $TMPC $TMPCXX $TMPO $TMPE $TMPS $TMPH
|
---|
255 | exit 1
|
---|
256 | }
|
---|
257 |
|
---|
258 | # "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z"
|
---|
259 | toupper(){
|
---|
260 | echo "$@" | tr '[a-z]' '[A-Z]'
|
---|
261 | }
|
---|
262 |
|
---|
263 | tolower(){
|
---|
264 | echo "$@" | tr '[A-Z]' '[a-z]'
|
---|
265 | }
|
---|
266 |
|
---|
267 | set_all(){
|
---|
268 | value=$1
|
---|
269 | shift
|
---|
270 | for var in $*; do
|
---|
271 | eval $var=$value
|
---|
272 | done
|
---|
273 | }
|
---|
274 |
|
---|
275 | pushvar(){
|
---|
276 | for var in $*; do
|
---|
277 | eval level=\${${var}_level:=0}
|
---|
278 | eval ${var}_${level}="\$$var"
|
---|
279 | eval ${var}_level=$(($level+1))
|
---|
280 | done
|
---|
281 | }
|
---|
282 |
|
---|
283 | popvar(){
|
---|
284 | for var in $*; do
|
---|
285 | eval level=\${${var}_level:-0}
|
---|
286 | test $level = 0 && continue
|
---|
287 | eval level=$(($level-1))
|
---|
288 | eval $var="\${${var}_${level}}"
|
---|
289 | eval ${var}_level=$level
|
---|
290 | eval unset ${var}_${level}
|
---|
291 | done
|
---|
292 | }
|
---|
293 |
|
---|
294 | enable(){
|
---|
295 | set_all yes $*
|
---|
296 | }
|
---|
297 |
|
---|
298 | disable(){
|
---|
299 | set_all no $*
|
---|
300 | }
|
---|
301 |
|
---|
302 | enabled(){
|
---|
303 | eval test "x\$$1" = "xyes"
|
---|
304 | }
|
---|
305 |
|
---|
306 | disabled(){
|
---|
307 | eval test "x\$$1" = "xno"
|
---|
308 | }
|
---|
309 |
|
---|
310 | enabled_all(){
|
---|
311 | for opt; do
|
---|
312 | enabled $opt || return 1
|
---|
313 | done
|
---|
314 | }
|
---|
315 |
|
---|
316 | disabled_all(){
|
---|
317 | for opt; do
|
---|
318 | disabled $opt || return 1
|
---|
319 | done
|
---|
320 | }
|
---|
321 |
|
---|
322 | enabled_any(){
|
---|
323 | for opt; do
|
---|
324 | enabled $opt && return 0
|
---|
325 | done
|
---|
326 | }
|
---|
327 |
|
---|
328 | disabled_any(){
|
---|
329 | for opt; do
|
---|
330 | disabled $opt && return 0
|
---|
331 | done
|
---|
332 | }
|
---|
333 |
|
---|
334 | check_deps(){
|
---|
335 | for cfg; do
|
---|
336 | enabled ${cfg}_checking && die "Circular dependency for $cfg."
|
---|
337 | disabled ${cfg}_checking && continue
|
---|
338 | enable ${cfg}_checking
|
---|
339 |
|
---|
340 | eval dep_all="\$${cfg}_deps"
|
---|
341 | eval dep_any="\$${cfg}_deps_any"
|
---|
342 |
|
---|
343 | pushvar cfg dep_all dep_any
|
---|
344 | check_deps $dep_all $dep_any
|
---|
345 | popvar cfg dep_all dep_any
|
---|
346 |
|
---|
347 | enabled_all $dep_all || disable $cfg
|
---|
348 | enabled_any $dep_any || disable $cfg
|
---|
349 |
|
---|
350 | disable ${cfg}_checking
|
---|
351 | done
|
---|
352 | }
|
---|
353 |
|
---|
354 | print_config(){
|
---|
355 | pfx=$1
|
---|
356 | header=$2
|
---|
357 | makefile=$3
|
---|
358 | shift 3
|
---|
359 | for cfg; do
|
---|
360 | if enabled $cfg; then
|
---|
361 | ucname="${pfx}`toupper $cfg`"
|
---|
362 | echo "#define ${ucname} 1" >> $header
|
---|
363 | echo "${ucname}=yes" >> $makefile
|
---|
364 | fi
|
---|
365 | done
|
---|
366 | }
|
---|
367 |
|
---|
368 | flags_saved(){
|
---|
369 | (: ${SAVE_CFLAGS?}) 2>/dev/null
|
---|
370 | }
|
---|
371 |
|
---|
372 | save_flags(){
|
---|
373 | flags_saved && return
|
---|
374 | SAVE_CFLAGS="$CFLAGS"
|
---|
375 | SAVE_LDFLAGS="$LDFLAGS"
|
---|
376 | SAVE_extralibs="$extralibs"
|
---|
377 | }
|
---|
378 |
|
---|
379 | restore_flags(){
|
---|
380 | flags_saved || return
|
---|
381 | CFLAGS="$SAVE_CFLAGS"
|
---|
382 | LDFLAGS="$SAVE_LDFLAGS"
|
---|
383 | extralibs="$SAVE_extralibs"
|
---|
384 | unset SAVE_CFLAGS
|
---|
385 | unset SAVE_LDFLAGS
|
---|
386 | unset SAVE_extralibs
|
---|
387 | }
|
---|
388 |
|
---|
389 | temp_cflags(){
|
---|
390 | save_flags
|
---|
391 | CFLAGS="$CFLAGS $*"
|
---|
392 | }
|
---|
393 |
|
---|
394 | temp_ldflags(){
|
---|
395 | save_flags
|
---|
396 | LDFLAGS="$LDFLAGS $*"
|
---|
397 | }
|
---|
398 |
|
---|
399 | temp_extralibs(){
|
---|
400 | save_flags
|
---|
401 | extralibs="$extralibs $*"
|
---|
402 | }
|
---|
403 |
|
---|
404 | append(){
|
---|
405 | var=$1
|
---|
406 | shift
|
---|
407 | flags_saved && eval "SAVE_$var=\"\$SAVE_$var $*\""
|
---|
408 | eval "$var=\"\$$var $*\""
|
---|
409 | }
|
---|
410 |
|
---|
411 | add_cflags(){
|
---|
412 | append CFLAGS "$@"
|
---|
413 | }
|
---|
414 |
|
---|
415 | add_ecflags(){
|
---|
416 | append ECFLAGS "$@"
|
---|
417 | }
|
---|
418 |
|
---|
419 | add_optflags(){
|
---|
420 | append OPTFLAGS "$@"
|
---|
421 | }
|
---|
422 |
|
---|
423 | add_cppflags(){
|
---|
424 | append ECXXFLAGS "$@"
|
---|
425 | }
|
---|
426 |
|
---|
427 | add_ldflags(){
|
---|
428 | append LDFLAGS "$@"
|
---|
429 | }
|
---|
430 |
|
---|
431 | add_extralibs(){
|
---|
432 | append extralibs "$@"
|
---|
433 | }
|
---|
434 |
|
---|
435 | check_cmd(){
|
---|
436 | log "$@"
|
---|
437 | "$@" >>$logfile 2>&1
|
---|
438 | }
|
---|
439 |
|
---|
440 | check_cc(){
|
---|
441 | log check_cc "$@"
|
---|
442 | cat >$TMPC
|
---|
443 | log_file $TMPC
|
---|
444 | check_cmd $cc $CFLAGS $ECFLAGS $OPTFLAGS "$@" -c -o $TMPO $TMPC
|
---|
445 | }
|
---|
446 |
|
---|
447 | check_cpp(){
|
---|
448 | log check_cpp "$@"
|
---|
449 | cat >$TMPCXX
|
---|
450 | log_file $TMPCXX
|
---|
451 | check_cmd $cxx $CFLAGS $ECXXFLAGS "$@" -E -o $TMPO $TMPCXX
|
---|
452 | }
|
---|
453 |
|
---|
454 | check_ld(){
|
---|
455 | log check_ld "$@"
|
---|
456 | check_cc || return
|
---|
457 | check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
|
---|
458 | }
|
---|
459 |
|
---|
460 | check_cflags(){
|
---|
461 | log check_cflags "$@"
|
---|
462 | check_cc "$@" <<EOF && add_cflags "$@"
|
---|
463 | int x;
|
---|
464 | EOF
|
---|
465 | }
|
---|
466 |
|
---|
467 | check_ecflags(){
|
---|
468 | log check_ecflags "$@"
|
---|
469 | check_cc $@ <<EOF && add_ecflags "$@" || echolog "WARNING! An unknown C compiler flag in: \"$@\". Option(s) will be ignored."
|
---|
470 | int x;
|
---|
471 | EOF
|
---|
472 | }
|
---|
473 |
|
---|
474 | check_optflags(){
|
---|
475 | log check_optflags "$@"
|
---|
476 | check_cc "$@" <<EOF && add_optflags "$@"
|
---|
477 | int x;
|
---|
478 | EOF
|
---|
479 | }
|
---|
480 |
|
---|
481 | check_cppflags(){
|
---|
482 | log check_cppflags "$@"
|
---|
483 | check_cpp $@ <<EOF && add_cppflags "$@" || echolog "WARNING! An unknown C++ compiler flag in: \"$@\". Option(s) will be ignored."
|
---|
484 | class X {};
|
---|
485 | int x;
|
---|
486 | EOF
|
---|
487 | }
|
---|
488 |
|
---|
489 | check_ldflags(){
|
---|
490 | log check_ldflags "$@"
|
---|
491 | check_ld "$@" <<EOF && add_ldflags "$@"
|
---|
492 | int main(){
|
---|
493 | return 0;
|
---|
494 | }
|
---|
495 | EOF
|
---|
496 | }
|
---|
497 |
|
---|
498 | check_header(){
|
---|
499 | log check_header "$@"
|
---|
500 | header=$1
|
---|
501 | shift
|
---|
502 | var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
|
---|
503 | disable $var
|
---|
504 | check_cpp "$@" <<EOF && enable $var
|
---|
505 | #include <$header>
|
---|
506 | int x;
|
---|
507 | EOF
|
---|
508 | }
|
---|
509 |
|
---|
510 | check_func(){
|
---|
511 | log check_func "$@"
|
---|
512 | func=$1
|
---|
513 | shift
|
---|
514 | disable $func
|
---|
515 | check_ld "$@" <<EOF && enable $func
|
---|
516 | extern int $func();
|
---|
517 | int main(){
|
---|
518 | $func();
|
---|
519 | }
|
---|
520 | EOF
|
---|
521 | }
|
---|
522 |
|
---|
523 | check_func2(){
|
---|
524 | log check_func2 "$@"
|
---|
525 | headers=$1
|
---|
526 | func=$2
|
---|
527 | shift 2
|
---|
528 | disable $func
|
---|
529 | incs=""
|
---|
530 | for hdr in $headers; do
|
---|
531 | incs="$incs
|
---|
532 | #include <$hdr>"
|
---|
533 | done
|
---|
534 | check_ld "$@" <<EOF && enable $func
|
---|
535 | $incs
|
---|
536 | int main(){
|
---|
537 | (void) $func;
|
---|
538 | return 0;
|
---|
539 | }
|
---|
540 | EOF
|
---|
541 | }
|
---|
542 |
|
---|
543 | check_lib(){
|
---|
544 | log check_lib "$@"
|
---|
545 | header="$1"
|
---|
546 | func="$2"
|
---|
547 | shift 2
|
---|
548 | temp_extralibs "$@"
|
---|
549 | check_header $header && check_func $func && add_extralibs "$@"
|
---|
550 | err=$?
|
---|
551 | restore_flags
|
---|
552 | return $err
|
---|
553 | }
|
---|
554 |
|
---|
555 | check_lib2(){
|
---|
556 | log check_lib2 "$@"
|
---|
557 | headers="$1"
|
---|
558 | func="$2"
|
---|
559 | shift 2
|
---|
560 | temp_extralibs "$@"
|
---|
561 | check_func2 "$headers" $func && add_extralibs "$@"
|
---|
562 | err=$?
|
---|
563 | restore_flags
|
---|
564 | return $err
|
---|
565 | }
|
---|
566 |
|
---|
567 | check_exec(){
|
---|
568 | check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
|
---|
569 | }
|
---|
570 |
|
---|
571 | check_exec_crash(){
|
---|
572 | code=`cat`
|
---|
573 |
|
---|
574 | # exit() is not async signal safe. _Exit (C99) and _exit (POSIX)
|
---|
575 | # are safe but may not be available everywhere. Thus we use
|
---|
576 | # raise(SIGTERM) instead. The check is run in a subshell so we
|
---|
577 | # can redirect the "Terminated" message from the shell. SIGBUS
|
---|
578 | # is not defined by standard C so it is used conditionally.
|
---|
579 |
|
---|
580 | (check_exec "$@") >>$logfile 2>&1 <<EOF
|
---|
581 | #include <signal.h>
|
---|
582 | static void sighandler(int sig){
|
---|
583 | raise(SIGTERM);
|
---|
584 | }
|
---|
585 | int main(){
|
---|
586 | signal(SIGILL, sighandler);
|
---|
587 | signal(SIGFPE, sighandler);
|
---|
588 | signal(SIGSEGV, sighandler);
|
---|
589 | #ifdef SIGBUS
|
---|
590 | signal(SIGBUS, sighandler);
|
---|
591 | #endif
|
---|
592 | { $code }
|
---|
593 | }
|
---|
594 | EOF
|
---|
595 | }
|
---|
596 |
|
---|
597 | require(){
|
---|
598 | name="$1"
|
---|
599 | header="$2"
|
---|
600 | func="$3"
|
---|
601 | shift 3
|
---|
602 | check_lib $header $func "$@" || die "ERROR: $name not found"
|
---|
603 | }
|
---|
604 |
|
---|
605 | require2(){
|
---|
606 | name="$1"
|
---|
607 | headers="$2"
|
---|
608 | func="$3"
|
---|
609 | shift 3
|
---|
610 | check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
|
---|
611 | }
|
---|
612 |
|
---|
613 | check_foo_config(){
|
---|
614 | cfg=$1
|
---|
615 | pkg=$2
|
---|
616 | header=$3
|
---|
617 | func=$4
|
---|
618 | shift 4
|
---|
619 | disable $cfg
|
---|
620 | check_cmd ${pkg}-config --version
|
---|
621 | err=$?
|
---|
622 | if test "$err" = 0; then
|
---|
623 | temp_cflags `${pkg}-config --cflags`
|
---|
624 | temp_extralibs `${pkg}-config --libs`
|
---|
625 | check_lib "$@" $header $func && enable $cfg
|
---|
626 | fi
|
---|
627 | return $err
|
---|
628 | }
|
---|
629 |
|
---|
630 | apply(){
|
---|
631 | file=$1
|
---|
632 | shift
|
---|
633 | "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
|
---|
634 | }
|
---|
635 |
|
---|
636 | x86_mmx_cpus="pentium-mmx,pentium2,pentium3,pentium3m,pentium-m"
|
---|
637 | x86_mmx_cpus="$x86_mmx_cpus,pentium4,pentium4m,prescott"
|
---|
638 | x86_mmx_cpus="$x86_mmx_cpus,athlon,athlon-xp,athlon-tbird,athlon-4,athlon-mp,"
|
---|
639 | x86_mmx_cpus="$x86_mmx_cpus,c3,c3-2,k6,k6-2,k6-3"
|
---|
640 |
|
---|
641 | x86_cpus="i386,i486,i586,i686,pentium,pentiumpro,${x86_mmx_cpus}"
|
---|
642 |
|
---|
643 | x86_slow_cmov_cpus="pentium4,pentium4m,prescott,nocona"
|
---|
644 |
|
---|
645 | x86_cmov_cpus="i686,pentiumpro,pentium2,pentium3,pentium3m,pentium-m,"
|
---|
646 | x86_cmov_cpus="$x86_cmov_cpus,athlon,athlon-xp,athlon-tbird,athlon-4,"
|
---|
647 | x86_cmov_cpus="$x86_cmov_cpus,athlon-mp,c3-2,$x86_slow_cmov_cpus"
|
---|
648 |
|
---|
649 | x86_64_cpus="x86-64,athlon64,k8,opteron,athlon-fx,nocona"
|
---|
650 |
|
---|
651 |
|
---|
652 | is_x86_cpu() {
|
---|
653 | expr ",${x86_cpus}," : ".*,$1," > /dev/null
|
---|
654 | }
|
---|
655 |
|
---|
656 | is_x86_64_cpu() {
|
---|
657 | expr ",${x86_64_cpus}," : ".*,$1," > /dev/null
|
---|
658 | }
|
---|
659 |
|
---|
660 | is_x86_mmx() {
|
---|
661 | expr ",${x86_mmx_cpus}," : ".*,$1," > /dev/null
|
---|
662 | }
|
---|
663 |
|
---|
664 | is_x86_cmov_cpu() {
|
---|
665 | expr ",${x86_cmov_cpus}," : ".*,$1," > /dev/null
|
---|
666 | }
|
---|
667 |
|
---|
668 | is_x86_slow_cmov_cpu() {
|
---|
669 | expr ",${x86_slow_cmov_cpus}," : ".*,$1," > /dev/null
|
---|
670 | }
|
---|
671 |
|
---|
672 | CONFIG_LIST='
|
---|
673 | encoders
|
---|
674 | decoders
|
---|
675 | parsers
|
---|
676 | muxers
|
---|
677 | demuxers
|
---|
678 | amr
|
---|
679 | amr_nb
|
---|
680 | amr_nb_fixed
|
---|
681 | amr_wb
|
---|
682 | audio_beos
|
---|
683 | audio_oss
|
---|
684 | avisynth
|
---|
685 | beos_netserver
|
---|
686 | bktr
|
---|
687 | dc1394
|
---|
688 | dv1394
|
---|
689 | ebp_available
|
---|
690 | ebx_available
|
---|
691 | ffmpeg
|
---|
692 | ffplay
|
---|
693 | ffserver
|
---|
694 | gpl
|
---|
695 | gprof
|
---|
696 | ipv6
|
---|
697 | liba52
|
---|
698 | liba52bin
|
---|
699 | libdts
|
---|
700 | libfaac
|
---|
701 | libfaad
|
---|
702 | libfaadbin
|
---|
703 | libgsm
|
---|
704 | libmp3lame
|
---|
705 | libnut
|
---|
706 | libogg
|
---|
707 | libtheora
|
---|
708 | libvorbis
|
---|
709 | memalign_hack
|
---|
710 | mpegaudio_hp
|
---|
711 | network
|
---|
712 | powerpc_perf
|
---|
713 | pp
|
---|
714 | protocols
|
---|
715 | swscaler
|
---|
716 | vhook
|
---|
717 | v4l
|
---|
718 | v4l2
|
---|
719 | wince
|
---|
720 | x11grab
|
---|
721 | x264
|
---|
722 | xvid
|
---|
723 | zlib
|
---|
724 | '
|
---|
725 |
|
---|
726 | THREADS_LIST='
|
---|
727 | beosthreads
|
---|
728 | os2threads
|
---|
729 | pthreads
|
---|
730 | w32threads
|
---|
731 | '
|
---|
732 |
|
---|
733 | HAVE_LIST="
|
---|
734 | $THREADS_LIST
|
---|
735 | altivec
|
---|
736 | altivec_h
|
---|
737 | armv5te
|
---|
738 | armv6
|
---|
739 | arpa_inet_h
|
---|
740 | byteswap_h
|
---|
741 | cmov
|
---|
742 | dcbzl
|
---|
743 | dev_bktr_ioctl_bt848_h
|
---|
744 | dev_bktr_ioctl_meteor_h
|
---|
745 | dev_ic_bt8xx_h
|
---|
746 | dev_video_meteor_ioctl_meteor_h
|
---|
747 | dev_video_bktr_ioctl_bt848_h
|
---|
748 | dlfcn_h
|
---|
749 | dlopen
|
---|
750 | fast_64bit
|
---|
751 | fast_cmov
|
---|
752 | freetype2
|
---|
753 | ftime
|
---|
754 | getifaddrs
|
---|
755 | gettimeofday
|
---|
756 | imlib2
|
---|
757 | inet_aton
|
---|
758 | iwmmxt
|
---|
759 | localtime_r
|
---|
760 | lrint
|
---|
761 | lrintf
|
---|
762 | machine_ioctl_bt848_h
|
---|
763 | machine_ioctl_meteor_h
|
---|
764 | malloc_h
|
---|
765 | memalign
|
---|
766 | mlib
|
---|
767 | mmi
|
---|
768 | mmx
|
---|
769 | os2
|
---|
770 | round
|
---|
771 | sdl
|
---|
772 | sdl_video_size
|
---|
773 | soundcard_h
|
---|
774 | stdint_h
|
---|
775 | sys_poll_h
|
---|
776 | sys_soundcard_h
|
---|
777 | threads
|
---|
778 | "
|
---|
779 |
|
---|
780 | TARGET_LIST='
|
---|
781 | altivec
|
---|
782 | armv5te
|
---|
783 | armv6
|
---|
784 | iwmmxt
|
---|
785 | mmi
|
---|
786 | mmx
|
---|
787 | '
|
---|
788 |
|
---|
789 | MYTHTV_CONFIG_LIST='
|
---|
790 | backend
|
---|
791 | dbox2
|
---|
792 | directfb
|
---|
793 | directx
|
---|
794 | dvb
|
---|
795 | ffmpeg_threads
|
---|
796 | firewire
|
---|
797 | frontend
|
---|
798 | hdhomerun
|
---|
799 | iptv
|
---|
800 | ivtv
|
---|
801 | joystick_menu
|
---|
802 | lirc
|
---|
803 | lmsensors
|
---|
804 | opengl_vsync
|
---|
805 | v4l
|
---|
806 | valgrind
|
---|
807 | x11
|
---|
808 | xrandr
|
---|
809 | xv
|
---|
810 | xvmc
|
---|
811 | xvmcw
|
---|
812 | xvmc_opengl
|
---|
813 | xvmc_vld
|
---|
814 | '
|
---|
815 |
|
---|
816 | MYTHTV_LIST='
|
---|
817 | audio_alsa
|
---|
818 | audio_arts
|
---|
819 | audio_jack
|
---|
820 | mac_bundle
|
---|
821 | proc_opt
|
---|
822 | symbol_visibility
|
---|
823 | xvmc_pro
|
---|
824 | '
|
---|
825 |
|
---|
826 | USING_LIST='
|
---|
827 | appleremote
|
---|
828 | bindings_perl
|
---|
829 | darwin_da
|
---|
830 | dvdv
|
---|
831 | opengl
|
---|
832 | '
|
---|
833 |
|
---|
834 | CMDLINE_SELECT="
|
---|
835 | $CONFIG_LIST
|
---|
836 | $TARGET_LIST
|
---|
837 | $THREADS_LIST
|
---|
838 | $MYTHTV_LIST
|
---|
839 | $MYTHTV_CONFIG_LIST
|
---|
840 | debug
|
---|
841 | extra_warnings
|
---|
842 | shared
|
---|
843 | static
|
---|
844 | "
|
---|
845 |
|
---|
846 | dxa_decoder_deps="zlib"
|
---|
847 | flashsv_decoder_deps="zlib"
|
---|
848 | flashsv_encoder_deps="zlib"
|
---|
849 | mpeg_xvmc_decoder_deps="xvmc"
|
---|
850 | mpeg_xvmc_vld_decoder_deps="xvmc_vld"
|
---|
851 | png_decoder_deps="zlib"
|
---|
852 | png_encoder_deps="zlib"
|
---|
853 | x264_encoder_deps="x264"
|
---|
854 | xvid_encoder_deps="xvid"
|
---|
855 | zmbv_decoder_deps="zlib"
|
---|
856 | zmbv_encoder_deps="zlib"
|
---|
857 |
|
---|
858 | aac_decoder_deps="libfaad"
|
---|
859 | mpeg4aac_decoder_deps="libfaad"
|
---|
860 | amr_nb_decoder_deps_any="amr_nb amr_nb_fixed"
|
---|
861 | amr_nb_encoder_deps_any="amr_nb amr_nb_fixed"
|
---|
862 | amr_wb_decoder_deps="amr_wb"
|
---|
863 | amr_wb_encoder_deps="amr_wb"
|
---|
864 | dts_decoder_deps="libdts"
|
---|
865 | faac_encoder_deps="libfaac"
|
---|
866 | liba52_decoder_deps="liba52"
|
---|
867 | libgsm_decoder_deps="libgsm"
|
---|
868 | libgsm_encoder_deps="libgsm"
|
---|
869 | libgsm_ms_decoder_deps="libgsm"
|
---|
870 | libgsm_ms_encoder_deps="libgsm"
|
---|
871 | libtheora_encoder_deps="libtheora"
|
---|
872 | mp3lame_encoder_deps="libmp3lame"
|
---|
873 | oggvorbis_decoder_deps="libvorbis"
|
---|
874 | oggvorbis_encoder_deps="libvorbis"
|
---|
875 |
|
---|
876 | ac3_demuxer_deps="ac3_parser"
|
---|
877 | audio_demuxer_deps_any="audio_oss audio_beos"
|
---|
878 | audio_muxer_deps_any="audio_oss audio_beos"
|
---|
879 | dc1394_demuxer_deps="dc1394"
|
---|
880 | dv1394_demuxer_deps="dv1394"
|
---|
881 | gxf_muxer_deps="gpl"
|
---|
882 | libnut_demuxer_deps="libnut"
|
---|
883 | libnut_muxer_deps="libnut"
|
---|
884 | ogg_muxer_deps="libogg"
|
---|
885 | redir_demuxer_deps="network"
|
---|
886 | rtp_muxer_deps="network"
|
---|
887 | rtsp_demuxer_deps="network"
|
---|
888 | sdp_demuxer_deps="network"
|
---|
889 | v4l2_demuxer_deps="v4l2"
|
---|
890 | video_grab_bktr_demuxer_deps="bktr"
|
---|
891 | video_grab_v4l_demuxer_deps="v4l"
|
---|
892 | x11_grab_device_demuxer_deps="x11grab"
|
---|
893 |
|
---|
894 | ffplay_deps="sdl"
|
---|
895 | ffserver_deps="network protocols muxers"
|
---|
896 | network_deps="protocols"
|
---|
897 |
|
---|
898 | # mythtv dependencies
|
---|
899 | dbox2_deps="backend"
|
---|
900 | dvb_deps="backend"
|
---|
901 | firewire_deps="backend"
|
---|
902 | iptv_deps="backend"
|
---|
903 | ivtv_deps="backend v4l"
|
---|
904 | hdhomerun_deps="backend"
|
---|
905 | v4l_deps="backend"
|
---|
906 | xrandr_deps="x11"
|
---|
907 | xv_deps="x11"
|
---|
908 | xvmc_deps="x11"
|
---|
909 | xvmc_pro_deps="x11"
|
---|
910 | xvmc_vld_deps="x11"
|
---|
911 | xvmcw_deps="x11"
|
---|
912 |
|
---|
913 |
|
---|
914 | # set temporary file name
|
---|
915 | if test ! -z "$TMPDIR" ; then
|
---|
916 | TMPDIR1="${TMPDIR}"
|
---|
917 | elif test ! -z "$TEMPDIR" ; then
|
---|
918 | TMPDIR1="${TEMPDIR}"
|
---|
919 | else
|
---|
920 | TMPDIR1="/tmp"
|
---|
921 | fi
|
---|
922 |
|
---|
923 | TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
|
---|
924 | TMPCXX="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.cpp"
|
---|
925 | TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
|
---|
926 | TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
|
---|
927 | TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
|
---|
928 | TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
|
---|
929 |
|
---|
930 | # default parameters
|
---|
931 |
|
---|
932 | logging="yes"
|
---|
933 | pre_logfile="config.ep"
|
---|
934 | logfile="$pre_logfile"
|
---|
935 | compile_type="release"
|
---|
936 |
|
---|
937 | # installation paths
|
---|
938 | PREFIX="/usr/local"
|
---|
939 | libdir_name="lib"
|
---|
940 | libdir=""
|
---|
941 | shlibdir="$libdir"
|
---|
942 | incdir='${PREFIX}/include/mythtv'
|
---|
943 | mandir='${PREFIX}/man'
|
---|
944 | bindir='${PREFIX}/bin'
|
---|
945 |
|
---|
946 | # toolchain
|
---|
947 | cross_prefix=""
|
---|
948 | cross_compile="no"
|
---|
949 | cc="gcc"
|
---|
950 | cxx="g++"
|
---|
951 | ccache="yes"
|
---|
952 | distcc="yes"
|
---|
953 | ar="ar"
|
---|
954 | ranlib="ranlib"
|
---|
955 | make="make"
|
---|
956 | strip="strip"
|
---|
957 | asmalign_pot="unknown"
|
---|
958 |
|
---|
959 | if test x"$CC" != x"" ; then
|
---|
960 | cc="$CC"
|
---|
961 | fi
|
---|
962 |
|
---|
963 | if test x"$CXX" != x"" ; then
|
---|
964 | cxx="$CXX"
|
---|
965 | fi
|
---|
966 |
|
---|
967 | # machine
|
---|
968 | arch=`uname -m`
|
---|
969 | arch_raw="$arch"
|
---|
970 | cpu="generic"
|
---|
971 | cpu_overide="no"
|
---|
972 | processor=`uname -p 2>/dev/null`
|
---|
973 | processor_flags=""
|
---|
974 | tune="generic"
|
---|
975 | powerpc_perf="no"
|
---|
976 | mmx="default"
|
---|
977 | cmov="no"
|
---|
978 | fast_cmov="no"
|
---|
979 | armv5te="default"
|
---|
980 | armv6="default"
|
---|
981 | iwmmxt="default"
|
---|
982 | altivec="default"
|
---|
983 | dcbzl="no"
|
---|
984 | mmi="default"
|
---|
985 | bigendian="no"
|
---|
986 |
|
---|
987 | if test -f /proc/cpuinfo ; then
|
---|
988 | if test x"$processor" = x"" -o x"$processor" = x"$arch_raw" -o \
|
---|
989 | x"$processor" = x"unknown" ; then
|
---|
990 | processor=`cat /proc/cpuinfo | grep "model name" | head -n 1`
|
---|
991 | fi
|
---|
992 | processor_flags=`cat /proc/cpuinfo | grep "flags" | head -n 1`
|
---|
993 | fi
|
---|
994 |
|
---|
995 | # Mac OS X equivalent
|
---|
996 | if test -f /usr/bin/hostinfo ; then
|
---|
997 | if test x"$processor" = x"" -o x"$processor" = x"$arch_raw" -o \
|
---|
998 | x"$processor" = x"unknown" -o x"$processor" = x"powerpc" ; then
|
---|
999 | processor=`/usr/bin/hostinfo | grep "Processor type:"`
|
---|
1000 | processor=${processor#Processor type: *}
|
---|
1001 | processor=${processor% (*}
|
---|
1002 | if test x"`echo $processor | cut -c1-3`" = x"ppc" ; then
|
---|
1003 | tune=$processor
|
---|
1004 | else
|
---|
1005 | processor=`/usr/sbin/sysctl -n machdep.cpu.model_string`
|
---|
1006 | processor_flags=`/usr/sbin/sysctl -n machdep.cpu.features`
|
---|
1007 | processor_flags=`echo $processor_flags | tr "[A-Z]" "[a-z]"`
|
---|
1008 | fi
|
---|
1009 | fi
|
---|
1010 | fi
|
---|
1011 |
|
---|
1012 | # OS
|
---|
1013 | targetos=$(tolower $(uname -s))
|
---|
1014 | beos_netserver="no"
|
---|
1015 | os2="no"
|
---|
1016 | wince="no"
|
---|
1017 |
|
---|
1018 | # non-library system interfaces
|
---|
1019 | audio_beos="default"
|
---|
1020 | audio_oss="yes"
|
---|
1021 | bktr="yes"
|
---|
1022 | dv1394="yes"
|
---|
1023 | v4l2="yes"
|
---|
1024 | v4l="yes"
|
---|
1025 |
|
---|
1026 | # mythtv settings
|
---|
1027 | CONFIG_DEFINES=""
|
---|
1028 | CONFIG_INCLUDEPATH=""
|
---|
1029 | PROFILEFLAGS=""
|
---|
1030 | appleremote="no"
|
---|
1031 | audio_alsa="default"
|
---|
1032 | audio_alsa_libs="-lasound"
|
---|
1033 | audio_arts="default"
|
---|
1034 | audio_jack="default"
|
---|
1035 | audio_jack_libs="-ljack"
|
---|
1036 | backend="no"
|
---|
1037 | bindings_perl="yes"
|
---|
1038 | dbox2="yes"
|
---|
1039 | directfb="no"
|
---|
1040 | directx="no"
|
---|
1041 | dvb_path="/usr/include"
|
---|
1042 | dvb="no"
|
---|
1043 | dvdv="no"
|
---|
1044 | firewire="yes"
|
---|
1045 | frontend="yes"
|
---|
1046 | hdhomerun="yes"
|
---|
1047 | iptv="yes"
|
---|
1048 | ivtv="yes"
|
---|
1049 | joystick_menu="default"
|
---|
1050 | lamemp3="yes"
|
---|
1051 | lirc="yes"
|
---|
1052 | lmsensors="default"
|
---|
1053 | mac_bundle="no"
|
---|
1054 | mac_corevideo="no"
|
---|
1055 | opengl="no"
|
---|
1056 | opengl_vsync="no"
|
---|
1057 | proc_opt="no"
|
---|
1058 | symbol_visibility="no"
|
---|
1059 | v4l="yes"
|
---|
1060 | valgrind="no"
|
---|
1061 | x11="yes"
|
---|
1062 | x11_include_path="/usr/X11R6/include"
|
---|
1063 | xrandr="yes"
|
---|
1064 | xv="yes"
|
---|
1065 | xvmc="no"
|
---|
1066 | xvmc_lib=""
|
---|
1067 | xvmc_opengl="no"
|
---|
1068 | xvmc_pro="no"
|
---|
1069 | xvmc_vld="yes"
|
---|
1070 | xvmcw="yes"
|
---|
1071 |
|
---|
1072 | # libraries
|
---|
1073 | amr_nb="no"
|
---|
1074 | amr_nb_fixed="no"
|
---|
1075 | amr_wb="no"
|
---|
1076 | avisynth="no"
|
---|
1077 | dc1394="no"
|
---|
1078 | dlfcn_h="no"
|
---|
1079 | dlopen="no"
|
---|
1080 | liba52="no"
|
---|
1081 | liba52bin="no"
|
---|
1082 | libdts="no"
|
---|
1083 | libfaac="no"
|
---|
1084 | libfaad2="no"
|
---|
1085 | libfaad="no"
|
---|
1086 | libfaadbin="no"
|
---|
1087 | libgsm="no"
|
---|
1088 | libmp3lame="no"
|
---|
1089 | libnut="no"
|
---|
1090 | libogg="no"
|
---|
1091 | libtheora="no"
|
---|
1092 | libvorbis="no"
|
---|
1093 | mlib="no"
|
---|
1094 | x11grab="no"
|
---|
1095 | x264="no"
|
---|
1096 | xvid="no"
|
---|
1097 | zlib="yes"
|
---|
1098 |
|
---|
1099 | # configurable options
|
---|
1100 | debug="no"
|
---|
1101 | dostrip="yes"
|
---|
1102 | extra_warnings="no"
|
---|
1103 | ffmpeg="no"
|
---|
1104 | ffplay="no"
|
---|
1105 | ffserver="no"
|
---|
1106 | gpl="yes"
|
---|
1107 | gprof="no"
|
---|
1108 | ipv6="yes"
|
---|
1109 | shared="yes"
|
---|
1110 | static="no"
|
---|
1111 | memalign_hack="no"
|
---|
1112 | mpegaudio_hp="yes"
|
---|
1113 | network="no"
|
---|
1114 | optimize="yes"
|
---|
1115 | pp="no"
|
---|
1116 | protocols="yes"
|
---|
1117 | swscaler="no"
|
---|
1118 | vhook="default"
|
---|
1119 |
|
---|
1120 | # threading
|
---|
1121 | beosthreads="no"
|
---|
1122 | os2threads="no"
|
---|
1123 | pthreads="no"
|
---|
1124 | w32threads="no"
|
---|
1125 | thread_type="no"
|
---|
1126 |
|
---|
1127 | # build settings
|
---|
1128 | SHFLAGS='-shared -Wl,-soname,$@'
|
---|
1129 | VHOOKSHFLAGS='$(SHFLAGS)'
|
---|
1130 | LIBOBJFLAGS=""
|
---|
1131 | FFLDFLAGS=-Wl,--warn-common
|
---|
1132 | LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
|
---|
1133 | FFSERVERLDFLAGS=-Wl,-E
|
---|
1134 | LDCONFIG="ldconfig"
|
---|
1135 | LIBPREF="lib"
|
---|
1136 | LIBSUF=".a"
|
---|
1137 | LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
|
---|
1138 | SLIBPREF="lib"
|
---|
1139 | SLIBSUF=".so"
|
---|
1140 | SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
|
---|
1141 | SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
|
---|
1142 | SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
|
---|
1143 | EXESUF=""
|
---|
1144 | BUILDSUF=""
|
---|
1145 | LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(libdir)/$(LIB)"'
|
---|
1146 |
|
---|
1147 | # find source path
|
---|
1148 | source_path="`dirname \"$0\"`"
|
---|
1149 | source_path_used="yes"
|
---|
1150 | if test -z "$source_path" -o "$source_path" = "." ; then
|
---|
1151 | source_path="`pwd`"
|
---|
1152 | source_path_used="no"
|
---|
1153 | else
|
---|
1154 | source_path="`cd \"$source_path\"; pwd`"
|
---|
1155 | echo "$source_path" | grep -q '[[:blank:]]' &&
|
---|
1156 | die "Out of tree builds are impossible with whitespace in source path."
|
---|
1157 | fi
|
---|
1158 |
|
---|
1159 | if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
---|
1160 | show_help
|
---|
1161 | fi
|
---|
1162 |
|
---|
1163 | FFMPEG_CONFIGURATION="$@"
|
---|
1164 |
|
---|
1165 | ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libs/libavcodec/allcodecs.c"`
|
---|
1166 | DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libs/libavcodec/allcodecs.c"`
|
---|
1167 | PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libs/libavcodec/allcodecs.c"`
|
---|
1168 | MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libs/libavformat/allformats.c"`
|
---|
1169 | DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libs/libavformat/allformats.c"`
|
---|
1170 |
|
---|
1171 | enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST
|
---|
1172 |
|
---|
1173 | die_unknown(){
|
---|
1174 | echo "Unknown option \"$1\"."
|
---|
1175 | echo "See $0 --help for available options."
|
---|
1176 | exit 1
|
---|
1177 | }
|
---|
1178 |
|
---|
1179 | if [ -e config.log ] ; then
|
---|
1180 | PCONF=`cat config.log | tail -n 1 | grep configure`
|
---|
1181 | if test x"$PCONF" != x"" ; then
|
---|
1182 | PCONF=`echo $PCONF | sed 's/.\/configure//g'`
|
---|
1183 | fi
|
---|
1184 | for opt do
|
---|
1185 | if test x"$opt" != x"--prev" -a x"$opt" != x"--previous" ; then
|
---|
1186 | OTHOPT="$OTHOPT$opt"
|
---|
1187 | fi
|
---|
1188 | if test x"$opt" = x"--prev" -o x"$opt" = x"--previous" ; then
|
---|
1189 | if test x"$PCONF" != "--prev" ; then
|
---|
1190 | PREV="yes";
|
---|
1191 | fi
|
---|
1192 | fi
|
---|
1193 | done
|
---|
1194 | if test x"$PREV" = x"yes"; then
|
---|
1195 | echo "Options: $PCONF $OTHOPT"
|
---|
1196 | ./configure $PCONF $OTHOPT
|
---|
1197 | exit
|
---|
1198 | fi
|
---|
1199 | fi
|
---|
1200 |
|
---|
1201 | for opt do
|
---|
1202 | optval="${opt#*=}"
|
---|
1203 | case "$opt" in
|
---|
1204 | --log)
|
---|
1205 | ;;
|
---|
1206 | --log=*) logging="$optval"
|
---|
1207 | ;;
|
---|
1208 | --compile-type=*) compile_type="$optval"
|
---|
1209 | ;;
|
---|
1210 | --prefix=*) PREFIX="$optval"
|
---|
1211 | ;;
|
---|
1212 | --libdir-name=*) libdir_name="$optval"
|
---|
1213 | ;;
|
---|
1214 | --libdir=*) libdir="$optval"
|
---|
1215 | ;;
|
---|
1216 | --shlibdir=*) shlibdir="$optval"
|
---|
1217 | ;;
|
---|
1218 | --incdir=*) incdir="$optval"
|
---|
1219 | ;;
|
---|
1220 | --mandir=*) mandir="$optval"
|
---|
1221 | ;;
|
---|
1222 | --source-path=*) source_path="$optval"
|
---|
1223 | ;;
|
---|
1224 | --cross-prefix=*) cross_prefix="$optval"
|
---|
1225 | ;;
|
---|
1226 | --cross-compile) cross_compile="yes"
|
---|
1227 | ;;
|
---|
1228 | --target-os=*) targetos="$optval"
|
---|
1229 | ;;
|
---|
1230 | --cc=*) cc="$optval"
|
---|
1231 | ;;
|
---|
1232 | --make=*) make="$optval"
|
---|
1233 | ;;
|
---|
1234 | --extra-cflags=*) check_ecflags "$optval"
|
---|
1235 | ;;
|
---|
1236 | --extra-cxxflags=*) check_cppflags "$optval"
|
---|
1237 | ;;
|
---|
1238 | --extra-ldflags=*) add_ldflags "$optval"
|
---|
1239 | ;;
|
---|
1240 | --extra-libs=*) add_extralibs "$optval"
|
---|
1241 | ;;
|
---|
1242 | --build-suffix=*) BUILDSUF="$optval"
|
---|
1243 | ;;
|
---|
1244 | --disable-ccache) ccache="no"
|
---|
1245 | ;;
|
---|
1246 | --disable-distcc) distcc="no"
|
---|
1247 | ;;
|
---|
1248 | --enable-mingwce) wince="yes"
|
---|
1249 | ;;
|
---|
1250 | --disable-opts) optimize="no"
|
---|
1251 | ;;
|
---|
1252 | --enable-small) optimize="small"
|
---|
1253 | ;;
|
---|
1254 | --enable-sunmlib) mlib="yes"
|
---|
1255 | ;;
|
---|
1256 | --disable-strip) dostrip="no"
|
---|
1257 | ;;
|
---|
1258 | --dvb-path=*) dvb_path="$optval"
|
---|
1259 | ;;
|
---|
1260 | --x11-path=*) x11_include_path="$optval"
|
---|
1261 | ;;
|
---|
1262 | --xvmc-lib=*) xvmc_lib="$optval"
|
---|
1263 | ;;
|
---|
1264 | --enable-mac-accel) dvdv="yes"
|
---|
1265 | ;;
|
---|
1266 | --disable-mac-accel) dvdv="no"
|
---|
1267 | ;;
|
---|
1268 | # remove after 0.21
|
---|
1269 | --enable-dts) enable libdts
|
---|
1270 | echo "WARNING! --enable-dts will be removed, use --enable-libdts"
|
---|
1271 | ;;
|
---|
1272 | --enable-faad) enable libfaad
|
---|
1273 | echo "WARNING! --enable-faad will be removed, use --enable-libfaad"
|
---|
1274 | ;;
|
---|
1275 | --enable-faadbin) enable libfaadbin
|
---|
1276 | echo "WARNING! --enable-faadbin will be removed, use --enable-libfaadbin"
|
---|
1277 | ;;
|
---|
1278 | --enable-vorbis) enable libvorbis
|
---|
1279 | echo "WARNING! --enable-vorbis will be removed, use --enable-libvorbis"
|
---|
1280 | ;;
|
---|
1281 | # end of compatibility section (0.21)
|
---|
1282 | # disabled due to abuse in Gentoo ebuild
|
---|
1283 | --disable-frontend)
|
---|
1284 | ;;
|
---|
1285 | # disabled due to abuse in Gentoo ebuild
|
---|
1286 | --disable-backend)
|
---|
1287 | ;;
|
---|
1288 | --previous|--prev)
|
---|
1289 | echo "No history of previous configure parameters."
|
---|
1290 | ;;
|
---|
1291 | --with-bindings=*)
|
---|
1292 | tmp_bindings=`echo ${optval} | sed -e 's/,/ /g'`
|
---|
1293 | for binding in ${tmp_bindings} ; do
|
---|
1294 | if test x"${binding}" = x"perl"; then
|
---|
1295 | bindings_perl="yes"
|
---|
1296 | fi
|
---|
1297 | done
|
---|
1298 | ;;
|
---|
1299 | --without-bindings=*)
|
---|
1300 | tmp_bindings=`echo ${optval} | sed -e 's/,/ /g'`
|
---|
1301 | for binding in ${tmp_bindings} ; do
|
---|
1302 | if test x"${binding}" = x"perl"; then
|
---|
1303 | bindings_perl="no"
|
---|
1304 | fi
|
---|
1305 | done
|
---|
1306 | ;;
|
---|
1307 | --arch=*)
|
---|
1308 | arch=`echo $opt | cut -d '=' -f 2`
|
---|
1309 | arch_raw="$arch"
|
---|
1310 | processor=""
|
---|
1311 | processor_flags=""
|
---|
1312 | cpu_overide="yes"
|
---|
1313 | ;;
|
---|
1314 | --tune=*)
|
---|
1315 | tune=`echo $opt | cut -d '=' -f 2`
|
---|
1316 | tune_raw="$tune"
|
---|
1317 | processor=""
|
---|
1318 | processor_flags=""
|
---|
1319 | ;;
|
---|
1320 | --cpu=*)
|
---|
1321 | arch=`echo $opt | cut -d '=' -f 2`
|
---|
1322 | arch_raw="$arch"
|
---|
1323 | cpu="$arch"
|
---|
1324 | tune="$arch"
|
---|
1325 | tune_raw="$arch"
|
---|
1326 | processor=""
|
---|
1327 | processor_flags=""
|
---|
1328 | cpu_overide="yes"
|
---|
1329 | ;;
|
---|
1330 | --disable-encoders) disable $ENCODER_LIST
|
---|
1331 | ;;
|
---|
1332 | --disable-decoders) disable $DECODER_LIST
|
---|
1333 | ;;
|
---|
1334 | --disable-muxers) disable $MUXER_LIST
|
---|
1335 | ;;
|
---|
1336 | --disable-demuxers) disable $DEMUXER_LIST
|
---|
1337 | ;;
|
---|
1338 | --disable-parsers) disable $PARSER_LIST
|
---|
1339 | ;;
|
---|
1340 | --enable-*=*|--disable-*=*)
|
---|
1341 | eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
|
---|
1342 | case "$thing" in
|
---|
1343 | encoder|decoder|muxer|demuxer|parser) $action ${optval}_${thing} ;;
|
---|
1344 | *) die_unknown "$opt" ;;
|
---|
1345 | esac
|
---|
1346 | ;;
|
---|
1347 | --enable-?*|--disable-?*)
|
---|
1348 | eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
---|
1349 | echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt
|
---|
1350 | $action $option
|
---|
1351 | ;;
|
---|
1352 | --help) show_help
|
---|
1353 | ;;
|
---|
1354 | *)
|
---|
1355 | die_unknown $opt
|
---|
1356 | ;;
|
---|
1357 | esac
|
---|
1358 | done
|
---|
1359 |
|
---|
1360 | if is_x86_cpu "$arch" ; then
|
---|
1361 | arch="x86_32"
|
---|
1362 | fi
|
---|
1363 |
|
---|
1364 | if is_x86_64_cpu "$arch" ; then
|
---|
1365 | arch="x86_64"
|
---|
1366 | fi
|
---|
1367 |
|
---|
1368 |
|
---|
1369 | case "$arch" in
|
---|
1370 | x86_32)
|
---|
1371 | if is_x86_cmov_cpu "$arch_raw" ; then
|
---|
1372 | cmov="yes"
|
---|
1373 | if ! is_x86_slow_cmov_cpu "$arch_raw" ; then
|
---|
1374 | fast_cmov="yes"
|
---|
1375 | fi
|
---|
1376 | fi
|
---|
1377 | ;;
|
---|
1378 | x86_64|amd64)
|
---|
1379 | arch="x86_32"
|
---|
1380 | canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
|
---|
1381 | if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
|
---|
1382 | if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
|
---|
1383 | arch="x86_64"
|
---|
1384 | enable fast_64bit
|
---|
1385 | fi
|
---|
1386 | fi
|
---|
1387 | cmov="yes"
|
---|
1388 | if ! is_x86_slow_cmov_cpu "$arch_raw" ; then
|
---|
1389 | fast_cmov="yes"
|
---|
1390 | fi
|
---|
1391 | ;;
|
---|
1392 | # armv4l is a subset of armv[567]*l
|
---|
1393 | arm|armv[4567]*l)
|
---|
1394 | arch="armv4l"
|
---|
1395 | ;;
|
---|
1396 | alpha)
|
---|
1397 | arch="alpha"
|
---|
1398 | enable fast_64bit
|
---|
1399 | ;;
|
---|
1400 | "Power Macintosh"|ppc|powerpc)
|
---|
1401 | arch="powerpc"
|
---|
1402 | ;;
|
---|
1403 | ppc64)
|
---|
1404 | arch="powerpc"
|
---|
1405 | enable fast_64bit
|
---|
1406 | ;;
|
---|
1407 | mips|mipsel|IP*)
|
---|
1408 | arch="mips"
|
---|
1409 | ;;
|
---|
1410 | sun4u|sparc64)
|
---|
1411 | arch="sparc64"
|
---|
1412 | enable fast_64bit
|
---|
1413 | ;;
|
---|
1414 | sparc)
|
---|
1415 | arch="sparc"
|
---|
1416 | ;;
|
---|
1417 | sh4)
|
---|
1418 | arch="sh4"
|
---|
1419 | ;;
|
---|
1420 | parisc)
|
---|
1421 | arch="parisc"
|
---|
1422 | ;;
|
---|
1423 | parisc64)
|
---|
1424 | arch="parisc"
|
---|
1425 | enable fast_64bit
|
---|
1426 | ;;
|
---|
1427 | s390|s390x)
|
---|
1428 | arch="s390"
|
---|
1429 | ;;
|
---|
1430 | m68k)
|
---|
1431 | arch="m68k"
|
---|
1432 | ;;
|
---|
1433 | ia64)
|
---|
1434 | arch="ia64"
|
---|
1435 | enable fast_64bit
|
---|
1436 | ;;
|
---|
1437 | bfin)
|
---|
1438 | arch="bfin"
|
---|
1439 | ;;
|
---|
1440 | *)
|
---|
1441 | arch="unknown"
|
---|
1442 | ;;
|
---|
1443 | esac
|
---|
1444 |
|
---|
1445 | # OS specific
|
---|
1446 | osextralibs="-lm"
|
---|
1447 | case $targetos in
|
---|
1448 | beos|haiku|zeta)
|
---|
1449 | PREFIX="$HOME/config"
|
---|
1450 | # helps building libavcodec
|
---|
1451 | add_cflags "-DPIC -fomit-frame-pointer"
|
---|
1452 | # 3 gcc releases known for BeOS, each with ugly bugs
|
---|
1453 | gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
|
---|
1454 | case "$gcc_version" in
|
---|
1455 | 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
|
---|
1456 | mmx="no"
|
---|
1457 | ;;
|
---|
1458 | *20010315*) echo "BeBits gcc"
|
---|
1459 | add_cflags "-fno-expensive-optimizations"
|
---|
1460 | ;;
|
---|
1461 | esac
|
---|
1462 | LDCONFIG="echo ignoring ldconfig"
|
---|
1463 | SHFLAGS=-nostart
|
---|
1464 | # disable Linux things
|
---|
1465 | dv1394="no"
|
---|
1466 | # enable BeOS things
|
---|
1467 | disabled audio_beos || enable_audio_beos
|
---|
1468 | # no need for libm, but the inet stuff
|
---|
1469 | # Check for BONE
|
---|
1470 | # XXX: actually should check for NOT net_server
|
---|
1471 | if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
|
---|
1472 | osextralibs="-lbind -lsocket"
|
---|
1473 | else
|
---|
1474 | beos_netserver="yes"
|
---|
1475 | osextralibs="-lnet"
|
---|
1476 | fi ;;
|
---|
1477 | sunos)
|
---|
1478 | dv1394="no"
|
---|
1479 | FFLDFLAGS=""
|
---|
1480 | FFSERVERLDFLAGS=""
|
---|
1481 | SHFLAGS="-shared -Wl,-h,\$@"
|
---|
1482 | add_extralibs "-lsocket -lnsl"
|
---|
1483 | ;;
|
---|
1484 | netbsd)
|
---|
1485 | dv1394="no"
|
---|
1486 | add_extralibs "-lossaudio"
|
---|
1487 | ;;
|
---|
1488 | openbsd)
|
---|
1489 | CCONFIG = "$CCONFIG openbsd"
|
---|
1490 | dv1394="no"
|
---|
1491 | need_memalign="no"
|
---|
1492 | LIBOBJFLAGS="\$(PIC)"
|
---|
1493 | LDCONFIG="ldconfig -m \$(shlibdir)"
|
---|
1494 | SHFLAGS='-shared'
|
---|
1495 | SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
|
---|
1496 | SLIBNAME_WITH_VERSION='$(SLIBNAME)'
|
---|
1497 | SLIBNAME_WITH_MAJOR='$(SLIBNAME)'
|
---|
1498 | add_extralibs "-lossaudio"
|
---|
1499 | ;;
|
---|
1500 | freebsd)
|
---|
1501 | CCONFIG = "$CCONFIG freebsd"
|
---|
1502 | backend="yes"
|
---|
1503 | dv1394="no"
|
---|
1504 | need_memalign="no"
|
---|
1505 | add_cflags "-pthread"
|
---|
1506 | ;;
|
---|
1507 | gnu/kfreebsd)
|
---|
1508 | dv1394="no"
|
---|
1509 | add_cflags "-pthread"
|
---|
1510 | ;;
|
---|
1511 | bsd/os)
|
---|
1512 | dv1394="no"
|
---|
1513 | osextralibs="-lpoll -lgnugetopt -lm"
|
---|
1514 | strip="strip -d"
|
---|
1515 | ;;
|
---|
1516 | darwin)
|
---|
1517 | appleremote="yes"
|
---|
1518 | backend="yes"
|
---|
1519 | x11="no"
|
---|
1520 | xv="no"
|
---|
1521 | dv1394="no"
|
---|
1522 | need_memalign="no"
|
---|
1523 | SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(shlibdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION) -Wl,-read_only_relocs,suppress"
|
---|
1524 | VHOOKSHFLAGS='-dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(shlibdir)/vhook/$@'
|
---|
1525 | osextralibs=""
|
---|
1526 | strip="strip -x"
|
---|
1527 | FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
|
---|
1528 | SLIBSUF=".dylib"
|
---|
1529 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
|
---|
1530 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
|
---|
1531 | FFSERVERLDFLAGS=-Wl,-bind_at_load
|
---|
1532 | ;;
|
---|
1533 | mingw32*)
|
---|
1534 | targetos=mingw32
|
---|
1535 | if enabled_all shared static; then
|
---|
1536 | cat <<EOF
|
---|
1537 | You can only build one library type at once on MinGW.
|
---|
1538 | Specify --disable-static --enable-shared to only build
|
---|
1539 | the shared libraries. To build only the static libraries
|
---|
1540 | you do not need to pass additional options.
|
---|
1541 | EOF
|
---|
1542 | exit 1
|
---|
1543 | fi
|
---|
1544 | dv1394="no"
|
---|
1545 | ffserver="no"
|
---|
1546 | network="no"
|
---|
1547 | if enabled wince; then
|
---|
1548 | protocols="no"
|
---|
1549 | fi
|
---|
1550 | SLIBPREF=""
|
---|
1551 | SLIBSUF=".dll"
|
---|
1552 | EXESUF=".exe"
|
---|
1553 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
|
---|
1554 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
|
---|
1555 | SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
|
---|
1556 | SLIB_INSTALL_EXTRA_CMD="-install -m 644 \$(SLIBNAME_WITH_MAJOR:\$(SLIBSUF)=.lib) \"\$(shlibdir)/\$(SLIBNAME_WITH_MAJOR:\$(SLIBSUF)=.lib)\""
|
---|
1557 | SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc"
|
---|
1558 | add_extralibs -lws2_32
|
---|
1559 | ;;
|
---|
1560 | cygwin*)
|
---|
1561 | targetos=cygwin
|
---|
1562 | shlibdir="$bindir"
|
---|
1563 | dv1394="no"
|
---|
1564 | VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libswscale -L$(BUILD_ROOT)/libavutil'
|
---|
1565 | VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lswscale$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
|
---|
1566 | osextralibs=""
|
---|
1567 | EXESUF=".exe"
|
---|
1568 | SLIBPREF="cyg"
|
---|
1569 | SLIBSUF=".dll"
|
---|
1570 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
|
---|
1571 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
|
---|
1572 | SHFLAGS='-shared -Wl,--out-implib=lib$(NAME).dll.a'
|
---|
1573 | ;;
|
---|
1574 | linux)
|
---|
1575 | CCONFIG="$CCONFIG linux"
|
---|
1576 | backend="yes"
|
---|
1577 | ! disabled joystick_menu && enable joystick_menu
|
---|
1578 | ! disabled lmsensors && enable lmsensors
|
---|
1579 | LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
|
---|
1580 | ;;
|
---|
1581 | irix*)
|
---|
1582 | targetos=irix
|
---|
1583 | ranlib="echo ignoring ranlib"
|
---|
1584 | ;;
|
---|
1585 | os/2)
|
---|
1586 | TMPE=$TMPE".exe"
|
---|
1587 | ar="emxomfar -p128"
|
---|
1588 | ranlib="echo ignoring ranlib"
|
---|
1589 | strip="echo ignoring strip"
|
---|
1590 | add_cflags "-Zomf"
|
---|
1591 | FFLDFLAGS="-Zomf -Zstack 16384 -s"
|
---|
1592 | SHFLAGS="-Zdll -Zomf"
|
---|
1593 | FFSERVERLDFLAGS=""
|
---|
1594 | LIBPREF=""
|
---|
1595 | LIBSUF=".lib"
|
---|
1596 | SLIBPREF=""
|
---|
1597 | SLIBSUF=".dll"
|
---|
1598 | EXESUF=".exe"
|
---|
1599 | osextralibs=""
|
---|
1600 | pkg_requires=""
|
---|
1601 | dv1394="no"
|
---|
1602 | ffserver="no"
|
---|
1603 | vhook="no"
|
---|
1604 | os2="yes"
|
---|
1605 | ;;
|
---|
1606 | *)
|
---|
1607 | targetos="${targetos}-UNKNOWN"
|
---|
1608 | ;;
|
---|
1609 | esac
|
---|
1610 |
|
---|
1611 | add_extralibs $osextralibs
|
---|
1612 |
|
---|
1613 |
|
---|
1614 | has_library()
|
---|
1615 | {
|
---|
1616 | if test -f /etc/ld.so.conf ; then
|
---|
1617 | LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
|
---|
1618 | else
|
---|
1619 | LIBPATHS=''
|
---|
1620 | fi
|
---|
1621 | LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
|
---|
1622 | # Mac OS X has a different variable for this:
|
---|
1623 | LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
|
---|
1624 |
|
---|
1625 | # recurse down just one level, should be enough in most cases
|
---|
1626 | if test -f /etc/ld.so.conf ; then
|
---|
1627 | INCL=`cat /etc/ld.so.conf | grep -v "#" | grep "^include"`
|
---|
1628 | SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
|
---|
1629 | for x in $SRCH ; do
|
---|
1630 | LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
|
---|
1631 | LIBPATHS="$LIBPATHS $LP_APPEND"
|
---|
1632 | done
|
---|
1633 | fi
|
---|
1634 |
|
---|
1635 | LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
|
---|
1636 |
|
---|
1637 | HAS_IT="no"
|
---|
1638 | for LIBPATH in $LIBPATHS ; do
|
---|
1639 | if test x`ls $LIBPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
|
---|
1640 | HAS_IT="yes"
|
---|
1641 | fi
|
---|
1642 | done
|
---|
1643 | expr $HAS_IT : "yes" > /dev/null
|
---|
1644 | }
|
---|
1645 |
|
---|
1646 | has_header()
|
---|
1647 | {
|
---|
1648 | HPATHS="/usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include"
|
---|
1649 | INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
|
---|
1650 | HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
|
---|
1651 |
|
---|
1652 | HAS_IT="no"
|
---|
1653 | for HPATH in $HPATHS ; do
|
---|
1654 | if test x`ls $HPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
|
---|
1655 | HAS_IT="yes"
|
---|
1656 | fi
|
---|
1657 | done
|
---|
1658 | expr $HAS_IT : "yes" > /dev/null
|
---|
1659 | }
|
---|
1660 |
|
---|
1661 | CCONFIG="$CCONFIG $compile_type"
|
---|
1662 | if test x$compile_type = x"profile" ; then
|
---|
1663 | PROFILEFLAGS="-g -DNDEBUG"
|
---|
1664 | elif test x$compile_type = x"debug"; then
|
---|
1665 | enable debug
|
---|
1666 | fi
|
---|
1667 |
|
---|
1668 |
|
---|
1669 | if ! disabled logging ; then
|
---|
1670 | oldlogfile="$logfile"
|
---|
1671 | enabled logging || logfile="$logging"
|
---|
1672 | if [ "x$oldlogfile" = "x$pre_logfile" ]; then
|
---|
1673 | test x"$logfile" != x"$logging" && logfile="config.err"
|
---|
1674 | mv "$oldlogfile" "$logfile" 2> /dev/null || echo >"$logfile"
|
---|
1675 | else
|
---|
1676 | echo >"$logfile"
|
---|
1677 | fi
|
---|
1678 | echo "# $0 $@" >>$logfile
|
---|
1679 | set >>$logfile
|
---|
1680 | else
|
---|
1681 | logfile=/dev/null
|
---|
1682 | fi
|
---|
1683 |
|
---|
1684 | # Combine FFLDFLAGS and the LDFLAGS environment variable
|
---|
1685 | LDFLAGS="$FFLDFLAGS $EXTRALDFLAGS $LDFLAGS"
|
---|
1686 |
|
---|
1687 | test -n "$cross_prefix" && cross_compile=yes
|
---|
1688 | cc="${cross_prefix}${cc}"
|
---|
1689 | ar="${cross_prefix}${ar}"
|
---|
1690 | ranlib="${cross_prefix}${ranlib}"
|
---|
1691 | strip="${cross_prefix}${strip}"
|
---|
1692 |
|
---|
1693 | # we need to build at least one lib type
|
---|
1694 | if disabled_all static shared; then
|
---|
1695 | cat <<EOF
|
---|
1696 | At least one library type must be built.
|
---|
1697 | Specify --enable-static to build the static libraries or --enable-shared to
|
---|
1698 | build the shared libraries as well. To only build the shared libraries specify
|
---|
1699 | --disable-static in addition to --enable-shared.
|
---|
1700 | EOF
|
---|
1701 | exit 1;
|
---|
1702 | fi
|
---|
1703 |
|
---|
1704 | if disabled libogg; then
|
---|
1705 | enabled libtheora && die "libogg must be enabled to enable libtheora."
|
---|
1706 | enabled libvorbis && die "libogg must be enabled to enable libvorbis."
|
---|
1707 | fi
|
---|
1708 |
|
---|
1709 | if enabled_any libfaad libfaadbin ; then
|
---|
1710 | if check_header faad.h; then
|
---|
1711 | check_cc << EOF
|
---|
1712 | #include <faad.h>
|
---|
1713 | #ifndef FAAD2_VERSION
|
---|
1714 | ok faad1
|
---|
1715 | #endif
|
---|
1716 | int main( void ) { return 0; }
|
---|
1717 | EOF
|
---|
1718 | test $? = 0 && enable libfaad2
|
---|
1719 | else
|
---|
1720 | die "FAAD test failed."
|
---|
1721 | fi
|
---|
1722 | fi
|
---|
1723 |
|
---|
1724 |
|
---|
1725 | if disabled gpl ; then
|
---|
1726 | die_gpl_disabled(){
|
---|
1727 | name=$1
|
---|
1728 | shift
|
---|
1729 | enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
|
---|
1730 | }
|
---|
1731 | die_gpl_disabled "The Postprocessing code" pp
|
---|
1732 | die_gpl_disabled "liba52" liba52
|
---|
1733 | die_gpl_disabled "libxvidcore" xvid
|
---|
1734 | die_gpl_disabled "x264" x264
|
---|
1735 | die_gpl_disabled "libdts" libdts
|
---|
1736 | die_gpl_disabled "FAAD2" libfaad2
|
---|
1737 | die_gpl_disabled "The X11 grabber" x11grab
|
---|
1738 | die_gpl_disabled "The software scaler" swscaler
|
---|
1739 | fi
|
---|
1740 |
|
---|
1741 | # compute mmx state
|
---|
1742 | if test x"$mmx" = x"default"; then
|
---|
1743 | mmx="no"
|
---|
1744 | if test x"$arch" = x"x86_64"; then
|
---|
1745 | mmx="yes"
|
---|
1746 | else
|
---|
1747 | is_x86_64_cpu "$arch_raw" && mmx="yes"
|
---|
1748 | is_x86_mmx "$arch_raw" && mmx="yes"
|
---|
1749 | fi
|
---|
1750 |
|
---|
1751 | # if !arch && !tune && !cpu & processor_flags, then...
|
---|
1752 | if test x"$cpu_overide" != x"yes" -a x"$tune_raw" = x"" -a \
|
---|
1753 | x"$processor_flags" != x"" ; then
|
---|
1754 | mmx="no"
|
---|
1755 | if expr "$processor_flags" : ".*mmx" > /dev/null ; then
|
---|
1756 | mmx="yes"
|
---|
1757 | fi
|
---|
1758 | fi
|
---|
1759 | fi
|
---|
1760 |
|
---|
1761 | test -z "$need_memalign" && need_memalign="$mmx"
|
---|
1762 |
|
---|
1763 | #Darwin CC versions
|
---|
1764 | needmdynamicnopic="no"
|
---|
1765 | if test $targetos = darwin; then
|
---|
1766 | if test -n "`$cc -v 2>&1 | grep xlc`"; then
|
---|
1767 | add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
|
---|
1768 | else
|
---|
1769 | add_cflags "-no-cpp-precomp -pipe"
|
---|
1770 | check_cflags "-force_cpusubtype_ALL"
|
---|
1771 | check_cflags "-Wno-sign-compare"
|
---|
1772 | disabled shared && needmdynamicnopic="yes"
|
---|
1773 | fi
|
---|
1774 | fi
|
---|
1775 |
|
---|
1776 | disabled optimize || add_optflags -fomit-frame-pointer
|
---|
1777 |
|
---|
1778 | # Can only do AltiVec on PowerPC
|
---|
1779 | if test $altivec = "default"; then
|
---|
1780 | if test $arch = "powerpc"; then
|
---|
1781 | altivec="yes"
|
---|
1782 | else
|
---|
1783 | altivec="no"
|
---|
1784 | fi
|
---|
1785 | fi
|
---|
1786 |
|
---|
1787 | # Add processor-specific flags
|
---|
1788 | POWERPCMODE="32bits"
|
---|
1789 | if test $tune != "generic"; then
|
---|
1790 | warn_altivec(){
|
---|
1791 | $1 altivec && echo "WARNING: Tuning for $2 but AltiVec $1.";
|
---|
1792 | }
|
---|
1793 | case $tune in
|
---|
1794 | 601|ppc601|PowerPC601)
|
---|
1795 | ARCHFLAGS="-mcpu=601"
|
---|
1796 | warn_altivec enabled PPC601
|
---|
1797 | ;;
|
---|
1798 | 603*|ppc603*|PowerPC603*)
|
---|
1799 | ARCHFLAGS="-mcpu=603"
|
---|
1800 | warn_altivec enabled PPC603
|
---|
1801 | ;;
|
---|
1802 | 604*|ppc604*|PowerPC604*)
|
---|
1803 | ARCHFLAGS="-mcpu=604"
|
---|
1804 | warn_altivec enabled PPC604
|
---|
1805 | ;;
|
---|
1806 | G3|g3|75*|ppc75*|PowerPC75*)
|
---|
1807 | ARCHFLAGS="-mcpu=750 -mtune=750 -mpowerpc-gfxopt"
|
---|
1808 | warn_altivec enabled PPC75x
|
---|
1809 | ;;
|
---|
1810 | G4|g4|745*|ppc745*|PowerPC745*)
|
---|
1811 | ARCHFLAGS="-mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
|
---|
1812 | warn_altivec disabled PPC745x
|
---|
1813 | ;;
|
---|
1814 | 74*|ppc74*|PowerPC74*)
|
---|
1815 | ARCHFLAGS="-mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
|
---|
1816 | warn_altivec disabled PPC74xx
|
---|
1817 | ;;
|
---|
1818 | G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
|
---|
1819 | ARCHFLAGS="-mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
|
---|
1820 | warn_altivec disabled PPC970
|
---|
1821 | POWERPCMODE="64bits"
|
---|
1822 | ;;
|
---|
1823 | sparc64)
|
---|
1824 | ARCHFLAGS="-mcpu=v9 -mtune=v9"
|
---|
1825 | ;;
|
---|
1826 | bf*) #bf531 bf532 bf533 bf561 bf5xx all get this config
|
---|
1827 | add_cflags "-mfdpic"
|
---|
1828 | add_ldflags "-mfdpic"
|
---|
1829 | ;;
|
---|
1830 | *)
|
---|
1831 | ARCHFLAGS="-mtune=$tune"
|
---|
1832 | ;;
|
---|
1833 | esac
|
---|
1834 | fi
|
---|
1835 |
|
---|
1836 | if enabled cpu_overide; then
|
---|
1837 | ARCHFLAGS="-mcpu=$arch_raw $ARCHFLAGS"
|
---|
1838 | fi
|
---|
1839 |
|
---|
1840 | gnu_make(){
|
---|
1841 | $1 --version 2>&1 | grep -q GNU
|
---|
1842 | }
|
---|
1843 |
|
---|
1844 | if ! gnu_make $make; then
|
---|
1845 | gnu_make gmake && make=gmake || die "GNU make not found."
|
---|
1846 | fi
|
---|
1847 |
|
---|
1848 | # make sure we can execute files in $TMPDIR
|
---|
1849 | cat >$TMPE 2>>$logfile <<EOF
|
---|
1850 | #! /bin/sh
|
---|
1851 | EOF
|
---|
1852 | chmod +x $TMPE >>$logfile 2>&1
|
---|
1853 | if ! $TMPE >>$logfile 2>&1; then
|
---|
1854 | cat <<EOF
|
---|
1855 | Unable to create and execute files in $TMPDIR1. Set the TMPDIR environment
|
---|
1856 | variable to another directory and make sure that $TMPDIR1 is not mounted
|
---|
1857 | noexec.
|
---|
1858 | EOF
|
---|
1859 | die "Sanity test failed."
|
---|
1860 | fi
|
---|
1861 | rm $TMPE
|
---|
1862 |
|
---|
1863 | # compiler sanity check
|
---|
1864 | check_exec <<EOF
|
---|
1865 | int main(){
|
---|
1866 | return 0;
|
---|
1867 | }
|
---|
1868 | EOF
|
---|
1869 | if test "$?" != 0; then
|
---|
1870 | echo "$cc is unable to create an executable file."
|
---|
1871 | if test -z "$cross_prefix" && disabled cross_compile ; then
|
---|
1872 | echo "If $cc is a cross-compiler, use the --cross-compile option."
|
---|
1873 | echo "Only do this if you know what cross compiling means."
|
---|
1874 | fi
|
---|
1875 | die "C compiler test failed."
|
---|
1876 | fi
|
---|
1877 |
|
---|
1878 | if test $arch = "x86_32" -o $arch = "x86_64"; then
|
---|
1879 | # check whether EBP is available on x86
|
---|
1880 | # As 'i' is stored on the stack, this program will crash
|
---|
1881 | # if the base pointer is used to access it because the
|
---|
1882 | # base pointer is cleared in the inline assembly code.
|
---|
1883 | check_exec_crash <<EOF && enable ebp_available
|
---|
1884 | volatile int i=0;
|
---|
1885 | asm volatile (
|
---|
1886 | "xorl %%ebp, %%ebp"
|
---|
1887 | ::: "%ebp");
|
---|
1888 | return i;
|
---|
1889 | EOF
|
---|
1890 |
|
---|
1891 | # check wether EBX is available on x86
|
---|
1892 | check_cc "-fPIC -DPIC" <<EOF && enable ebx_available
|
---|
1893 | int main(){
|
---|
1894 | asm volatile ("":::"%ebx");
|
---|
1895 | }
|
---|
1896 | EOF
|
---|
1897 | if test $arch = "x86_32" && enabled ebx_available; then
|
---|
1898 | echo "register ebx isn't available since we force PIC on. disabling it."
|
---|
1899 | disable ebx_available
|
---|
1900 | fi
|
---|
1901 | fi
|
---|
1902 |
|
---|
1903 | # check for assembler specific support
|
---|
1904 |
|
---|
1905 | if test $arch = "powerpc"; then
|
---|
1906 | check_cc <<EOF && dcbzl=yes
|
---|
1907 | int main(void) {
|
---|
1908 | register long zero = 0;
|
---|
1909 | char data[1024];
|
---|
1910 | asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
|
---|
1911 | return 0;
|
---|
1912 | }
|
---|
1913 | EOF
|
---|
1914 | fi
|
---|
1915 |
|
---|
1916 | # check for SIMD availability
|
---|
1917 |
|
---|
1918 | # AltiVec flags: The FSF version of GCC differs from the Apple version
|
---|
1919 | if test $arch = "powerpc"; then
|
---|
1920 | if enabled altivec; then
|
---|
1921 | if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
|
---|
1922 | add_cflags "-faltivec"
|
---|
1923 | else
|
---|
1924 | add_cflags "-maltivec -mabi=altivec"
|
---|
1925 | fi
|
---|
1926 | fi
|
---|
1927 | fi
|
---|
1928 |
|
---|
1929 | check_header altivec.h
|
---|
1930 |
|
---|
1931 | # check if our compiler supports Motorola AltiVec C API
|
---|
1932 | if enabled altivec; then
|
---|
1933 | if enabled altivec_h; then
|
---|
1934 | inc_altivec_h="#include <altivec.h>"
|
---|
1935 | else
|
---|
1936 | inc_altivec_h=
|
---|
1937 | fi
|
---|
1938 | check_cc <<EOF || altivec=no
|
---|
1939 | $inc_altivec_h
|
---|
1940 | int main(void) {
|
---|
1941 | vector signed int v1, v2, v3;
|
---|
1942 | v1 = vec_add(v2,v3);
|
---|
1943 | return 0;
|
---|
1944 | }
|
---|
1945 | EOF
|
---|
1946 | fi
|
---|
1947 |
|
---|
1948 | # if either tune or cpu is c3 or c3-2 optimize for smallness
|
---|
1949 | if test x"$arch_raw" = x"c3" -o x"$arch_raw" = x"c3-2"; then
|
---|
1950 | ARCHFLAGS="-march=$arch"
|
---|
1951 | optimize="small"
|
---|
1952 | fi
|
---|
1953 | if test x"$tune" = x"c3" -o x"$tune" = x"c3-2"; then
|
---|
1954 | ARCHFLAGS="-march=$tune"
|
---|
1955 | optimize="small"
|
---|
1956 | fi
|
---|
1957 |
|
---|
1958 | # if no tune setting and we know cpu class look at $processor
|
---|
1959 | if test x"$tune" = x"generic" -a x"$cpu_overide" != x"yes"; then
|
---|
1960 | # first try to tune based on processor info
|
---|
1961 | # P4
|
---|
1962 | if expr "$processor" : "pentium4" > /dev/null ; then
|
---|
1963 | ARCHFLAGS="-march=pentium4"
|
---|
1964 | elif expr "$processor" : ".*Pentium(R) [4D]" > /dev/null ; then
|
---|
1965 | ARCHFLAGS="-march=pentium4"
|
---|
1966 | elif expr "$processor" : ".*Xeon(TM) CPU" > /dev/null ; then
|
---|
1967 | ARCHFLAGS="-march=pentium4"
|
---|
1968 | elif expr "$processor" : ".*XEON(TM) CPU" > /dev/null ; then
|
---|
1969 | ARCHFLAGS="-march=pentium4"
|
---|
1970 | # Multiprocessor Xeon
|
---|
1971 | elif expr "$processor" : ".*XEON(TM) MP CPU" > /dev/null ; then
|
---|
1972 | ARCHFLAGS="-march=pentium4"
|
---|
1973 | elif expr "$processor" : ".*Intel(R) Xeon(R) CPU.*5110" > /dev/null ; then
|
---|
1974 | ARCHFLAGS="-march=k8" # this would be pentium4 on 32 bit systems
|
---|
1975 | # Various Intel Duo processors
|
---|
1976 | elif expr "$processor" : ".*Genuine.*Intel.*CPU" > /dev/null ; then
|
---|
1977 | ARCHFLAGS="-march=pentium4"
|
---|
1978 | elif expr "$processor" : ".*Intel(R).*Core(TM)2.*CPU" > /dev/null ; then
|
---|
1979 | ARCHFLAGS="-march=k8" # this would be pentium4 on 32 bit systems
|
---|
1980 | elif expr "$processor" : ".*Celeron(R) CPU" > /dev/null ; then
|
---|
1981 | ARCHFLAGS="-march=pentium4"
|
---|
1982 | optimize="small"
|
---|
1983 | # P6, which includes Intel Core
|
---|
1984 | elif expr "$processor" : ".*Intel P6 Family" > /dev/null ; then
|
---|
1985 | ARCHFLAGS="-march=pentium4"
|
---|
1986 | #arch_raw="i686"
|
---|
1987 | # P3
|
---|
1988 | elif expr "$processor" : "pentium3" > /dev/null ; then
|
---|
1989 | ARCHFLAGS="-march=pentium3"
|
---|
1990 | elif expr "$processor" : ".*Pentium.* III" > /dev/null ; then
|
---|
1991 | ARCHFLAGS="-march=pentium3"
|
---|
1992 | elif expr "$processor" : ".*Coppermine" > /dev/null ; then
|
---|
1993 | ARCHFLAGS="-march=pentium3"
|
---|
1994 | optimize="small"
|
---|
1995 | elif expr "$processor" : ".*Celeron(TM) CPU" > /dev/null ; then
|
---|
1996 | ARCHFLAGS="-march=pentium3"
|
---|
1997 | optimize="small"
|
---|
1998 | elif expr "$processor" : ".*Pentium(R) M" > /dev/null ; then
|
---|
1999 | ARCHFLAGS="-march=pentium3"
|
---|
2000 | elif expr "$processor" : ".*Celeron(R) M processor" > /dev/null ; then
|
---|
2001 | ARCHFLAGS="-march=pentium3"
|
---|
2002 | #optimize="small"
|
---|
2003 | # P2
|
---|
2004 | elif expr "$processor" : "pentium2" > /dev/null ; then
|
---|
2005 | ARCHFLAGS="-march=pentium2"
|
---|
2006 | elif expr "$processor" : ".*Mendocino" > /dev/null ; then
|
---|
2007 | ARCHFLAGS="-march=pentium2"
|
---|
2008 | optimize="small"
|
---|
2009 | elif expr "$processor" : ".*Klamath" > /dev/null ; then
|
---|
2010 | ARCHFLAGS="-march=pentium2"
|
---|
2011 | optimize="small"
|
---|
2012 | elif expr "$processor" : ".*Deschutes" > /dev/null ; then
|
---|
2013 | ARCHFLAGS="-march=pentium2"
|
---|
2014 | optimize="small"
|
---|
2015 | elif expr "$processor" : ".*Pentium II" > /dev/null ; then
|
---|
2016 | ARCHFLAGS="-march=pentium2"
|
---|
2017 | optimize="small"
|
---|
2018 | # AMD Turion
|
---|
2019 | elif expr "$processor" : ".*AMD Turion(tm) 64" > /dev/null ; then
|
---|
2020 | ARCHFLAGS="-march=k8"
|
---|
2021 | # AMD Geode NX
|
---|
2022 | elif expr "$processor" : ".*AMD Geode(tm) NX" > /dev/null ; then
|
---|
2023 | ARCHFLAGS="-march=pentiumpro -mmmx"
|
---|
2024 | optimize="small"
|
---|
2025 | # Athlon 64
|
---|
2026 | elif expr "$processor" : ".*AMD Athlon(tm) 64" > /dev/null ; then
|
---|
2027 | ARCHFLAGS="-march=k8"
|
---|
2028 | # AMD Opteron
|
---|
2029 | elif expr "$processor" : ".*AMD Opteron(tm)" >/dev/null ; then
|
---|
2030 | ARCHFLAGS="-march=k8"
|
---|
2031 | # Athlon XP
|
---|
2032 | elif expr "$processor" : "athlon-xp" > /dev/null ; then
|
---|
2033 | ARCHFLAGS="-march=pentiumpro -mmmx"
|
---|
2034 | elif expr "$processor" : ".*AMD Athlon(tm) XP" > /dev/null ; then
|
---|
2035 | ARCHFLAGS="-march=pentiumpro -mmmx"
|
---|
2036 | elif expr "$processor" : ".*AMD Sempron(tm)" > /dev/null ; then
|
---|
2037 | ARCHFLAGS="-march=pentiumpro -mmmx"
|
---|
2038 | # Athlon
|
---|
2039 | elif expr "$processor" : "athlon" > /dev/null ; then
|
---|
2040 | ARCHFLAGS="-march=athlon"
|
---|
2041 | elif expr "$processor" : ".*AMD Athlon(..)" > /dev/null ; then
|
---|
2042 | ARCHFLAGS="-march=athlon"
|
---|
2043 | elif expr "$processor" : ".*AMD Duron(..)" > /dev/null ; then
|
---|
2044 | ARCHFLAGS="-march=athlon"
|
---|
2045 | optimize="small"
|
---|
2046 | # K6
|
---|
2047 | elif expr "$processor" : ".*AMD-K6(tm) 3D" > /dev/null ; then
|
---|
2048 | ARCHFLAGS="-march=pentium-mmx"
|
---|
2049 | optimize="small"
|
---|
2050 | # Transmeta Crusoe
|
---|
2051 | elif expr "$processor" : ".*Crusoe(m) Processor TM5600" > /dev/null ; then
|
---|
2052 | ARCHFLAGS="-march=pentium2"
|
---|
2053 | # c3-2
|
---|
2054 | elif expr "$processor" : ".*VIA Esther" > /dev/null ; then
|
---|
2055 | ARCHFLAGS="-march=c3-2"
|
---|
2056 | optimize="small"
|
---|
2057 | arch_raw="c3-2"
|
---|
2058 | elif expr "$processor" : ".*VIA Nehemiah" > /dev/null ; then
|
---|
2059 | ARCHFLAGS="-march=c3-2"
|
---|
2060 | optimize="small"
|
---|
2061 | arch_raw="c3-2"
|
---|
2062 | # c3
|
---|
2063 | elif expr "$processor" : ".*VIA.*Ezra" > /dev/null ; then
|
---|
2064 | ARCHFLAGS="-march=c3"
|
---|
2065 | optimize="small"
|
---|
2066 | arch_raw="c3"
|
---|
2067 | elif expr "$processor" : ".*VIA Samuel" > /dev/null ; then
|
---|
2068 | ARCHFLAGS="-march=c3"
|
---|
2069 | optimize="small"
|
---|
2070 | arch_raw="c3"
|
---|
2071 | # if no known processor info, tune base on arch_raw info
|
---|
2072 | elif test x"$arch_raw" = x"i686" -a x"$mmx" = x"yes" ; then
|
---|
2073 | ARCHFLAGS="-march=pentium2"
|
---|
2074 | proc_error_msg="yes"
|
---|
2075 | elif test x"$arch_raw" = x"i686" -a x"$mmx" = x"no" ; then
|
---|
2076 | ARCHFLAGS="-march=pentiumpro"
|
---|
2077 | proc_error_msg="yes"
|
---|
2078 | elif test x"$arch_raw" = x"i586" -a x"$mmx" = x"yes" ; then
|
---|
2079 | ARCHFLAGS="-march=pentium-mmx"
|
---|
2080 | proc_error_msg="yes"
|
---|
2081 | elif test x"$arch_raw" = x"i586" -a x"$mmx" = x"no" ; then
|
---|
2082 | ARCHFLAGS="-march=i586"
|
---|
2083 | proc_error_msg="yes"
|
---|
2084 | elif test x"$arch_raw" = x"i486"; then
|
---|
2085 | ARCHFLAGS="-march=i486"
|
---|
2086 | proc_error_msg="yes"
|
---|
2087 | elif test x"$arch_raw" = x"i386"; then
|
---|
2088 | ARCHFLAGS="-march=i386"
|
---|
2089 | proc_error_msg="yes"
|
---|
2090 | fi
|
---|
2091 | fi
|
---|
2092 |
|
---|
2093 | if test x"$tune" = x"generic" -a x"$arch" = x"x86_64" -a x"$cpu_overide" != x"yes"; then
|
---|
2094 | ARCHFLAGS="-march=k8"
|
---|
2095 | elif test x"$tune" = x"generic" -a x"$arch" = x"sparc64" -a x"$cpu_overide" != x"yes"; then
|
---|
2096 | ARCHFLAGS="-mcpu=ultrasparc -mvis"
|
---|
2097 | fi
|
---|
2098 |
|
---|
2099 | if enabled proc_error_msg; then
|
---|
2100 | UNAME_M_INFO=` uname -m 2> /dev/null`
|
---|
2101 | UNAME_P_INFO=` uname -p 2> /dev/null`
|
---|
2102 | PROC_INFO=`cat /proc/cpuinfo | grep "model name" | head -n 1 | sed s/"\t"//g 2>/dev/null`
|
---|
2103 | PROC_FLAG=`cat /proc/cpuinfo | grep "flags" | head -n 1 | sed s/"\t"//g 2>/dev/null`
|
---|
2104 | echo ""
|
---|
2105 | echo " *** WARNING *** "
|
---|
2106 | echo " Your CPU was not detected properly:"
|
---|
2107 | echo " uname -m: $UNAME_M_INFO"
|
---|
2108 | echo " uname -p: $UNAME_P_INFO"
|
---|
2109 | echo " $PROC_INFO"
|
---|
2110 | echo " $PROC_FLAG"
|
---|
2111 | echo ""
|
---|
2112 | echo " If you are using a recent checkout from "
|
---|
2113 | echo " http://svn.mythtv.org/svn/trunk/mythtv "
|
---|
2114 | echo " please e-mail the above to mythtv-users@mythtv.org"
|
---|
2115 | echo " With the subject \"configure did not detect my cpu\""
|
---|
2116 | echo ""
|
---|
2117 | fi
|
---|
2118 |
|
---|
2119 | if disabled proc_opt; then
|
---|
2120 | disabled optimize && enable optimize
|
---|
2121 | if test x"$cpu_cmov" = x"yes" -a x"$ARCHFLAGS" != x"-march=k8"; then
|
---|
2122 | ARCHFLAGS="-march=pentiumpro";
|
---|
2123 | fi
|
---|
2124 | fi
|
---|
2125 |
|
---|
2126 | # if cpu flag is present ignore tune and arch and just use cpu
|
---|
2127 | if test x"$cpu" != x"generic"; then
|
---|
2128 | ARCHFLAGS="-march=$cpu"
|
---|
2129 | fi
|
---|
2130 |
|
---|
2131 | # if architecture specific flags don't work blank them
|
---|
2132 | echo "int main( void ) { return 0; }" > $TMPC
|
---|
2133 | TMP_ARCHFLAGS=$ARCHFLAGS
|
---|
2134 | $cc $CFLAGS $ARCHFLAGS -o $TMPE $TMPC 2> /dev/null || ARCHFLAGS=""
|
---|
2135 | if test x"$ARCHFLAGS" = x""; then
|
---|
2136 | if test "$cpu_overide" = "yes" -o x"$tune_raw" != x""; then
|
---|
2137 | echo "ERROR: CPU specific ./configure options failed compile test"
|
---|
2138 | echo " Removing CPU specific compilation options. ($TMP_ARCHFLAGS)"
|
---|
2139 | echo ""
|
---|
2140 | fi
|
---|
2141 | fi
|
---|
2142 |
|
---|
2143 | # check armv5te instructions support
|
---|
2144 | if test $armv5te = "default" -a $arch = "armv4l"; then
|
---|
2145 | armv5te=no
|
---|
2146 | check_cc <<EOF && armv5te=yes
|
---|
2147 | int main(void) {
|
---|
2148 | __asm__ __volatile__ ("qadd r0, r0, r0");
|
---|
2149 | }
|
---|
2150 | EOF
|
---|
2151 | fi
|
---|
2152 |
|
---|
2153 | if test $armv6 = "default" -a $arch = "armv4l"; then
|
---|
2154 | check_cc <<EOF && armv6=yes || armv6=no
|
---|
2155 | int main(void) {
|
---|
2156 | __asm__ __volatile__ ("sadd16 r0, r0, r0");
|
---|
2157 | }
|
---|
2158 | EOF
|
---|
2159 | fi
|
---|
2160 |
|
---|
2161 | # check iwmmxt support
|
---|
2162 | if test $iwmmxt = "default" -a $arch = "armv4l"; then
|
---|
2163 | iwmmxt=no
|
---|
2164 | check_cc <<EOF && iwmmxt=yes
|
---|
2165 | int main(void) {
|
---|
2166 | __asm__ __volatile__ ("wunpckelub wr6, wr4");
|
---|
2167 | }
|
---|
2168 | EOF
|
---|
2169 | fi
|
---|
2170 |
|
---|
2171 | # mmi only available on mips
|
---|
2172 | if test $mmi = "default"; then
|
---|
2173 | if test $arch = "mips"; then
|
---|
2174 | mmi="yes"
|
---|
2175 | else
|
---|
2176 | mmi="no"
|
---|
2177 | fi
|
---|
2178 | fi
|
---|
2179 |
|
---|
2180 | # check if our compiler supports mmi
|
---|
2181 | enabled mmi && check_cc <<EOF || mmi="no"
|
---|
2182 | int main(void) {
|
---|
2183 | __asm__ ("lq \$2, 0(\$2)");
|
---|
2184 | return 0;
|
---|
2185 | }
|
---|
2186 | EOF
|
---|
2187 |
|
---|
2188 | # "CPU_CLIP" test for SRC / libsamplerate
|
---|
2189 | # test positive wrap
|
---|
2190 | cat > $TMPC << EOF
|
---|
2191 | int main(){
|
---|
2192 | float f = (1<<(sizeof(short)*8))>>1;
|
---|
2193 | short s = (short)f;
|
---|
2194 | if ( s == --f )
|
---|
2195 | return(0);
|
---|
2196 | return(1);
|
---|
2197 | }
|
---|
2198 | EOF
|
---|
2199 |
|
---|
2200 | if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
|
---|
2201 | $TMPE && cpuclipspositive="yes"
|
---|
2202 | fi
|
---|
2203 |
|
---|
2204 | # test negative wrap
|
---|
2205 | cat > $TMPC << EOF
|
---|
2206 | int main(){
|
---|
2207 | float f = -((1<<(sizeof(short)*8))>>1) - 1;
|
---|
2208 | short s = (short)f;
|
---|
2209 | if ( s == ++f)
|
---|
2210 | return(0);
|
---|
2211 | return(1);
|
---|
2212 | }
|
---|
2213 | EOF
|
---|
2214 |
|
---|
2215 | if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
|
---|
2216 | $TMPE && cpuclipsnegative="yes"
|
---|
2217 | fi
|
---|
2218 |
|
---|
2219 | # test for distcc
|
---|
2220 | enabled distcc && check_cmd distcc --version || disable distcc
|
---|
2221 | if enabled distcc; then
|
---|
2222 | XYZ=`which $cc`
|
---|
2223 | if test x"$XYZ" != x"" -a x"`ls -l $XYZ | grep distcc`" != x""; then
|
---|
2224 | distcc="symlink"
|
---|
2225 | distcc_txt=" $cc"
|
---|
2226 | fi
|
---|
2227 | fi
|
---|
2228 |
|
---|
2229 | # test for ccache
|
---|
2230 | enabled ccache && check_cmd ccache -V || disable ccache
|
---|
2231 | if enabled ccache; then
|
---|
2232 | XYZ=`which $cc`
|
---|
2233 | if test x"$XYZ" != x"" -a x"`ls -l $XYZ | grep ccache`" != x""; then
|
---|
2234 | ccache="symlink"
|
---|
2235 | ccache_txt=" $cc"
|
---|
2236 | fi
|
---|
2237 | fi
|
---|
2238 |
|
---|
2239 | # ccache should be used before distcc for better cache coherency
|
---|
2240 | if enabled distcc; then
|
---|
2241 | if disabled ccache; then
|
---|
2242 | cc="distcc $cc"
|
---|
2243 | cxx="distcc $cxx"
|
---|
2244 | elif enabled ccache; then
|
---|
2245 | cc="ccache distcc $cc"
|
---|
2246 | cxx="ccache distcc $cxx"
|
---|
2247 | else
|
---|
2248 | disable distcc
|
---|
2249 | distcc_txt="t using distcc explicitly, since ccache symlink is present"
|
---|
2250 | fi
|
---|
2251 | else
|
---|
2252 | if enabled ccache; then
|
---|
2253 | cc="ccache $cc"
|
---|
2254 | cxx="ccache $cxx"
|
---|
2255 | fi
|
---|
2256 | fi
|
---|
2257 |
|
---|
2258 | # ---
|
---|
2259 | # big/little-endian test
|
---|
2260 | if disabled cross_compile; then
|
---|
2261 | check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
|
---|
2262 | #include <inttypes.h>
|
---|
2263 | int main(int argc, char ** argv){
|
---|
2264 | volatile uint32_t i=0x01234567;
|
---|
2265 | return (*((uint8_t*)(&i))) == 0x67;
|
---|
2266 | }
|
---|
2267 | EOF
|
---|
2268 | else
|
---|
2269 | # programs cannot be launched if cross compiling, so make a static guess
|
---|
2270 | if test "$arch" = "powerpc" -o "$arch" = "mips" ; then
|
---|
2271 | bigendian="yes"
|
---|
2272 | fi
|
---|
2273 | fi
|
---|
2274 |
|
---|
2275 | # ---
|
---|
2276 | # check availability of some header files
|
---|
2277 |
|
---|
2278 | check_header malloc.h
|
---|
2279 | check_func memalign
|
---|
2280 |
|
---|
2281 | if disabled_all memalign memalign_hack && enabled need_memalign ; then
|
---|
2282 | die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
|
---|
2283 | fi
|
---|
2284 |
|
---|
2285 | check_header byteswap.h
|
---|
2286 | check_header arpa/inet.h
|
---|
2287 |
|
---|
2288 | check_func2 sys/timeb.h ftime
|
---|
2289 | check_func2 sys/time.h gettimeofday
|
---|
2290 | check_func2 "sys/types.h sys/socket.h ifaddrs.h" getifaddrs
|
---|
2291 |
|
---|
2292 | check_func inet_aton
|
---|
2293 | check_func localtime_r
|
---|
2294 | check_func posix_fadvise
|
---|
2295 | enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
|
---|
2296 |
|
---|
2297 | # ffserver uses poll(),
|
---|
2298 | # if it's not found we can emulate it using select().
|
---|
2299 | if enabled ffserver; then
|
---|
2300 | check_header sys/poll.h
|
---|
2301 | fi
|
---|
2302 |
|
---|
2303 | enabled ffmpeg_threads && enable pthreads
|
---|
2304 |
|
---|
2305 | # check for some common methods of building with pthread support
|
---|
2306 | # do this before the optional library checks as some of them require pthreads
|
---|
2307 | if enabled pthreads; then
|
---|
2308 | if check_func pthread_create; then
|
---|
2309 | :
|
---|
2310 | elif check_func pthread_create -pthread; then
|
---|
2311 | add_cflags -pthread
|
---|
2312 | add_ldflags -pthread
|
---|
2313 | elif check_func pthread_create -pthreads; then
|
---|
2314 | add_cflags -pthreads
|
---|
2315 | add_ldflags -pthreads
|
---|
2316 | elif ! check_lib pthread.h pthread_create -lpthread; then
|
---|
2317 | die "ERROR: can't find pthreads library"
|
---|
2318 | fi
|
---|
2319 | fi
|
---|
2320 |
|
---|
2321 | for thread in $THREADS_LIST; do
|
---|
2322 | if enabled $thread; then
|
---|
2323 | if ! disabled thread_type ; then
|
---|
2324 | die "ERROR: Only one thread type must be selected."
|
---|
2325 | else
|
---|
2326 | thread_type="$thread"
|
---|
2327 | fi
|
---|
2328 | fi
|
---|
2329 | done
|
---|
2330 |
|
---|
2331 | enabled_any amr_nb amr_nb_fixed amr_wb && enable amr
|
---|
2332 | enabled_all amr_nb amr_nb_fixed &&
|
---|
2333 | die "Only one of amr_nb and amr_nb_fixed may be enabled."
|
---|
2334 |
|
---|
2335 | if enabled libdts; then
|
---|
2336 | if has_library libdts_pic; then
|
---|
2337 | dtslib="-ldts_pic"
|
---|
2338 | elif has_library libdts; then
|
---|
2339 | dtslib="-ldts"
|
---|
2340 | else
|
---|
2341 | echo "Warning: DTS library not found."
|
---|
2342 | fi
|
---|
2343 | fi
|
---|
2344 |
|
---|
2345 | # these are off by default, so fail if requested and not available
|
---|
2346 | enabled amr_nb && require libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
|
---|
2347 | enabled amr_wb && require libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
|
---|
2348 | enabled liba52 && require liba52 a52dec/a52.h a52_init -la52
|
---|
2349 | enabled libdts && require libdts dts.h dts_init $dtslib
|
---|
2350 | enabled libgsm && require libgsm gsm.h gsm_create -lgsm
|
---|
2351 | enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
|
---|
2352 | enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
|
---|
2353 | enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
|
---|
2354 | enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg
|
---|
2355 | enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
|
---|
2356 | enabled xvid && require XviD xvid.h xvid_global -lxvidcore
|
---|
2357 | enabled x264 && require x264 x264.h x264_encoder_open -lx264
|
---|
2358 | enabled dc1394 && require libdc1394 libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394
|
---|
2359 | enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
|
---|
2360 | enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
|
---|
2361 | enabled libfaad && require2 libfaad faad.h faacDecOpen -lfaad
|
---|
2362 | enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
|
---|
2363 |
|
---|
2364 |
|
---|
2365 | check_header stdint.h
|
---|
2366 |
|
---|
2367 | # test for lrint in math.h
|
---|
2368 | check_exec <<EOF && lrint=yes || lrint=no
|
---|
2369 | #define _ISOC9X_SOURCE 1
|
---|
2370 | #include <math.h>
|
---|
2371 | int main( void ) { return (lrint(3.999f) > 0)?0:1; }
|
---|
2372 | EOF
|
---|
2373 |
|
---|
2374 | # test for lrintf in math.h
|
---|
2375 | check_exec <<EOF && lrintf=yes || lrintf=no
|
---|
2376 | #define _ISOC9X_SOURCE 1
|
---|
2377 | #include <math.h>
|
---|
2378 | int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
|
---|
2379 | EOF
|
---|
2380 |
|
---|
2381 | #test for round()
|
---|
2382 | check_exec <<EOF && round=yes || round=no
|
---|
2383 | #define _ISOC9X_SOURCE 1
|
---|
2384 | #include <math.h>
|
---|
2385 | int main( void ) { return (round(3.999f) > 0)?0:1; }
|
---|
2386 | EOF
|
---|
2387 |
|
---|
2388 | # test for sizeof(int)
|
---|
2389 | for sizeof in 1 2 4 8 16; do
|
---|
2390 | check_cc <<EOF && _sizeof_int=$sizeof && break
|
---|
2391 | void foo(){switch (0) case 0: case (sizeof(int) == $sizeof):;}
|
---|
2392 | EOF
|
---|
2393 | done
|
---|
2394 |
|
---|
2395 | # test for sizeof(long)
|
---|
2396 | for sizeof in 1 2 4 8 16; do
|
---|
2397 | check_cc <<EOF && _sizeof_long=$sizeof && break
|
---|
2398 | void foo(){switch (0) case 0: case (sizeof(long) == $sizeof):;}
|
---|
2399 | EOF
|
---|
2400 | done
|
---|
2401 |
|
---|
2402 | _restrict=
|
---|
2403 | for restrict_keyword in restrict __restrict__ __restrict; do
|
---|
2404 | check_cc <<EOF && _restrict=$restrict_keyword && break
|
---|
2405 | void foo(char * $restrict_keyword p);
|
---|
2406 | EOF
|
---|
2407 | done
|
---|
2408 |
|
---|
2409 | # dlopen/dlfcn.h probing
|
---|
2410 | check_header dlfcn.h
|
---|
2411 |
|
---|
2412 | if check_func dlopen; then
|
---|
2413 | ldl=
|
---|
2414 | elif check_func dlopen -ldl; then
|
---|
2415 | ldl=-ldl
|
---|
2416 | fi
|
---|
2417 |
|
---|
2418 | test "$vhook" = "default" && vhook="$dlopen"
|
---|
2419 |
|
---|
2420 | enabled_any vhook liba52bin libfaadbin ffserver && add_extralibs $ldl
|
---|
2421 |
|
---|
2422 | if test "$targetos" = cygwin && enabled static ; then
|
---|
2423 | vhook="no"
|
---|
2424 | echo
|
---|
2425 | echo "At the moment vhooks don't work on Cygwin static builds."
|
---|
2426 | echo "Patches welcome."
|
---|
2427 | echo
|
---|
2428 | fi
|
---|
2429 |
|
---|
2430 | if enabled vhook; then
|
---|
2431 | check_ldflags -rdynamic
|
---|
2432 | check_ldflags -export-dynamic
|
---|
2433 | fi
|
---|
2434 |
|
---|
2435 | enabled audio_beos && add_extralibs "-lmedia -lbe"
|
---|
2436 |
|
---|
2437 | check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
|
---|
2438 | check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
|
---|
2439 |
|
---|
2440 | ##########################################
|
---|
2441 | # SDL check
|
---|
2442 |
|
---|
2443 | sdl_too_old=no
|
---|
2444 | sdl=no
|
---|
2445 | #SDL_CONFIG="${cross_prefix}sdl-config"
|
---|
2446 | if "${SDL_CONFIG}" --version >/dev/null 2>&1; then
|
---|
2447 | sdl_cflags=`"${SDL_CONFIG}" --cflags`
|
---|
2448 | temp_cflags $sdl_cflags
|
---|
2449 | temp_extralibs `"${SDL_CONFIG}" --libs`
|
---|
2450 | if check_lib SDL.h SDL_Init; then
|
---|
2451 | _sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'`
|
---|
2452 | if test "$_sdlversion" -lt 121 ; then
|
---|
2453 | sdl_too_old=yes
|
---|
2454 | else
|
---|
2455 | sdl=yes
|
---|
2456 | check_cc $sdl_cflags <<EOF && enable sdl_video_size
|
---|
2457 | #include <SDL.h>
|
---|
2458 | int main(void){
|
---|
2459 | const SDL_VideoInfo *vi = SDL_GetVideoInfo();
|
---|
2460 | int w = vi->current_w;
|
---|
2461 | return 0;
|
---|
2462 | }
|
---|
2463 | EOF
|
---|
2464 | fi
|
---|
2465 | fi
|
---|
2466 | restore_flags
|
---|
2467 | fi
|
---|
2468 |
|
---|
2469 | texi2html -version >/dev/null 2>&1 && enable texi2html || disable texi2html
|
---|
2470 |
|
---|
2471 | ##########################################
|
---|
2472 | # IPv6 check
|
---|
2473 |
|
---|
2474 | enabled network && enabled ipv6 && check_ld <<EOF && ipv6=yes || ipv6=no
|
---|
2475 | #include <sys/types.h>
|
---|
2476 | #include <sys/socket.h>
|
---|
2477 | #include <netinet/in.h>
|
---|
2478 | #include <netdb.h>
|
---|
2479 | int main( void ) {
|
---|
2480 | struct sockaddr_storage saddr;
|
---|
2481 | struct ipv6_mreq mreq6;
|
---|
2482 | getaddrinfo(0,0,0,0);
|
---|
2483 | getnameinfo(0,0,0,0,0,0,0);
|
---|
2484 | IN6_IS_ADDR_MULTICAST((const struct in6_addr *)0);
|
---|
2485 | }
|
---|
2486 | EOF
|
---|
2487 |
|
---|
2488 | enabled v4l && check_header linux/videodev.h || disable v4l
|
---|
2489 | enabled v4l2 && check_header linux/videodev2.h || disable v4l2
|
---|
2490 |
|
---|
2491 | # OSS probe
|
---|
2492 | enabled audio_oss &&
|
---|
2493 | check_header sys/soundcard.h ||
|
---|
2494 | check_header soundcard.h ||
|
---|
2495 | disable audio_oss
|
---|
2496 |
|
---|
2497 | # ALSA probe
|
---|
2498 | ! disabled audio_alsa &&
|
---|
2499 | check_lib alsa/asoundlib.h snd_asoundlib_version $audio_alsa_libs &&
|
---|
2500 | enable audio_alsa ||
|
---|
2501 | disable audio_alsa
|
---|
2502 |
|
---|
2503 | # aRts probe
|
---|
2504 | ! disabled audio_arts &&
|
---|
2505 | check_foo_config arts artsc artsc.h arts_init &&
|
---|
2506 | audio_arts_libs=`artsc-config --libs` &&
|
---|
2507 | audio_arts_cflags=`artsc-config --cflags` &&
|
---|
2508 | enable audio_arts ||
|
---|
2509 | disable audio_arts
|
---|
2510 |
|
---|
2511 | # JACK probe
|
---|
2512 | ! disabled audio_jack &&
|
---|
2513 | check_lib jack/jack.h jack_client_new $audio_jack_libs &&
|
---|
2514 | enable audio_jack ||
|
---|
2515 | disable audio_jack
|
---|
2516 |
|
---|
2517 | # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
|
---|
2518 | if enabled bktr; then
|
---|
2519 | { check_header dev/bktr/ioctl_meteor.h &&
|
---|
2520 | check_header dev/bktr/ioctl_bt848.h; } ||
|
---|
2521 | { check_header machine/ioctl_meteor.h &&
|
---|
2522 | check_header machine/ioctl_bt848.h; } ||
|
---|
2523 | { check_header dev/video/meteor/ioctl_meteor.h &&
|
---|
2524 | check_header dev/video/bktr/ioctl_bt848.h; } ||
|
---|
2525 | check_header dev/ic/bt8xx.h ||
|
---|
2526 | disable bktr
|
---|
2527 | fi
|
---|
2528 |
|
---|
2529 | # Deal with the x11 frame grabber
|
---|
2530 | enabled x11grab &&
|
---|
2531 | enabled gpl &&
|
---|
2532 | enabled x11_grab_device_demuxer &&
|
---|
2533 | check_header X11/Xlib.h &&
|
---|
2534 | check_header X11/extensions/XShm.h &&
|
---|
2535 | check_func XOpenDisplay -lX11 &&
|
---|
2536 | check_func XShmCreateImage -lX11 -lXext &&
|
---|
2537 | add_extralibs -lX11 -lXext ||
|
---|
2538 | disable x11_grab_device_demuxer
|
---|
2539 |
|
---|
2540 | enabled debug && add_cflags -g
|
---|
2541 |
|
---|
2542 | # add some useful compiler flags if supported
|
---|
2543 | #check_cflags -Wdeclaration-after-statement
|
---|
2544 | check_cflags -Wall
|
---|
2545 | check_cflags -Wno-switch
|
---|
2546 | check_cflags -Wdisabled-optimization
|
---|
2547 | check_cflags -Wpointer-arith
|
---|
2548 | check_cflags -Wredundant-decls
|
---|
2549 | check_cflags -Wno-pointer-sign
|
---|
2550 | enabled extra_warnings && check_cflags -Winline
|
---|
2551 | # C++ Flags
|
---|
2552 | check_cppflags -Wall
|
---|
2553 | check_cppflags -Wno-switch
|
---|
2554 | check_cppflags -Wpointer-arith
|
---|
2555 | check_cppflags -Wredundant-decls
|
---|
2556 | check_cppflags -Wno-non-virtual-dtor
|
---|
2557 | #needed for INT64_C in libs/libavformat under g++
|
---|
2558 | check_cppflags -D__STDC_CONSTANT_MACROS
|
---|
2559 |
|
---|
2560 | # add some linker flags
|
---|
2561 | check_ldflags $LDLATEFLAGS
|
---|
2562 |
|
---|
2563 | # GCC version
|
---|
2564 | cat > $TMPC << EOF
|
---|
2565 | int main(int argc, char **argv)
|
---|
2566 | {
|
---|
2567 | int ret = 0;
|
---|
2568 | if (argc == 1)
|
---|
2569 | {
|
---|
2570 | #if defined(__GNUC__)
|
---|
2571 | ret = __GNUC__;
|
---|
2572 | #endif
|
---|
2573 | }
|
---|
2574 | else
|
---|
2575 | {
|
---|
2576 | #if defined(__GNUC_MINOR__)
|
---|
2577 | ret = __GNUC_MINOR__;
|
---|
2578 | #endif
|
---|
2579 | }
|
---|
2580 |
|
---|
2581 | return ret;
|
---|
2582 | }
|
---|
2583 | EOF
|
---|
2584 |
|
---|
2585 | if $cc $CFLAGS $TMPC -o $TMPE ; then
|
---|
2586 | $TMPE
|
---|
2587 | GCC_MAJOR=$?
|
---|
2588 | $TMPE "minor"
|
---|
2589 | GCC_MINOR=$?
|
---|
2590 | fi
|
---|
2591 |
|
---|
2592 | if enabled $symbol_visibility; then
|
---|
2593 | if test x"$GCC_MAJOR" = x"4" ; then
|
---|
2594 | check_cflags -fvisibility-inlines-hidden
|
---|
2595 | check_cppflags -fvisibility-inlines-hidden
|
---|
2596 | CCONFIG="$CCONFIG use_hidesyms"
|
---|
2597 | else
|
---|
2598 | echo "Warning: --enable-symbol-visibility requires gcc 4.x"
|
---|
2599 | fi
|
---|
2600 | fi
|
---|
2601 |
|
---|
2602 | if enabled $dvb; then
|
---|
2603 | dvb="no"
|
---|
2604 | if test -f "$dvb_path"/linux/dvb/frontend.h ; then
|
---|
2605 | if test -f "$dvb_path"/../MAINTAINERS ; then
|
---|
2606 | echo "Warning: DVB location in kernel. May not compile."
|
---|
2607 | fi
|
---|
2608 | dvb="yes"
|
---|
2609 | else
|
---|
2610 | dvb_path="/usr/src/linux/include"
|
---|
2611 | KERNEL_RELEASE=`uname -r 2>/dev/null`
|
---|
2612 | if test x"$KERNEL_RELEASE" != x"" ; then
|
---|
2613 | dvb_path="/usr/src/linux-$KERNEL_RELEASE/include"
|
---|
2614 | fi
|
---|
2615 |
|
---|
2616 | if test -f "$dvb_path"/linux/dvb/frontend.h ; then
|
---|
2617 | if test -f "$dvb_path"/../MAINTAINERS ; then
|
---|
2618 | echo "Warning: DVB location in kernel. May not compile."
|
---|
2619 | fi
|
---|
2620 | dvb="yes"
|
---|
2621 | else
|
---|
2622 | echo "DVB location needs to have linux/dvb/frontend.h [$dvb_path]"
|
---|
2623 | fi
|
---|
2624 | fi
|
---|
2625 | fi
|
---|
2626 |
|
---|
2627 | enabled lamemp3 && has_library libmp3lame && has_header lame/lame.h ||
|
---|
2628 | die "ERROR! You must have the Lame MP3 encoding library installed to compile MythTV."
|
---|
2629 |
|
---|
2630 | #test for lirc client libraries and headers
|
---|
2631 | enabled lirc && has_library liblirc_client && check_header lirc/lirc_client.h || disable lirc
|
---|
2632 |
|
---|
2633 | if enabled firewire; then
|
---|
2634 | firewire="no"
|
---|
2635 | libavc_5_3="no"
|
---|
2636 | if has_library libiec61883 -a \
|
---|
2637 | has_library libavc1394 -a \
|
---|
2638 | has_library librom1394; then
|
---|
2639 | if test x`which pkg-config 2>/dev/null` != x"" ; then
|
---|
2640 | if `pkg-config --atleast-version 0.5.0 libavc1394` ; then
|
---|
2641 | if `pkg-config --atleast-version 1.0.0 libiec61883` ; then
|
---|
2642 | firewire="yes"
|
---|
2643 | if `pkg-config --atleast-version 0.5.3 libavc1394` ; then
|
---|
2644 | libavc_5_3="yes"
|
---|
2645 | fi
|
---|
2646 | fi
|
---|
2647 | fi
|
---|
2648 | fi
|
---|
2649 | fi
|
---|
2650 | if test $targetos = darwin; then
|
---|
2651 | # This should pick the newest. e.g. FireWireSDK21 instead of 20
|
---|
2652 | # Unfortunately, the location keeps changing:
|
---|
2653 | #/Developer/FireWireSDK20/Examples/AVCVideoServices/Framework
|
---|
2654 | #/Developer/FireWireSDK21/Examples/Framework
|
---|
2655 | mac_avc=`find /Developer/FireWireSDK* -name Framework 2> /dev/null \
|
---|
2656 | | tail -n 1`
|
---|
2657 | if test -d "$mac_avc" ; then
|
---|
2658 | firewire="yes"
|
---|
2659 | else
|
---|
2660 | echo Firewire being disabled. /Developer/FireWireSDK* missing
|
---|
2661 | fi
|
---|
2662 | fi
|
---|
2663 | fi
|
---|
2664 |
|
---|
2665 | enabled x11 && has_library libX11 || disable x11
|
---|
2666 |
|
---|
2667 | enabled xrandr && has_header X11/extensions/Xrandr.h || disable xrandr
|
---|
2668 | enabled xv && has_library libXv || disable xv
|
---|
2669 |
|
---|
2670 | VENDOR_XVMC_LIBS=""
|
---|
2671 | if enabled xvmc; then
|
---|
2672 | xvmc="no"
|
---|
2673 | if ! has_library libXvMCW ; then
|
---|
2674 | xvmcw="no"
|
---|
2675 | fi
|
---|
2676 | if test x"$xvmc_lib" != x""; then
|
---|
2677 | VENDOR_XVMC_LIBS="-l"$xvmc_lib
|
---|
2678 | xvmc="yes"
|
---|
2679 | xvmcw="no"
|
---|
2680 | if has_header X11/extensions/vldXvMC.h ; then
|
---|
2681 | echo > /dev/null
|
---|
2682 | else
|
---|
2683 | xvmc_vld="no"
|
---|
2684 | fi
|
---|
2685 | elif enabled xvmcw; then
|
---|
2686 | VENDOR_XVMC_LIBS="-lXvMCW"
|
---|
2687 | xvmc="yes"
|
---|
2688 | if has_header X11/extensions/vldXvMC.h ; then
|
---|
2689 | echo > /dev/null
|
---|
2690 | else
|
---|
2691 | xvmc_vld="no"
|
---|
2692 | fi
|
---|
2693 | elif has_library libXvMCNVIDIA ; then
|
---|
2694 | VENDOR_XVMC_LIBS="-lXvMCNVIDIA"
|
---|
2695 | xvmc="yes"
|
---|
2696 | if enabled xvmc_vld; then
|
---|
2697 | xvmc_vld="no"
|
---|
2698 | fi
|
---|
2699 | elif enabled xvmc_pro; then
|
---|
2700 | if has_library libviaXvMCPro ; then
|
---|
2701 | VENDOR_XVMC_LIBS="-lviaXvMCPro"
|
---|
2702 | xvmc="yes"
|
---|
2703 | xvmc_vld="yes"
|
---|
2704 | fi
|
---|
2705 | elif has_library libviaXvMC ; then
|
---|
2706 | VENDOR_XVMC_LIBS="-lviaXvMC"
|
---|
2707 | xvmc="yes"
|
---|
2708 | elif has_library libI810XvMC ; then
|
---|
2709 | VENDOR_XVMC_LIBS="-lI810XvMC"
|
---|
2710 | xvmc="yes"
|
---|
2711 | if enabled xvmc_vld; then
|
---|
2712 | xvmc_vld="no"
|
---|
2713 | fi
|
---|
2714 | fi
|
---|
2715 | else
|
---|
2716 | xvmc_vld="no"
|
---|
2717 | fi
|
---|
2718 |
|
---|
2719 | if test x"$VENDOR_XVMC_LIBS" != x"-lXvMCNVIDIA" ; then
|
---|
2720 | xvmc_opengl="no"
|
---|
2721 | fi
|
---|
2722 |
|
---|
2723 | enabled opengl_vsync && has_library libGL && enable opengl || disable opengl_vsync
|
---|
2724 | enabled xvmc_opengl && has_library libGL && enable opengl && disable xvmc_vld && disable xvmc_pro || disable xvmc_opengl
|
---|
2725 |
|
---|
2726 | # Can only do Mac accel on Mac platform
|
---|
2727 | enabled dvdv && test $targetos = darwin || disable dvdv
|
---|
2728 |
|
---|
2729 | # CoreVideo in only available on Mac OS 10.4, or on 10.3 with QuickTime 7.
|
---|
2730 | # This checks for it, and some other calls that the module needs
|
---|
2731 | if test $targetos = darwin; then
|
---|
2732 | cat > $TMPC << EOF
|
---|
2733 | #include <QuartzCore/CVDisplayLink.h>
|
---|
2734 | #include <AGL/agl.h>
|
---|
2735 | int main( void ) { return aglGetCGLContext(0,0L); }
|
---|
2736 | EOF
|
---|
2737 | if $cc -o $TMPE $TMPC -framework AGL > /dev/null 2>&1; then
|
---|
2738 | mac_corevideo="yes"
|
---|
2739 | fi
|
---|
2740 | fi
|
---|
2741 |
|
---|
2742 | # Ubuntu Dapper installs NVIDIA GL headers to a weird location in order
|
---|
2743 | # not to overwrite the headers installed from Mesa, etc. We need to
|
---|
2744 | # add that path to include paths if that's the case.
|
---|
2745 | if test -d /usr/share/doc/nvidia-glx-dev/include; then
|
---|
2746 | CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH /usr/share/doc/nvidia-glx-dev/include"
|
---|
2747 | fi
|
---|
2748 |
|
---|
2749 | # Same for Debian Sid.
|
---|
2750 | if test -d /usr/share/nvidia/include/GL; then
|
---|
2751 | CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH /usr/share/nvidia/include"
|
---|
2752 | fi
|
---|
2753 |
|
---|
2754 | if enabled directfb; then
|
---|
2755 | directfb="no"
|
---|
2756 | if test x`which directfb-config 2> /dev/null` != x"" ; then
|
---|
2757 | directfb="yes"
|
---|
2758 | CONFIG_DIRECTFB_LIBS=`directfb-config --libs`
|
---|
2759 | CONFIG_DIRECTFB_CXXFLAGS=`directfb-config --cflags`
|
---|
2760 | fi
|
---|
2761 | fi
|
---|
2762 |
|
---|
2763 | enabled lmsensors && has_header sensors/sensors.h && has_library libsensors || disable lmsensors
|
---|
2764 |
|
---|
2765 | if test $targetos = darwin; then
|
---|
2766 | # So far, only OS X 10.4 has this as a non-private framework
|
---|
2767 | if test -d /System/Library/Frameworks/DiskArbitration.framework/Headers ; then
|
---|
2768 | darwin_da="yes"
|
---|
2769 | fi
|
---|
2770 | fi
|
---|
2771 |
|
---|
2772 | # not all compilers support -Os
|
---|
2773 | #test "$optimize" = "small" && check_cflags -Os
|
---|
2774 | # disabling -Os for now (2007-01-31) since it has build problems after ffmpeg sync [12645]
|
---|
2775 | test "$optimize" = "small" && check_optflags -O2
|
---|
2776 |
|
---|
2777 | if enabled optimize; then
|
---|
2778 | if test -n "`$cc -v 2>&1 | grep xlc`"; then
|
---|
2779 | add_optflags "-O5"
|
---|
2780 | add_ldflags "-O5"
|
---|
2781 | else
|
---|
2782 | add_optflags "-O3"
|
---|
2783 | fi
|
---|
2784 | fi
|
---|
2785 |
|
---|
2786 | # PIC flags for shared library objects where they are needed
|
---|
2787 | if enabled shared; then
|
---|
2788 | # LIBOBJFLAGS may have already been set in the OS configuration
|
---|
2789 | if test -z "$LIBOBJFLAGS" ; then
|
---|
2790 | case "$arch" in
|
---|
2791 | x86_64|ia64|alpha|sparc*|power*) LIBOBJFLAGS="\$(PIC)" ;;
|
---|
2792 | esac
|
---|
2793 | fi
|
---|
2794 | fi
|
---|
2795 |
|
---|
2796 | if enabled gprof; then
|
---|
2797 | add_cflags "-p"
|
---|
2798 | add_ldflags "-p"
|
---|
2799 | fi
|
---|
2800 |
|
---|
2801 | VHOOKCFLAGS="-fPIC $CFLAGS"
|
---|
2802 | enabled needmdynamicnopic && add_cflags -mdynamic-no-pic
|
---|
2803 |
|
---|
2804 | # find if .align arg is power-of-two or not
|
---|
2805 | if test $asmalign_pot = "unknown"; then
|
---|
2806 | asmalign_pot="no"
|
---|
2807 | echo 'asm (".align 3");' | check_cc && asmalign_pot="yes"
|
---|
2808 | fi
|
---|
2809 |
|
---|
2810 | enabled_any $ENCODER_LIST && enable encoders
|
---|
2811 | enabled_any $DECODER_LIST && enable decoders
|
---|
2812 | enabled_any $MUXER_LIST && enable muxers
|
---|
2813 | enabled_any $DEMUXER_LIST && enable demuxers
|
---|
2814 |
|
---|
2815 | enabled_any $THREADS_LIST && enable threads
|
---|
2816 |
|
---|
2817 | check_deps $CONFIG_LIST $HAVE_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST \
|
---|
2818 | $DEMUXER_LIST $MUXER_LIST $MYTH_LIST
|
---|
2819 |
|
---|
2820 | enabled libogg && append pkg_requires "ogg >= 1.1"
|
---|
2821 | enabled libtheora && append pkg_requires "theora"
|
---|
2822 | enabled libvorbis && append pkg_requires "vorbis vorbisenc"
|
---|
2823 | enabled dc1394 && append pkg_requires "libraw1394"
|
---|
2824 |
|
---|
2825 |
|
---|
2826 | if test x"$libdir" = x""; then
|
---|
2827 | libdir="${PREFIX}/${libdir_name}"
|
---|
2828 | fi
|
---|
2829 |
|
---|
2830 |
|
---|
2831 | echo "# Basic Settings"
|
---|
2832 | echo "Compile type $compile_type"
|
---|
2833 | if test x"$compile_type" = x"debug" -a $arch = "x86_32" -a \
|
---|
2834 | x"$GCC_MAJOR" != x"" -a $GCC_MAJOR -lt "4"; then
|
---|
2835 | echo "WARNING: backtraces involving libavcodec are not supported for gcc < 4.0"
|
---|
2836 | fi
|
---|
2837 | echo "Compiler cache $ccache$ccache_txt"
|
---|
2838 | echo "DistCC $distcc$distcc_txt"
|
---|
2839 | echo "Install prefix $PREFIX"
|
---|
2840 | #echo "Source path $source_path"
|
---|
2841 | #echo "C compiler $cc"
|
---|
2842 | #echo "make $make"
|
---|
2843 | if test x"$processor" != x"" ; then
|
---|
2844 | echo "CPU $arch ($processor)"
|
---|
2845 | elif test x"$arch_raw" != x"" ; then
|
---|
2846 | echo "CPU $arch ($arch_raw)"
|
---|
2847 | else
|
---|
2848 | echo "CPU $arch"
|
---|
2849 | fi
|
---|
2850 | #if test "$BUILDSUF" != ""; then
|
---|
2851 | # echo "Build suffix $BUILDSUF"
|
---|
2852 | #fi
|
---|
2853 | echo "big-endian $bigendian"
|
---|
2854 | if test $arch = "x86_32" -o $arch = "x86_64"; then
|
---|
2855 | echo "MMX enabled $mmx"
|
---|
2856 | #echo "CMOV enabled $cmov"
|
---|
2857 | #echo "CMOV is fast $fast_cmov"
|
---|
2858 | fi
|
---|
2859 | if test $arch = "armv4l"; then
|
---|
2860 | echo "ARMv5TE enabled $armv5te"
|
---|
2861 | echo "ARMv6 enabled $armv6"
|
---|
2862 | echo "IWMMXT enabled $iwmmxt"
|
---|
2863 | fi
|
---|
2864 | if test $arch = "mips"; then
|
---|
2865 | echo "MMI enabled $mmi"
|
---|
2866 | fi
|
---|
2867 | if test $arch = "powerpc"; then
|
---|
2868 | echo "AltiVec enabled $altivec"
|
---|
2869 | echo "dcbzl available $dcbzl"
|
---|
2870 | fi
|
---|
2871 | #echo "gprof enabled $gprof"
|
---|
2872 | #echo "debug symbols $debug"
|
---|
2873 | #echo "strip symbols $dostrip"
|
---|
2874 | #echo "optimize $optimize"
|
---|
2875 | #echo "static $static"
|
---|
2876 | #echo "shared $shared"
|
---|
2877 | #echo "postprocessing support $pp"
|
---|
2878 | #echo "software scaler enabled $swscaler"
|
---|
2879 | #echo "video hooking $vhook"
|
---|
2880 | #if enabled vhook; then
|
---|
2881 | # echo "Imlib2 support $imlib2"
|
---|
2882 | # echo "FreeType support $freetype2"
|
---|
2883 | #fi
|
---|
2884 | #echo "network support $network"
|
---|
2885 | #if enabled network ; then
|
---|
2886 | # echo "IPv6 support $ipv6"
|
---|
2887 | #fi
|
---|
2888 | #echo "threading support $thread_type"
|
---|
2889 | #echo "SDL support $sdl"
|
---|
2890 | #if enabled sdl_too_old; then
|
---|
2891 | # echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
|
---|
2892 | #fi
|
---|
2893 | #echo "Sun medialib support $mlib"
|
---|
2894 | #echo "AVISynth enabled $avisynth"
|
---|
2895 | #echo "liba52 support $liba52"
|
---|
2896 | #echo "liba52 dlopened $liba52bin"
|
---|
2897 | #echo "libdts support $libdts"
|
---|
2898 | #echo "libfaac enabled $libfaac"
|
---|
2899 | #echo "libfaad enabled $libfaad"
|
---|
2900 | #echo "faadbin enabled $libfaadbin"
|
---|
2901 | #echo "libgsm enabled $libgsm"
|
---|
2902 | #echo "libmp3lame enabled $libmp3lame"
|
---|
2903 | #echo "libnut enabled $libnut"
|
---|
2904 | #echo "libogg enabled $libogg"
|
---|
2905 | #echo "libtheora enabled $libtheora"
|
---|
2906 | #echo "libvorbis enabled $libvorbis"
|
---|
2907 | #echo "x264 enabled $x264"
|
---|
2908 | #echo "XviD enabled $xvid"
|
---|
2909 | #echo "zlib enabled $zlib"
|
---|
2910 | #echo "AMR-NB float support $amr_nb"
|
---|
2911 | #echo "AMR-NB fixed support $amr_nb_fixed"
|
---|
2912 | #echo "AMR-WB float support $amr_wb"
|
---|
2913 | #echo "AMR-WB IF2 support $amr_if2"
|
---|
2914 | #if disabled gpl; then
|
---|
2915 | # echo "License: LGPL"
|
---|
2916 | #else
|
---|
2917 | # echo "License: GPL"
|
---|
2918 | #fi
|
---|
2919 |
|
---|
2920 | echo
|
---|
2921 | if enabled frontend; then
|
---|
2922 | echo "# Input Support"
|
---|
2923 | echo "Joystick menu $joystick_menu"
|
---|
2924 | echo "lirc support $lirc"
|
---|
2925 | echo "Apple Remote $appleremote"
|
---|
2926 | fi
|
---|
2927 |
|
---|
2928 | if enabled backend; then
|
---|
2929 | echo "Video4Linux sup. $v4l"
|
---|
2930 | echo "ivtv support $ivtv"
|
---|
2931 | echo "FireWire support $firewire"
|
---|
2932 | echo "DVB support $dvb [$dvb_path]"
|
---|
2933 | echo "DBox2 support $dbox2"
|
---|
2934 | echo "HDHomeRun sup. $hdhomerun"
|
---|
2935 | echo "IPTV support $iptv"
|
---|
2936 | fi
|
---|
2937 |
|
---|
2938 | if enabled frontend; then
|
---|
2939 | echo
|
---|
2940 | echo "# Sound Output Support"
|
---|
2941 | echo "OSS support $audio_oss"
|
---|
2942 | echo "ALSA support $audio_alsa"
|
---|
2943 | echo "aRts support $audio_arts"
|
---|
2944 | echo "JACK support $audio_jack"
|
---|
2945 | echo "DTS passthrough $libdts"
|
---|
2946 | echo
|
---|
2947 | echo "# Video Output Support"
|
---|
2948 | echo "x11 support $x11"
|
---|
2949 | echo "xrandr support $xrandr"
|
---|
2950 | echo "xv support $xv"
|
---|
2951 | echo "XvMC support $xvmc"
|
---|
2952 | echo "XvMC VLD support $xvmc_vld"
|
---|
2953 | echo "XvMC pro support $xvmc_pro"
|
---|
2954 | echo "XvMC OpenGL sup. $xvmc_opengl"
|
---|
2955 | if test "$VENDOR_XVMC_LIBS" != "" ; then
|
---|
2956 | echo "XvMC libs $VENDOR_XVMC_LIBS"
|
---|
2957 | fi
|
---|
2958 | echo "Mac acceleration $dvdv"
|
---|
2959 | echo "OpenGL vsync $opengl_vsync"
|
---|
2960 | echo "DirectFB $directfb"
|
---|
2961 | if test x"$mingw32" = x"yes" -o x"$targetos" = x"cygwin" ; then
|
---|
2962 | echo "DirectX $directx"
|
---|
2963 | fi
|
---|
2964 | echo
|
---|
2965 | fi
|
---|
2966 |
|
---|
2967 | echo "# Misc Features"
|
---|
2968 | echo "Frontend $frontend"
|
---|
2969 | echo "Backend $backend"
|
---|
2970 | echo
|
---|
2971 |
|
---|
2972 | echo "# Bindings"
|
---|
2973 | printf "%-16.16s %s\n" "bindings_perl" "${bindings_perl}"
|
---|
2974 | echo ""
|
---|
2975 |
|
---|
2976 | MYTH_CONFIG_H=libs/libmyth/mythconfig.h
|
---|
2977 | MYTH_CONFIG_MAK=libs/libmyth/mythconfig.mak
|
---|
2978 | echo "Creating $MYTH_CONFIG_H and $MYTH_CONFIG_MAK"
|
---|
2979 |
|
---|
2980 | date >> config.log
|
---|
2981 | echo " $0 $FFMPEG_CONFIGURATION" >> config.log
|
---|
2982 | echo "# Automatically generated by configure - do not modify" > $MYTH_CONFIG_MAK
|
---|
2983 | echo "/* Automatically generated by configure - do not modify */" > $TMPH
|
---|
2984 | echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
|
---|
2985 |
|
---|
2986 | echo "PREFIX=$PREFIX" >> $MYTH_CONFIG_MAK
|
---|
2987 | echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK
|
---|
2988 | #echo "shlibdir=$shlibdir" >> $MYTH_CONFIG_MAK
|
---|
2989 | #echo "bindir=$bindir" >> $MYTH_CONFIG_MAK
|
---|
2990 | #echo "mandir=$mandir" >> $MYTH_CONFIG_MAK
|
---|
2991 | #echo "MAKE=$make" >> $MYTH_CONFIG_MAK
|
---|
2992 | echo "QMAKE_CC=$cc" >> $MYTH_CONFIG_MAK
|
---|
2993 | echo "QMAKE_CXX=$cxx" >> $MYTH_CONFIG_MAK
|
---|
2994 | echo "QMAKE_LINK=$cxx" >> $MYTH_CONFIG_MAK
|
---|
2995 | #echo "AR=$ar" >> $MYTH_CONFIG_MAK
|
---|
2996 | #echo "RANLIB=$ranlib" >> $MYTH_CONFIG_MAK
|
---|
2997 | #if enabled dostrip; then
|
---|
2998 | # echo "STRIP=$strip" >> config.mak
|
---|
2999 | #else
|
---|
3000 | # echo "STRIP=echo ignoring strip" >> config.mak
|
---|
3001 | #fi
|
---|
3002 |
|
---|
3003 | ## SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building
|
---|
3004 | ## shared modules on OS/X (vhook/Makefile).
|
---|
3005 | #SHCFLAGS=$CFLAGS
|
---|
3006 | #test "$needmdynamicnopic" = yes && add_cflags -mdynamic-no-pic
|
---|
3007 |
|
---|
3008 | echo "ARCHFLAGS=$ARCHFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3009 | echo "PROFILEFLAGS=$PROFILEFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3010 | echo "OPTFLAGS=$OPTFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3011 | echo "ECFLAGS=$CFLAGS $ECFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3012 | echo "ECXXFLAGS=$ECXXFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3013 | #echo "SHCFLAGS=$SHCFLAGS">>$MYTH_CONFIG_MAK
|
---|
3014 | #echo "LDFLAGS=$LDFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3015 | #echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3016 | #echo "SHFLAGS=$SHFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3017 | #echo "VHOOKFLAGS=$VHOOKFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3018 | #echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
|
---|
3019 | #echo "BUILD_STATIC=$static" >> config.mak
|
---|
3020 | #echo "BUILDSUF=$BUILDSUF" >> $MYTH_CONFIG_MAK
|
---|
3021 | #echo "LIBPREF=$LIBPREF" >> $MYTH_CONFIG_MAK
|
---|
3022 | #echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> $MYTH_CONFIG_MAK
|
---|
3023 | #if enabled static; then
|
---|
3024 | # echo "LIB=$LIB" >> config.mak
|
---|
3025 | #else # Some Make complain if this variable does not exist.
|
---|
3026 | # echo "LIB=" >> config.mak
|
---|
3027 | #fi
|
---|
3028 | #echo "SLIBPREF=$SLIBPREF" >> $MYTH_CONFIG_MAK
|
---|
3029 | #echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> $MYTH_CONFIG_MAK
|
---|
3030 | #echo "EXESUF=\${BUILDSUF}$EXESUF" >> $MYTH_CONFIG_MAK
|
---|
3031 |
|
---|
3032 | ucarch=`toupper $arch`
|
---|
3033 | echo "TARGET_ARCH_${ucarch}=yes" >> $MYTH_CONFIG_MAK
|
---|
3034 | echo "#define ARCH_${ucarch} 1" >> $TMPH
|
---|
3035 |
|
---|
3036 | # special cases
|
---|
3037 | case "$arch" in
|
---|
3038 | x86_32|x86_64)
|
---|
3039 | echo "TARGET_ARCH_X86=yes" >> $MYTH_CONFIG_MAK
|
---|
3040 | echo "#define ARCH_X86 1" >> $TMPH
|
---|
3041 | ;;
|
---|
3042 | powerpc)
|
---|
3043 | if test "$POWERPCMODE" = "64bits"; then
|
---|
3044 | echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
|
---|
3045 | fi
|
---|
3046 | ;;
|
---|
3047 | sparc64)
|
---|
3048 | echo "TARGET_ARCH_SPARC=yes" >> $MYTH_CONFIG_MAK
|
---|
3049 | echo "#define ARCH_SPARC 1" >> $TMPH
|
---|
3050 | ;;
|
---|
3051 | esac
|
---|
3052 |
|
---|
3053 | if enabled bigendian; then
|
---|
3054 | echo "WORDS_BIGENDIAN=yes" >> $MYTH_CONFIG_MAK
|
---|
3055 | echo "#define WORDS_BIGENDIAN 1" >> $TMPH
|
---|
3056 | fi
|
---|
3057 | if enabled mmx; then
|
---|
3058 | echo "#define __CPU__ 586" >> $TMPH
|
---|
3059 | fi
|
---|
3060 | if enabled cpuclipspositive; then
|
---|
3061 | echo "#define CPU_CLIPS_POSITIVE 1" >> $TMPH
|
---|
3062 | else
|
---|
3063 | echo "#define CPU_CLIPS_POSITIVE 0" >> $TMPH
|
---|
3064 | fi
|
---|
3065 | if enabled cpuclipsnegative; then
|
---|
3066 | echo "#define CPU_CLIPS_NEGATIVE 1" >> $TMPH
|
---|
3067 | else
|
---|
3068 | echo "#define CPU_CLIPS_NEGATIVE 0" >> $TMPH
|
---|
3069 | fi
|
---|
3070 | if enabled freetype2; then
|
---|
3071 | echo "HAVE_FREETYPE2=yes" >> $MYTH_CONFIG_MAK
|
---|
3072 | echo "FREETYPE_CFLAGS=`freetype-config --cflags`" >> $MYTH_CONFIG_MAK
|
---|
3073 | echo "FREETYPE_LIBS=`freetype-config --libs`" >> $MYTH_CONFIG_MAK
|
---|
3074 | fi
|
---|
3075 | if enabled sdl; then
|
---|
3076 | echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> $MYTH_CONFIG_MAK
|
---|
3077 | echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> $MYTH_CONFIG_MAK
|
---|
3078 | fi
|
---|
3079 | if enabled texi2html; then
|
---|
3080 | echo "BUILD_DOC=yes" >> $MYTH_CONFIG_MAK
|
---|
3081 | fi
|
---|
3082 | echo "#define SIZEOF_INT $_sizeof_int" >> $TMPH
|
---|
3083 | echo "#define SIZEOF_LONG $_sizeof_long" >> $TMPH
|
---|
3084 | if enabled lshared; then
|
---|
3085 | echo "BUILD_SHARED=yes" >> $MYTH_CONFIG_MAK
|
---|
3086 | echo "PIC=-fPIC -DPIC" >> $MYTH_CONFIG_MAK
|
---|
3087 | fi
|
---|
3088 | if enabled libdts; then
|
---|
3089 | echo "CONFIG_DTSLIB=$dtslib" >> $MYTH_CONFIG_MAK
|
---|
3090 | fi
|
---|
3091 | if enabled pthreads; then
|
---|
3092 | if test $targetos != freebsd -a $targetos != openbsd ; then
|
---|
3093 | extralibs="$extralibs -lpthread"
|
---|
3094 | fi
|
---|
3095 | fi
|
---|
3096 | echo "" >>$MYTH_CONFIG_MAK
|
---|
3097 |
|
---|
3098 | if enabled audio_oss; then
|
---|
3099 | CCONFIG="$CCONFIG using_oss"
|
---|
3100 | fi
|
---|
3101 | if enabled audio_alsa; then
|
---|
3102 | CCONFIG="$CCONFIG using_alsa"
|
---|
3103 | echo "CONFIG_AUDIO_ALSA_LIBS=$audio_alsa_libs" >> $MYTH_CONFIG_MAK
|
---|
3104 | fi
|
---|
3105 |
|
---|
3106 | if enabled audio_arts; then
|
---|
3107 | CCONFIG="$CCONFIG using_arts"
|
---|
3108 | echo "CONFIG_AUDIO_ARTS_LIBS=$audio_arts_libs" >> $MYTH_CONFIG_MAK
|
---|
3109 | echo "CONFIG_AUDIO_ARTS_CFLAGS=$audio_arts_cflags" >> $MYTH_CONFIG_MAK
|
---|
3110 | fi
|
---|
3111 |
|
---|
3112 | if enabled audio_jack; then
|
---|
3113 | CCONFIG="$CCONFIG using_jack"
|
---|
3114 | echo "CONFIG_AUDIO_JACK_LIBS=$audio_jack_libs" >> $MYTH_CONFIG_MAK
|
---|
3115 | fi
|
---|
3116 |
|
---|
3117 | if enabled darwin_da; then
|
---|
3118 | CCONFIG="$CCONFIG darwin_da"
|
---|
3119 | fi
|
---|
3120 |
|
---|
3121 | if enabled mac_bundle; then
|
---|
3122 | CCONFIG="$CCONFIG mac_bundle"
|
---|
3123 | fi
|
---|
3124 |
|
---|
3125 | if enabled mac_corevideo; then
|
---|
3126 | CCONFIG="$CCONFIG using_corevideo"
|
---|
3127 | fi
|
---|
3128 |
|
---|
3129 | if test x"$targetos" = x"cygwin" ; then
|
---|
3130 | echo "#define CONFIG_CYGWIN 1" >> $TMPH
|
---|
3131 | echo "#ifndef llrint" >> $TMPH
|
---|
3132 | echo "#define llrint llrint // make sure not to define twice" >> $TMPH
|
---|
3133 | echo "static inline long long int llrint (double x)" >> $TMPH
|
---|
3134 | echo "{" >> $TMPH
|
---|
3135 | echo " long long int llrintres;" >> $TMPH
|
---|
3136 | echo " asm" >> $TMPH
|
---|
3137 | echo " (\"fistpll %0\"" >> $TMPH
|
---|
3138 | echo " : \"=m\" (llrintres) : \"t\" (x) : \"st\");" >> $TMPH
|
---|
3139 | echo " return llrintres;" >> $TMPH
|
---|
3140 | echo "}" >> $TMPH
|
---|
3141 | echo "#endif" >> $TMPH
|
---|
3142 | fi
|
---|
3143 |
|
---|
3144 | print_config HAVE_ $TMPH $MYTH_CONFIG_MAK $HAVE_LIST
|
---|
3145 | print_config CONFIG_ $TMPH $MYTH_CONFIG_MAK $CONFIG_LIST
|
---|
3146 | print_config TARGET_ $TMPH $MYTH_CONFIG_MAK $TARGET_LIST
|
---|
3147 |
|
---|
3148 | print_config CONFIG_ $TMPH $MYTH_CONFIG_MAK $MYTHTV_CONFIG_LIST
|
---|
3149 | print_config CONFIG_ $TMPH $MYTH_CONFIG_MAK $MYTHTV_LIST
|
---|
3150 |
|
---|
3151 | if test "$targetos" = darwin; then
|
---|
3152 | echo "#define CONFIG_DARWIN 1" >> $TMPH
|
---|
3153 | fi
|
---|
3154 |
|
---|
3155 | echo "#define restrict $_restrict" >> $TMPH
|
---|
3156 |
|
---|
3157 | if test "$optimize" = "small"; then
|
---|
3158 | echo "#define always_inline" >> $TMPH
|
---|
3159 | echo "#define CONFIG_SMALL 1" >> $TMPH
|
---|
3160 | fi
|
---|
3161 |
|
---|
3162 | # Apparently it's not possible to portably echo a backslash.
|
---|
3163 | if enabled asmalign_pot; then
|
---|
3164 | printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
|
---|
3165 | else
|
---|
3166 | printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
|
---|
3167 | fi
|
---|
3168 |
|
---|
3169 | for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
|
---|
3170 | ucname="`toupper $part`"
|
---|
3171 | config_name="CONFIG_$ucname"
|
---|
3172 | enabled_name="ENABLE_$ucname"
|
---|
3173 | if enabled $part; then
|
---|
3174 | echo "#define $config_name 1" >> $TMPH
|
---|
3175 | echo "#define $enabled_name 1" >> $TMPH
|
---|
3176 | echo "$config_name=yes" >> $MYTH_CONFIG_MAK
|
---|
3177 | else
|
---|
3178 | echo "#define $enabled_name 0" >> $TMPH
|
---|
3179 | fi
|
---|
3180 | done
|
---|
3181 |
|
---|
3182 | for opt in $MYTHTV_CONFIG_LIST $USING_LIST; do
|
---|
3183 | enabled $opt && CCONFIG="$CCONFIG using_$opt"
|
---|
3184 | done
|
---|
3185 |
|
---|
3186 | # build tree in object directory if source path is different from current one
|
---|
3187 | if enabled source_path_used; then
|
---|
3188 | DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
|
---|
3189 | libavcodec/ppc libavcodec/mlib libavcodec/libpostproc tests vhook"
|
---|
3190 | FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
|
---|
3191 | for dir in $DIRS ; do
|
---|
3192 | mkdir -p $dir
|
---|
3193 | done
|
---|
3194 | for f in $FILES ; do
|
---|
3195 | ln -sf "$source_path/$f" $f
|
---|
3196 | done
|
---|
3197 | fi
|
---|
3198 | echo "SRC_PATH='$source_path'" >> $MYTH_CONFIG_MAK
|
---|
3199 |
|
---|
3200 | if disabled frontend; then
|
---|
3201 | echo
|
---|
3202 | echo "WARNING: --disable-frontend is only intended to aid porting."
|
---|
3203 | echo "WARNING: THIS WILL BREAK THINGS. You are on your own now."
|
---|
3204 | fi
|
---|
3205 |
|
---|
3206 | if disabled backend; then
|
---|
3207 | echo
|
---|
3208 | echo "WARNING: --disable-backend is only intended to aid porting."
|
---|
3209 | echo "WARNING: You are on your own now."
|
---|
3210 | fi
|
---|
3211 |
|
---|
3212 | if enabled proc_opt; then
|
---|
3213 | echo
|
---|
3214 | echo "WARNING: When using --enable-proc-opt you must include the "
|
---|
3215 | echo " output of ./configure along with any bug report."
|
---|
3216 | fi
|
---|
3217 |
|
---|
3218 | if disabled proc_opt && enabled dvb; then
|
---|
3219 | echo
|
---|
3220 | echo "WARNING: If you plan to watch HDTV recordings you probably"
|
---|
3221 | echo " need to run ./configure with --enable-proc-opt "
|
---|
3222 | fi
|
---|
3223 |
|
---|
3224 | echo # add a newline after any warnings.
|
---|
3225 |
|
---|
3226 | if enabled mmx; then
|
---|
3227 | CONFIG_DEFINES="$CONFIG_DEFINES MMX"
|
---|
3228 | if test x"$arch" != x"x86_64" ; then
|
---|
3229 | CONFIG_DEFINES="$CONFIG_DEFINES i386"
|
---|
3230 | fi
|
---|
3231 | fi
|
---|
3232 |
|
---|
3233 | if enabled firewire; then
|
---|
3234 | if test $targetos = darwin; then
|
---|
3235 | echo "CONFIG_MAC_AVC=$mac_avc" >> $MYTH_CONFIG_MAK
|
---|
3236 | else
|
---|
3237 | echo "CONFIG_FIREWIRE_LIBS=-lraw1394 -liec61883 -lavc1394 -lrom1394" >> $MYTH_CONFIG_MAK
|
---|
3238 | if enabled libavc_5_3; then
|
---|
3239 | CCONFIG="$CCONFIG using_libavc_5_3"
|
---|
3240 | fi
|
---|
3241 | fi
|
---|
3242 | fi
|
---|
3243 |
|
---|
3244 | if enabled iptv; then
|
---|
3245 | CCONFIG="$CCONFIG using_live"
|
---|
3246 | fi
|
---|
3247 |
|
---|
3248 | if enabled lirc; then
|
---|
3249 | echo "CONFIG_LIRC_LIBS=-llirc_client" >> $MYTH_CONFIG_MAK
|
---|
3250 | fi
|
---|
3251 |
|
---|
3252 | if enabled appleremote; then
|
---|
3253 | CONFIG_DEFINES="$CONFIG_DEFINES USING_APPLEREMOTE"
|
---|
3254 | fi
|
---|
3255 |
|
---|
3256 | if enabled dvb; then
|
---|
3257 | CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH $dvb_path"
|
---|
3258 | fi
|
---|
3259 |
|
---|
3260 | if enabled x11; then
|
---|
3261 | if [ -d $x11_include_path ] ; then
|
---|
3262 | CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH $x11_include_path"
|
---|
3263 | fi
|
---|
3264 | fi
|
---|
3265 |
|
---|
3266 | if enabled xv; then
|
---|
3267 | echo "CONFIG_XV_LIBS=-lXinerama -lXv -lX11 -lXext -lXxf86vm" >> $MYTH_CONFIG_MAK
|
---|
3268 | fi
|
---|
3269 |
|
---|
3270 | if enabled xrandr; then
|
---|
3271 | echo "CONFIG_XRANDR_LIBS=-lXrandr" >> $MYTH_CONFIG_MAK
|
---|
3272 | fi
|
---|
3273 |
|
---|
3274 | if test x"$VENDOR_XVMC_LIBS" != x"" ; then
|
---|
3275 | echo "CONFIG_XVMC_LIBS=$VENDOR_XVMC_LIBS -lXvMC" >> $MYTH_CONFIG_MAK
|
---|
3276 | if test x"$VENDOR_XVMC_LIBS" = x"-lXvMCNVIDIA" ; then
|
---|
3277 | CCONFIG="$CCONFIG using_xvmc_pbuffer"
|
---|
3278 | fi
|
---|
3279 | fi
|
---|
3280 |
|
---|
3281 | if enabled directfb; then
|
---|
3282 | echo "CONFIG_DIRECTFB_LIBS=$CONFIG_DIRECTFB_LIBS" >> $MYTH_CONFIG_MAK
|
---|
3283 | echo "CONFIG_DIRECTFB_CXXFLAGS=$CONFIG_DIRECTFB_CXXFLAGS" >> $MYTH_CONFIG_MAK
|
---|
3284 | fi
|
---|
3285 |
|
---|
3286 | if enabled directx; then
|
---|
3287 | CONFIG_DEFINES="$CONFIG_DEFINES USING_DIRECTX"
|
---|
3288 | fi
|
---|
3289 |
|
---|
3290 | if enabled opengl; then
|
---|
3291 | echo "CONFIG_OPENGL_LIBS=-lGL -lGLU" >> $MYTH_CONFIG_MAK
|
---|
3292 | fi
|
---|
3293 |
|
---|
3294 | if test x"$CCONFIG" != x"" ; then
|
---|
3295 | echo "CCONFIG=$CCONFIG" >> $MYTH_CONFIG_MAK
|
---|
3296 | echo "#define MYTH_BUILD_CONFIG \"$CCONFIG\"" >>$TMPH
|
---|
3297 | fi
|
---|
3298 |
|
---|
3299 | if test x"$CONFIG_DEFINES" != x"" ; then
|
---|
3300 | echo "CONFIG_DEFINES=$CONFIG_DEFINES" >> $MYTH_CONFIG_MAK
|
---|
3301 | fi
|
---|
3302 |
|
---|
3303 | if test x"$CONFIG_INCLUDEPATH" != x"" ; then
|
---|
3304 | echo "CONFIG_INCLUDEPATH=$CONFIG_INCLUDEPATH" >> $MYTH_CONFIG_MAK
|
---|
3305 | fi
|
---|
3306 |
|
---|
3307 | if test x"$GCC_MAJOR" != x"" ; then
|
---|
3308 | echo "GCC_MAJOR=$GCC_MAJOR" >> $MYTH_CONFIG_MAK
|
---|
3309 | fi
|
---|
3310 |
|
---|
3311 | if test x"$GCC_MINOR" != x"" ; then
|
---|
3312 | echo "GCC_MINOR=$GCC_MINOR" >> $MYTH_CONFIG_MAK
|
---|
3313 | fi
|
---|
3314 |
|
---|
3315 | diff $TMPH $MYTH_CONFIG_H >/dev/null 2>&1
|
---|
3316 | if test $? -ne 0 ; then
|
---|
3317 | mv -f $TMPH $MYTH_CONFIG_H
|
---|
3318 | rm -f config.h
|
---|
3319 | else
|
---|
3320 | echo "$MYTH_CONFIG_H is unchanged"
|
---|
3321 | fi
|
---|
3322 |
|
---|
3323 | if ! test -L config.h ; then
|
---|
3324 | ln -s $MYTH_CONFIG_H config.h
|
---|
3325 | fi
|
---|
3326 |
|
---|
3327 | if [ ! -e config.h ] ; then
|
---|
3328 | ln -s $MYTH_CONFIG_H config.h
|
---|
3329 | fi
|
---|
3330 |
|
---|
3331 | rm -f config.mak
|
---|
3332 | ln -s $MYTH_CONFIG_MAK config.mak
|
---|
3333 |
|
---|
3334 | # Create a special cleanup makefile that will allow make clean to work
|
---|
3335 | if [ ! -e config ] ; then
|
---|
3336 | mkdir config
|
---|
3337 | fi
|
---|
3338 | cat - > config/Makefile <<END
|
---|
3339 |
|
---|
3340 | all:
|
---|
3341 | qmake_all:
|
---|
3342 | \$(NONE)
|
---|
3343 |
|
---|
3344 | clean:
|
---|
3345 | \$(NONE)
|
---|
3346 |
|
---|
3347 | install:
|
---|
3348 | uninstall:
|
---|
3349 | \$(NONE)
|
---|
3350 |
|
---|
3351 | distclean: clean
|
---|
3352 | -rm -f ../$MYTH_CONFIG_MAK ../config.mak
|
---|
3353 | -rm -f ../$MYTH_CONFIG_H ../config.h
|
---|
3354 | -rm -f ../Makefile ../config.err
|
---|
3355 |
|
---|
3356 | END
|
---|
3357 |
|
---|
3358 | rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
|
---|
3359 |
|
---|
3360 | qmake mythtv.pro
|
---|