-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure
executable file
·5713 lines (5126 loc) · 154 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#! /bin/sh
#
# Original version (C) 2000 Pontscho/fresh!mindworkz
#
# History / Contributors: Check the Subversion log.
#
# Cleanups all over the place (c) 2001 pl
#
#
# This configure script is *not* autoconf-based and has different semantics.
# It attempts to autodetect all settings and options where possible. It is
# possible to override autodetection with the --enable-option/--disable-option
# command line parameters. --enable-option forces the option on skipping
# autodetection. Yes, this means that compilation may fail and yes, this is not
# how autoconf-based configure scripts behave.
#
# configure generates a series of configuration files:
# - config.h contains #defines that are used in the C code.
# - config.mak is included from the Makefiles.
#
# If you want to add a new check for $feature, look at the existing checks
# and try to use helper functions where you can.
#
# Furthermore you need to add the variable _feature to the list of default
# settings and set it to one of yes/no/auto. Also add appropriate
# --enable-feature/--disable-feature command line options.
# The results of the check should be written to config.h and config.mak
# at the end of this script. The variable names used for this should be
# uniform, i.e. if the option is named 'feature':
#
# _feature : should have a value of yes/no/auto
# def_feature : '#define ... 1' or '#undef ...' for conditional compilation
# _ld_feature : '-L/path/dir -lfeature' GCC options
#
#############################################################################
# Prevent locale nonsense from breaking basic text processing utils
export LC_ALL=C
# Store the configure line that was used
configuration="$*"
# Prefer these macros to full length text !
# These macros only return an error code - NO display is done
compile_check() {
source="$1"
shift
echo >> "$TMPLOG"
cat "$source" >> "$TMPLOG"
echo >> "$TMPLOG"
echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o $TMPEXE $@" >> "$TMPLOG"
rm -f "$TMPEXE"
$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
TMPRES="$?"
echo >> "$TMPLOG"
echo >> "$TMPLOG"
return "$TMPRES"
}
cc_check() {
compile_check $TMPC $@
}
cflag_check() {
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
compile_check $TMPC $@
}
header_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { return 0; }
EOF
shift
compile_check $TMPC $@
}
return_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { return $2; }
EOF
shift 2
compile_check $TMPC $@
}
statement_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { $2; return 0; }
EOF
shift
shift
compile_check $TMPC $@
}
define_statement_check() {
cat > $TMPC << EOF
#define $1
#include <$2>
int main(void) { $3; return 0; }
EOF
shift 3
compile_check $TMPC $@
}
return_statement_check() {
cat > $TMPC << EOF
#include <$1>
int main(void) { $2; return $3; }
EOF
shift 3
compile_check $TMPC $@
}
inline_asm_check() {
cat > $TMPC << EOF
int main(void) { __asm__ volatile ($1); return 0; }
EOF
shift
compile_check $TMPC $@
}
# The following checks are special and should only be used with broken and
# non-selfsufficient headers that do not include all of their dependencies.
header_check_broken() {
cat > $TMPC << EOF
#include <$1>
#include <$2>
int main(void) { return 0; }
EOF
shift
shift
compile_check $TMPC $@
}
statement_check_broken() {
cat > $TMPC << EOF
#include <$1>
#include <$2>
int main(void) { $3; return 0; }
EOF
shift 3
compile_check $TMPC $@
}
pkg_config_add() {
unset IFS # shell should not be used for programming
echo >> "$TMPLOG"
echo "$_pkg_config --cflags $@" >> "$TMPLOG"
ctmp=$($_pkg_config --cflags "$@" 2>> "$TMPLOG") || return $?
echo >> "$TMPLOG"
echo "$_pkg_config --libs $@" >> "$TMPLOG"
ltmp=$($_pkg_config --libs "$@" 2>> "$TMPLOG") || return $?
echo >> "$TMPLOG"
echo "cflags: $ctmp" >> "$TMPLOG"
echo "libs: $ltmp" >> "$TMPLOG"
echo >> "$TMPLOG"
extra_cflags="$extra_cflags $ctmp"
extra_ldflags="$extra_ldflags $ltmp"
}
tmp_run() {
"$TMPEXE" >> "$TMPLOG" 2>&1
}
# Display error message, flushes tempfile, exit
die () {
echo
echo "Error: $@" >&2
echo >&2
rm -f "$TMPEXE" "$TMPC" "$TMPS"
echo "Check \"$TMPLOG\" if you do not understand why it failed."
exit 1
}
# OS test booleans functions
issystem() {
test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
}
aix() { issystem "AIX"; }
amigaos() { issystem "AmigaOS"; }
beos() { issystem "BEOS"; }
bsdos() { issystem "BSD/OS"; }
cygwin() { issystem "CYGWIN"; }
darwin() { issystem "Darwin"; }
dragonfly() { issystem "DragonFly"; }
freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; }
gnu() { issystem "GNU"; }
hpux() { issystem "HP-UX"; }
linux() { issystem "Linux"; }
mingw32() { issystem "MINGW32"; }
morphos() { issystem "MorphOS"; }
netbsd() { issystem "NetBSD"; }
openbsd() { issystem "OpenBSD"; }
qnx() { issystem "QNX"; }
win32() { cygwin || mingw32; }
# arch test boolean functions
# x86/x86pc is used by QNX
x86_32() {
case "$host_arch" in
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;;
*) return 1 ;;
esac
}
x86_64() {
case "$host_arch" in
x86_64|amd64) return 0 ;;
*) return 1 ;;
esac
}
x86() {
x86_32 || x86_64
}
ppc() {
case "$host_arch" in
ppc|ppc64|powerpc|powerpc64) return 0;;
*) return 1;;
esac
}
alpha() {
case "$host_arch" in
alpha*) return 0;;
*) return 1;;
esac
}
arm() {
case "$host_arch" in
arm*) return 0;;
*) return 1;;
esac
}
# Use this before starting a check
echocheck() {
echo "============ Checking for $@ ============" >> "$TMPLOG"
echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
}
# Use this to echo the results of a check
echores() {
if test "$res_comment" ; then
res_comment="($res_comment)"
fi
echo "Result is: $@ $res_comment" >> "$TMPLOG"
echo "##########################################" >> "$TMPLOG"
echo "" >> "$TMPLOG"
echo "$@ $res_comment"
res_comment=""
}
#############################################################################
# Check how echo works in this /bin/sh
case $(echo -n) in
-n) _echo_n= _echo_c='\c' ;; # SysV echo
*) _echo_n='-n ' _echo_c= ;; # BSD echo
esac
msg_lang_all=''
ls po/*.po >/dev/null 2>&1 && msg_lang_all=$(echo po/*.po | sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
man_lang_all=$(echo DOCS/man/*/mplayer.rst | sed -e "s:DOCS/man/\(..\)/mplayer.rst:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.rst:\1:g")
doc_lang_all=$(echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
show_help(){
cat << EOF
Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
Installation directories:
--prefix=DIR prefix directory for installation [/usr/local]
--bindir=DIR directory for installing binaries [PREFIX/bin]
--mandir=DIR directory for installing man pages [PREFIX/share/man]
--confdir=DIR directory for installing configuration files
[PREFIX/etc/mplayer]
--localedir=DIR directory for locale tree [PREFIX/share/locale]
--libdir=DIR directory for object code libraries [PREFIX/lib]
--codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
Optional features:
--disable-mplayer disable MPlayer compilation [enable]
--enable-termcap use termcap database for key codes [autodetect]
--enable-termios use termios database for key codes [autodetect]
--disable-iconv disable iconv for encoding conversion [autodetect]
--disable-langinfo do not use langinfo [autodetect]
--enable-lirc enable LIRC (remote control) support [autodetect]
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
--enable-joystick enable joystick support [disable]
--enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
--enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
--disable-vm disable X video mode extensions [autodetect]
--disable-xf86keysym disable support for multimedia keys [autodetect]
--enable-radio enable radio interface [disable]
--enable-radio-capture enable radio capture (through PCI/line-in) [disable]
--disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
--disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
--disable-tv disable TV interface (TV/DVB grabbers) [enable]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
--disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
--disable-networking disable networking [enable]
--enable-winsock2_h enable winsock2_h [autodetect]
--enable-smb enable Samba (SMB) input [autodetect]
--enable-libquvi enable libquvi [autodetect]
--enable-lcms2 enable LCMS2 support [autodetect]
--disable-vcd disable VCD support [autodetect]
--disable-bluray disable Blu-ray support [autodetect]
--disable-dvdnav disable libdvdnav [autodetect]
--disable-dvdread disable libdvdread [autodetect]
--disable-dvdread-internal disable internal libdvdread [autodetect]
--disable-libdvdcss-internal disable internal libdvdcss [autodetect]
--disable-cddb disable cddb [autodetect]
--disable-unrarexec disable using of UnRAR executable [enabled]
--disable-enca disable ENCA charset oracle library [autodetect]
--enable-macosx-finder enable Mac OS X Finder invocation parameter
parsing [disabled]
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
--disable-inet6 disable IPv6 support [autodetect]
--disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
--disable-ftp disable FTP support [enabled]
--disable-vstream disable TiVo vstream client support [autodetect]
--disable-pthreads disable Posix threads support [autodetect]
--disable-w32threads disable Win32 threads support [autodetect]
--disable-libass disable subtitle rendering with libass [autodetect]
--enable-rpath enable runtime linker path for extra libs [disabled]
--disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
Codecs:
--enable-gif enable GIF support [autodetect]
--enable-png enable PNG input/output support [autodetect]
--enable-mng enable MNG input support [autodetect]
--enable-jpeg enable JPEG input/output support [autodetect]
--enable-libcdio enable libcdio support [autodetect]
--disable-win32dll disable Win32 DLL support [autodetect]
--disable-qtx disable QuickTime codecs support [enabled]
--disable-xanim disable XAnim codecs support [enabled]
--disable-real disable RealPlayer codecs support [enabled]
--disable-xvid disable Xvid [autodetect]
--disable-libnut disable libnut [autodetect]
--enable-libav skip Libav autodetection [autodetect]
--disable-libvorbis disable libvorbis support [autodetect]
--disable-tremor disable Tremor [autodetect if no libvorbis]
--disable-speex disable Speex support [autodetect]
--enable-theora enable OggTheora libraries [autodetect]
--enable-faad enable FAAD2 (AAC) [autodetect]
--disable-ladspa disable LADSPA plugin support [autodetect]
--disable-libbs2b disable libbs2b audio filter support [autodetect]
--disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
--disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
--disable-mad disable libmad (MPEG audio) support [autodetect]
--enable-xmms enable XMMS input plugin support [disabled]
--enable-libdca enable libdca support [autodetect]
--disable-liba52 disable liba52 [autodetect]
--enable-musepack enable libmpcdec support (deprecated, libavcodec
Musepack decoder is preferred) [disabled]
Video output:
--enable-gl enable OpenGL video output [autodetect]
--enable-sdl enable SDL video output [autodetect]
--enable-caca enable CACA video output [autodetect]
--enable-direct3d enable Direct3D video output [autodetect]
--enable-directx enable DirectX video output [autodetect]
--enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
--enable-dvb enable DVB video input [autodetect]
--enable-xv enable Xv video output [autodetect]
--enable-vdpau enable VDPAU acceleration [autodetect]
--enable-vm enable XF86VidMode support [autodetect]
--enable-xinerama enable Xinerama support [autodetect]
--enable-x11 enable X11 video output [autodetect]
--disable-xss disable screensaver support via xss [autodetect]
--enable-directfb enable DirectFB video output [autodetect]
--disable-tga disable Targa video output [enable]
--disable-pnm disable PNM video output [enable]
--disable-md5sum disable md5sum video output [enable]
--disable-yuv4mpeg disable yuv4mpeg video output [enable]
--disable-corevideo disable CoreVideo video output [autodetect]
--disable-cocoa disable Cocoa OpenGL backend [autodetect]
--disable-sharedbuffer disable OSX shared buffer video output [autodetect]
Audio output:
--disable-alsa disable ALSA audio output [autodetect]
--disable-ossaudio disable OSS audio output [autodetect]
--disable-rsound disable RSound audio output [autodetect]
--disable-pulse disable Pulseaudio audio output [autodetect]
--disable-portaudio disable PortAudio audio output [autodetect]
--disable-jack disable JACK audio output [autodetect]
--enable-openal enable OpenAL audio output [disable]
--disable-coreaudio disable CoreAudio audio output [autodetect]
--disable-select disable using select() on the audio device [enable]
Language options:
--enable-translation enable support for translated output [disable]
--charset=charset convert the console messages to this character set
--language-doc=lang language to use for the documentation [en]
--language-man=lang language to use for the man pages [en]
--language-msg=lang extra languages for program messages [all]
--language=lang default language to use [en]
Specific options override --language. You can pass a list of languages separated
by whitespace or commas instead of a single language. Nonexisting translations
will be dropped from each list. All translations available in the list will be
installed. The value "all" will activate all translations. The LINGUAS
environment variable is honored. In all cases the fallback is English.
The program always supports English-language output; additional message
languages are only installed if --enable-translation is also specified.
Available values for --language-doc are: all $doc_lang_all
Available values for --language-man are: all $man_lang_all
Available values for --language-msg are: all $msg_lang_all
Miscellaneous options:
--enable-runtime-cpudetection enable runtime CPU detection [disable]
--enable-cross-compile enable cross-compilation [disable]
--cc=COMPILER C compiler to build MPlayer [gcc]
--pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
--windres=WINDRES windres to build MPlayer [windres]
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
--enable-static build a statically linked binary
--with-install=PATH path to a custom install program
Advanced options:
--enable-mmx enable MMX [autodetect]
--enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
--enable-3dnow enable 3DNow! [autodetect]
--enable-3dnowext enable extended 3DNow! [autodetect]
--enable-sse enable SSE [autodetect]
--enable-sse2 enable SSE2 [autodetect]
--enable-ssse3 enable SSSE3 [autodetect]
--enable-shm enable shm [autodetect]
--enable-altivec enable AltiVec (PowerPC) [autodetect]
--enable-armv5te enable DSP extensions (ARM) [autodetect]
--enable-armv6 enable ARMv6 (ARM) [autodetect]
--enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
--enable-armvfp enable ARM VFP (ARM) [autodetect]
--enable-neon enable NEON (ARM) [autodetect]
--enable-iwmmxt enable iWMMXt (ARM) [autodetect]
--disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
--enable-big-endian force byte order to big-endian [autodetect]
--enable-debug[=1-3] compile-in debugging information [disable]
--enable-profile compile-in profiling information [disable]
--disable-sighandler disable sighandler for crashes [enable]
--enable-crash-debug enable automatic gdb attach on crash [disable]
Use these options if autodetection fails:
--extra-cflags=FLAGS extra CFLAGS
--extra-ldflags=FLAGS extra LDFLAGS
--extra-libs=FLAGS extra linker flags
--extra-libs-mplayer=FLAGS extra linker flags for MPlayer
--with-sdl-config=PATH path to sdl*-config
This configure script is NOT autoconf-based, even though its output is similar.
It will try to autodetect all configuration options. If you --enable an option
it will be forcefully turned on, skipping autodetection. This can break
compilation, so you need to know what you are doing.
EOF
exit 0
} #show_help()
# GOTCHA: the variables below defines the default behavior for autodetection
# and have - unless stated otherwise - at least 2 states : yes no
# If autodetection is available then the third state is: auto
_mmx=auto
_3dnow=auto
_3dnowext=auto
_mmxext=auto
_sse=auto
_sse2=auto
_ssse3=auto
_cmov=auto
_fast_cmov=auto
_fast_clz=auto
_armv5te=auto
_armv6=auto
_armv6t2=auto
_armvfp=auto
neon=auto
_iwmmxt=auto
_altivec=auto
_install=install
_pkg_config=auto
_windres=auto
_cc=auto
test "$CC" && _cc="$CC"
_as=auto
_runtime_cpudetection=no
_cross_compile=no
_prefix="/usr/local"
ffmpeg=auto
_x11=auto
_xss=auto
_xv=auto
_vdpau=auto
_sdl=auto
_direct3d=auto
_directx=auto
_png=auto
_mng=auto
_jpeg=auto
_pnm=yes
_md5sum=yes
_yuv4mpeg=yes
_gif=auto
_gl=auto
_aa=auto
_caca=auto
_dvb=auto
_v4l2=auto
_iconv=auto
_langinfo=auto
_rtc=auto
_ossaudio=auto
_rsound=auto
_pulse=auto
_portaudio=auto
_jack=auto
_openal=no
_libcdio=auto
_mad=auto
_tremor=auto
_libvorbis=auto
_speex=auto
_theora=auto
_mpg123=auto
_liba52=auto
_libdca=auto
_faad=auto
_ladspa=auto
_libbs2b=auto
_xmms=no
_vcd=auto
_bluray=auto
_dvdnav=auto
_dvdread=auto
_dvdread_internal=auto
_libdvdcss_internal=auto
_xanim=auto
_real=auto
_lcms2=auto
_xinerama=auto
_vm=auto
_xf86keysym=auto
_alsa=auto
_fastmemcpy=yes
_unrar_exec=auto
_win32dll=auto
_select=yes
_radio=no
_radio_capture=no
_radio_v4l2=auto
_radio_bsdbt848=auto
_tv=yes
_tv_v4l2=auto
_tv_bsdbt848=auto
_tv_dshow=auto
_pvr=auto
networking=yes
_winsock2_h=auto
_smb=auto
_libquvi=auto
_joystick=no
_xvid=auto
_libnut=auto
_lirc=auto
_lircc=auto
_apple_remote=auto
_apple_ir=auto
_termcap=auto
_termios=auto
_tga=yes
_directfb=auto
#language=en
_shm=auto
_translation=no
_charset="UTF-8"
_crash_debug=no
_sighandler=yes
_libdv=auto
_cdda=auto
_cddb=auto
_big_endian=auto
_qtx=auto
_coreaudio=auto
_corevideo=auto
_cocoa=auto
_sharedbuffer=auto
quicktime=auto
_macosx_finder=no
_macosx_bundle=auto
_enca=auto
_inet6=auto
_gethostbyname2=auto
_ftp=auto
_musepack=no
_vstream=auto
_pthreads=auto
_w32threads=auto
_ass=auto
_rpath=no
libpostproc=auto
_asmalign_pot=auto
_stream_cache=yes
_priority=no
def_dos_paths="#define HAVE_DOS_PATHS 0"
def_stream_cache="#define CONFIG_STREAM_CACHE 1"
def_priority="#undef CONFIG_PRIORITY"
def_pthread_cache="#undef PTHREAD_CACHE"
need_shmem=yes
for ac_option do
case "$ac_option" in
--help|-help|-h)
show_help
;;
--prefix=*)
_prefix=$(echo $ac_option | cut -d '=' -f 2)
;;
--bindir=*)
_bindir=$(echo $ac_option | cut -d '=' -f 2)
;;
--mandir=*)
_mandir=$(echo $ac_option | cut -d '=' -f 2)
;;
--confdir=*)
_confdir=$(echo $ac_option | cut -d '=' -f 2)
;;
--libdir=*)
_libdir=$(echo $ac_option | cut -d '=' -f 2)
;;
--codecsdir=*)
_codecsdir=$(echo $ac_option | cut -d '=' -f 2)
;;
--localedir=*)
_localedir=$(echo $ac_option | cut -d '=' -f 2)
;;
--with-install=*)
_install=$(echo $ac_option | cut -d '=' -f 2 )
;;
--with-sdl-config=*)
_sdlconfig=$(echo $ac_option | cut -d '=' -f 2)
;;
--extra-cflags=*)
extra_cflags="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
;;
--extra-ldflags=*)
extra_ldflags="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
;;
--extra-libs=*)
extra_libs=$(echo $ac_option | cut -d '=' -f 2)
;;
--extra-libs-mplayer=*)
libs_mplayer=$(echo $ac_option | cut -d '=' -f 2)
;;
--target=*)
_target=$(echo $ac_option | cut -d '=' -f 2)
;;
--cc=*)
_cc=$(echo $ac_option | cut -d '=' -f 2)
;;
--pkg-config=*)
_pkg_config=$(echo $ac_option | cut -d '=' -f 2)
;;
--windres=*)
_windres=$(echo $ac_option | cut -d '=' -f 2)
;;
--charset=*)
_charset=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-doc=*)
language_doc=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-man=*)
language_man=$(echo $ac_option | cut -d '=' -f 2)
;;
--language-msg=*)
language_msg=$(echo $ac_option | cut -d '=' -f 2)
;;
--language=*)
language=$(echo $ac_option | cut -d '=' -f 2)
;;
--enable-static)
_ld_static='-static'
;;
--disable-static)
_ld_static=''
;;
--enable-profile)
_profile='-p'
;;
--disable-profile)
_profile=
;;
--enable-debug)
_debug='-g'
;;
--enable-debug=*)
_debug=$(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2)
;;
--disable-debug)
_debug=
;;
--enable-translation) _translation=yes ;;
--disable-translation) _translation=no ;;
--enable-runtime-cpudetection) _runtime_cpudetection=yes ;;
--disable-runtime-cpudetection) _runtime_cpudetection=no ;;
--enable-cross-compile) _cross_compile=yes ;;
--disable-cross-compile) _cross_compile=no ;;
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xss) _xss=yes ;;
--disable-xss) _xss=no ;;
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
--enable-vdpau) _vdpau=yes ;;
--disable-vdpau) _vdpau=no ;;
--enable-sdl) _sdl=yes ;;
--disable-sdl) _sdl=no ;;
--enable-direct3d) _direct3d=yes ;;
--disable-direct3d) _direct3d=no ;;
--enable-directx) _directx=yes ;;
--disable-directx) _directx=no ;;
--enable-png) _png=yes ;;
--disable-png) _png=no ;;
--enable-mng) _mng=yes ;;
--disable-mng) _mng=no ;;
--enable-jpeg) _jpeg=yes ;;
--disable-jpeg) _jpeg=no ;;
--enable-pnm) _pnm=yes ;;
--disable-pnm) _pnm=no ;;
--enable-md5sum) _md5sum=yes ;;
--disable-md5sum) _md5sum=no ;;
--enable-yuv4mpeg) _yuv4mpeg=yes ;;
--disable-yuv4mpeg) _yuv4mpeg=no ;;
--enable-gif) _gif=yes ;;
--disable-gif) _gif=no ;;
--enable-gl) _gl=yes ;;
--disable-gl) _gl=no ;;
--enable-caca) _caca=yes ;;
--disable-caca) _caca=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-v4l2) _v4l2=yes ;;
--disable-v4l2) _v4l2=no ;;
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
--enable-langinfo) _langinfo=yes ;;
--disable-langinfo) _langinfo=no ;;
--enable-rtc) _rtc=yes ;;
--disable-rtc) _rtc=no ;;
--enable-libdv) _libdv=yes ;;
--disable-libdv) _libdv=no ;;
--enable-ossaudio) _ossaudio=yes ;;
--disable-ossaudio) _ossaudio=no ;;
--enable-rsound) _rsound=yes ;;
--disable-rsound) _rsound=no ;;
--enable-pulse) _pulse=yes ;;
--disable-pulse) _pulse=no ;;
--enable-portaudio) _portaudio=yes ;;
--disable-portaudio) _portaudio=no ;;
--enable-jack) _jack=yes ;;
--disable-jack) _jack=no ;;
--enable-openal) _openal=yes ;;
--disable-openal) _openal=no ;;
--enable-mad) _mad=yes ;;
--disable-mad) _mad=no ;;
--enable-libcdio) _libcdio=yes ;;
--disable-libcdio) _libcdio=no ;;
--enable-libvorbis) _libvorbis=yes ;;
--disable-libvorbis) _libvorbis=no ;;
--enable-speex) _speex=yes ;;
--disable-speex) _speex=no ;;
--enable-tremor) _tremor=yes ;;
--disable-tremor) _tremor=no ;;
--enable-theora) _theora=yes ;;
--disable-theora) _theora=no ;;
--enable-mpg123) _mpg123=yes ;;
--disable-mpg123) _mpg123=no ;;
--enable-liba52) _liba52=yes ;;
--disable-liba52) _liba52=no ;;
--enable-libdca) _libdca=yes ;;
--disable-libdca) _libdca=no ;;
--enable-musepack) _musepack=yes ;;
--disable-musepack) _musepack=no ;;
--enable-faad) _faad=yes ;;
--disable-faad) _faad=no ;;
--enable-ladspa) _ladspa=yes ;;
--disable-ladspa) _ladspa=no ;;
--enable-libbs2b) _libbs2b=yes ;;
--disable-libbs2b) _libbs2b=no ;;
--enable-xmms) _xmms=yes ;;
--disable-xmms) _xmms=no ;;
--enable-vcd) _vcd=yes ;;
--disable-vcd) _vcd=no ;;
--enable-bluray) _bluray=yes ;;
--disable-bluray) _bluray=no ;;
--enable-dvdread) _dvdread=yes ;;
--disable-dvdread) _dvdread=no ;;
--enable-dvdread-internal) _dvdread_internal=yes ;;
--disable-dvdread-internal) _dvdread_internal=no ;;
--enable-libdvdcss-internal) _libdvdcss_internal=yes ;;
--disable-libdvdcss-internal) _libdvdcss_internal=no ;;
--enable-dvdnav) _dvdnav=yes ;;
--disable-dvdnav) _dvdnav=no ;;
--enable-xanim) _xanim=yes ;;
--disable-xanim) _xanim=no ;;
--enable-real) _real=yes ;;
--disable-real) _real=no ;;
--enable-lcms2) _lcms2=yes ;;
--disable-lcms2) _lcms2=no ;;
--enable-xinerama) _xinerama=yes ;;
--disable-xinerama) _xinerama=no ;;
--enable-vm) _vm=yes ;;
--disable-vm) _vm=no ;;
--enable-xf86keysym) _xf86keysym=yes ;;
--disable-xf86keysym) _xf86keysym=no ;;
--enable-alsa) _alsa=yes ;;
--disable-alsa) _alsa=no ;;
--enable-tv) _tv=yes ;;
--disable-tv) _tv=no ;;
--enable-tv-bsdbt848) _tv_bsdbt848=yes ;;
--disable-tv-bsdbt848) _tv_bsdbt848=no ;;
--enable-tv-v4l2) _tv_v4l2=yes ;;
--disable-tv-v4l2) _tv_v4l2=no ;;
--enable-tv-dshow) _tv_dshow=yes ;;
--disable-tv-dshow) _tv_dshow=no ;;
--enable-radio) _radio=yes ;;
--enable-radio-capture) _radio_capture=yes ;;
--disable-radio-capture) _radio_capture=no ;;
--disable-radio) _radio=no ;;
--enable-radio-v4l2) _radio_v4l2=yes ;;
--disable-radio-v4l2) _radio_v4l2=no ;;
--enable-radio-bsdbt848) _radio_bsdbt848=yes ;;
--disable-radio-bsdbt848) _radio_bsdbt848=no ;;
--enable-pvr) _pvr=yes ;;
--disable-pvr) _pvr=no ;;
--enable-fastmemcpy) _fastmemcpy=yes ;;
--disable-fastmemcpy) _fastmemcpy=no ;;
--enable-networking) networking=yes ;;
--disable-networking) networking=no ;;
--enable-winsock2_h) _winsock2_h=yes ;;
--disable-winsock2_h) _winsock2_h=no ;;
--enable-smb) _smb=yes ;;
--disable-smb) _smb=no ;;
--enable-libquvi) _libquvi=yes ;;
--disable-libquvi) _libquvi=no ;;
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
--enable-xvid) _xvid=yes ;;
--disable-xvid) _xvid=no ;;
--enable-libnut) _libnut=yes ;;
--disable-libnut) _libnut=no ;;
--enable-libav) ffmpeg=yes ;;
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
--enable-apple-remote) _apple_remote=yes ;;
--disable-apple-remote) _apple_remote=no ;;
--enable-apple-ir) _apple_ir=yes ;;
--disable-apple-ir) _apple_ir=no ;;
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
--enable-termios) _termios=yes ;;
--disable-termios) _termios=no ;;
--disable-tga) _tga=no ;;
--enable-tga) _tga=yes ;;
--enable-directfb) _directfb=yes ;;
--disable-directfb) _directfb=no ;;
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
--enable-cddb) _cddb=yes ;;
--disable-cddb) _cddb=no ;;
--enable-big-endian) _big_endian=yes ;;
--disable-big-endian) _big_endian=no ;;
--enable-unrarexec) _unrar_exec=yes ;;
--disable-unrarexec) _unrar_exec=no ;;
--enable-ftp) _ftp=yes ;;
--disable-ftp) _ftp=no ;;
--enable-vstream) _vstream=yes ;;
--disable-vstream) _vstream=no ;;
--enable-pthreads) _pthreads=yes ;;
--disable-pthreads) _pthreads=no ;;
--enable-w32threads) _w32threads=yes ;;
--disable-w32threads) _w32threads=no ;;
--enable-libass) _ass=yes ;;
--disable-libass) _ass=no ;;
--enable-rpath) _rpath=yes ;;
--disable-rpath) _rpath=no ;;
--enable-libpostproc) libpostproc=yes ;;
--disable-libpostproc) libpostproc=no ;;
--enable-enca) _enca=yes ;;
--disable-enca) _enca=no ;;
--enable-inet6) _inet6=yes ;;
--disable-inet6) _inet6=no ;;
--enable-gethostbyname2) _gethostbyname2=yes ;;
--disable-gethostbyname2) _gethostbyname2=no ;;
--enable-qtx) _qtx=yes ;;
--disable-qtx) _qtx=no ;;
--enable-coreaudio) _coreaudio=yes ;;
--disable-coreaudio) _coreaudio=no ;;
--enable-corevideo) _corevideo=yes ;;
--disable-corevideo) _corevideo=no ;;
--enable-cocoa) _cocoa=yes ;;
--disable-cocoa) _cocoa=no ;;
--enable-sharedbuffer) _sharedbuffer=yes ;;
--disable-sharedbuffer) _sharedbuffer=no ;;
--enable-macosx-finder) _macosx_finder=yes ;;
--disable-macosx-finder) _macosx_finder=no ;;
--enable-macosx-bundle) _macosx_bundle=yes ;;
--disable-macosx-bundle) _macosx_bundle=no ;;
--enable-crash-debug) _crash_debug=yes ;;
--disable-crash-debug) _crash_debug=no ;;
--enable-sighandler) _sighandler=yes ;;
--disable-sighandler) _sighandler=no ;;
--enable-win32dll) _win32dll=yes ;;
--disable-win32dll) _win32dll=no ;;
--enable-sse) _sse=yes ;;
--disable-sse) _sse=no ;;
--enable-sse2) _sse2=yes ;;
--disable-sse2) _sse2=no ;;
--enable-ssse3) _ssse3=yes ;;
--disable-ssse3) _ssse3=no ;;
--enable-mmxext) _mmxext=yes ;;
--disable-mmxext) _mmxext=no ;;
--enable-3dnow) _3dnow=yes ;;
--disable-3dnow) _3dnow=no _3dnowext=no ;;
--enable-3dnowext) _3dnow=yes _3dnowext=yes ;;
--disable-3dnowext) _3dnowext=no ;;
--enable-cmov) _cmov=yes ;;
--disable-cmov) _cmov=no ;;
--enable-fast-cmov) _fast_cmov=yes ;;
--disable-fast-cmov) _fast_cmov=no ;;
--enable-fast-clz) _fast_clz=yes ;;
--disable-fast-clz) _fast_clz=no ;;
--enable-altivec) _altivec=yes ;;
--disable-altivec) _altivec=no ;;
--enable-armv5te) _armv5te=yes ;;
--disable-armv5te) _armv5te=no ;;
--enable-armv6) _armv6=yes ;;
--disable-armv6) _armv6=no ;;
--enable-armv6t2) _armv6t2=yes ;;
--disable-armv6t2) _armv6t2=no ;;
--enable-armvfp) _armvfp=yes ;;
--disable-armvfp) _armvfp=no ;;
--enable-neon) neon=yes ;;
--disable-neon) neon=no ;;
--enable-iwmmxt) _iwmmxt=yes ;;
--disable-iwmmxt) _iwmmxt=no ;;
--enable-mmx) _mmx=yes ;;
--disable-mmx) # 3Dnow! and MMX2 require MMX
_3dnow=no _3dnowext=no _mmx=no _mmxext=no ;;
*)
echo "Unknown parameter: $ac_option" >&2
exit 1
;;
esac
done
# Atmos: moved this here, to be correct, if --prefix is specified
test -z "$_bindir" && _bindir="$_prefix/bin"
test -z "$_mandir" && _mandir="$_prefix/share/man"
test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
test -z "$_libdir" && _libdir="$_prefix/lib"
test -z "$_localedir" && _localedir="$_prefix/share/locale"
for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
test "$tmpdir" && break
done
mplayer_tmpdir="$tmpdir/mplayer-configure-$RANDOM-$$"
mkdir $mplayer_tmpdir || die "Unable to create tmpdir."
TMPLOG="config.log"