~ubuntu-branches/ubuntu/utopic/ffmpeg-debian/utopic

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
  echo "  --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]"
69
69
  echo "  --incdir=DIR             install includes in DIR [PREFIX/include]"
70
70
  echo "  --mandir=DIR             install man page in DIR [PREFIX/share/man]"
71
 
  echo "  --enable-static          build static libraries [default=yes]"
72
 
  echo "  --disable-static         do not build static libraries [default=no]"
73
 
  echo "  --enable-shared          build shared libraries [default=no]"
74
 
  echo "  --disable-shared         do not build shared libraries [default=yes]"
75
 
  echo "  --enable-gpl             allow use of GPL code, the resulting libav*"
76
 
  echo "                           and ffmpeg will be under GPL [default=no]"
77
 
  echo "  --enable-nonfree         allow use of nonfree code, the resulting libav*"
78
 
  echo "                           and ffmpeg will be unredistributable [default=no]"
79
 
  echo "  --enable-postproc        enable GPLed postprocessing support [default=no]"
80
 
  echo "  --enable-swscale         software scaler support [default=no]"
81
 
  echo "  --enable-avfilter        video filter support (replaces vhook) [default=no]"
82
 
  echo "  --enable-avfilter-lavf   video filters dependant on avformat [default=no]"
83
 
  echo "  --enable-beosthreads     use BeOS threads [default=no]"
84
 
  echo "  --enable-os2threads      use OS/2 threads [default=no]"
85
 
  echo "  --enable-pthreads        use pthreads [default=no]"
86
 
  echo "  --enable-w32threads      use Win32 threads [default=no]"
87
 
  echo "  --enable-x11grab         enable X11 grabbing [default=no]"
 
71
  echo "  --enable-static          build static libraries [yes]"
 
72
  echo "  --disable-static         do not build static libraries [no]"
 
73
  echo "  --enable-shared          build shared libraries [no]"
 
74
  echo "  --disable-shared         do not build shared libraries [yes]"
 
75
  echo "  --enable-gpl             allow use of GPL code, the resulting libs"
 
76
  echo "                           and binaries will be under GPL [no]"
 
77
  echo "  --enable-nonfree         allow use of nonfree code, the resulting libs"
 
78
  echo "                           and binaries will be unredistributable [no]"
 
79
  echo "  --enable-postproc        enable GPLed postprocessing support [no]"
 
80
  echo "  --enable-swscale         enable GPLed software scaler support [no]"
 
81
  echo "  --enable-avfilter        video filter support (replaces vhook) [no]"
 
82
  echo "  --enable-avfilter-lavf   video filters dependent on avformat [no]"
 
83
  echo "  --disable-vhook          disable video hooking support"
 
84
  echo "  --enable-beosthreads     use BeOS threads [no]"
 
85
  echo "  --enable-os2threads      use OS/2 threads [no]"
 
86
  echo "  --enable-pthreads        use pthreads [no]"
 
87
  echo "  --enable-vdpau           enable VDPAU support [no]"
 
88
  echo "  --enable-w32threads      use Win32 threads [no]"
 
89
  echo "  --enable-x11grab         enable X11 grabbing [no]"
 
90
  echo "  --enable-xvmc            enable XvMC support [no]"
88
91
  echo
89
92
  echo "External library support:"
90
 
  echo "  --enable-mlib            use Sun medialib [default=no]"
91
 
  echo "  --enable-avisynth        allow reading AVISynth script files [default=no]"
92
 
  echo "  --enable-libamr-nb       enable libamr-nb floating point audio codec"
93
 
  echo "  --enable-libamr-wb       enable libamr-wb floating point audio codec"
 
93
  echo "  --enable-mlib            enable Sun medialib [no]"
 
94
  echo "  --enable-avisynth        enable reading of AVISynth script files [no]"
 
95
  echo "  --enable-bzlib           enable bzlib [autodetect]"
 
96
  echo "  --enable-libamr-nb       enable libamr-nb floating point audio codec [no]"
 
97
  echo "  --enable-libamr-wb       enable libamr-wb floating point audio codec [no]"
94
98
  echo "  --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394"
95
 
  echo "                           and libraw1394 [default=no]"
96
 
  echo "  --enable-libdirac        enable Dirac support via libdirac [default=no]"
97
 
  echo "  --enable-libfaac         enable FAAC support via libfaac [default=no]"
98
 
  echo "  --enable-libfaad         enable FAAD support via libfaad [default=no]"
99
 
  echo "  --enable-libfaadbin      open libfaad.so.0 at runtime [default=no]"
100
 
  echo "  --enable-libgsm          enable GSM support via libgsm [default=no]"
101
 
  echo "  --enable-libmp3lame      enable MP3 encoding via libmp3lame [default=no]"
 
99
  echo "                           and libraw1394 [no]"
 
100
  echo "  --enable-libdirac        enable Dirac support via libdirac [no]"
 
101
  echo "  --enable-libfaac         enable FAAC support via libfaac [no]"
 
102
  echo "  --enable-libfaad         enable FAAD support via libfaad [no]"
 
103
  echo "  --enable-libfaadbin      open libfaad.so.0 at runtime [no]"
 
104
  echo "  --enable-libgsm          enable GSM support via libgsm [no]"
 
105
  echo "  --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]"
102
106
  echo "  --enable-libnut          enable NUT (de)muxing via libnut,"
103
 
  echo "                           native demuxer exists [default=no]"
104
 
  echo "  --enable-libschroedinger enable Dirac support via libschroedinger [default=no]"
105
 
  echo "  --enable-libspeex        enable Speex decoding via libspeex [default=no]"
106
 
  echo "  --enable-libtheora       enable Theora encoding via libtheora [default=no]"
 
107
  echo "                           native (de)muxer exists [no]"
 
108
  echo "  --enable-libschroedinger enable Dirac support via libschroedinger [no]"
 
109
  echo "  --enable-libspeex        enable Speex decoding via libspeex [no]"
 
110
  echo "  --enable-libtheora       enable Theora encoding via libtheora [no]"
107
111
  echo "  --enable-libvorbis       enable Vorbis encoding via libvorbis,"
108
 
  echo "                           native implementation exists [default=no]"
109
 
  echo "  --enable-libx264         enable H.264 encoding via x264 [default=no]"
 
112
  echo "                           native implementation exists [no]"
 
113
  echo "  --enable-libx264         enable H.264 encoding via x264 [no]"
110
114
  echo "  --enable-libxvid         enable Xvid encoding via xvidcore,"
111
 
  echo "                           native MPEG-4/Xvid encoder exists [default=no]"
 
115
  echo "                           native MPEG-4/Xvid encoder exists [no]"
 
116
  echo "  --enable-zlib            enable zlib [autodetect]"
112
117
  echo ""
113
118
  echo "Advanced options (experts only):"
114
119
  echo "  --source-path=PATH       path to source code [$source_path]"
115
120
  echo "  --cross-prefix=PREFIX    use PREFIX for compilation tools [$cross_prefix]"
116
121
  echo "  --enable-cross-compile   assume a cross-compiler is used"
117
122
  echo "  --target-os=OS           compiler targets OS [$target_os]"
 
123
  echo "  --target-exec=CMD        command to run executables on target"
 
124
  echo "  --target-path=DIR        path to view of build directory on target"
 
125
  echo "  --nm=NM                  use nm tool"
118
126
  echo "  --cc=CC                  use C compiler CC [$cc]"
 
127
  echo "  --host-cc=HOSTCC         use host C compiler HOSTCC"
 
128
  echo "  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host"
 
129
  echo "  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host"
 
130
  echo "  --host-libs=HLIBS        use libs HLIBS when linking for host"
119
131
  echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
120
132
  echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
121
133
  echo "  --extra-libs=ELIBS       add ELIBS [$ELIBS]"
122
134
  echo "  --extra-version=STRING   version string suffix []"
123
 
  echo "  --build-suffix=SUFFIX    suffix for application specific build []"
124
 
  echo "  --arch=ARCH              select architecture  [$arch]"
125
 
  echo "  --cpu=CPU                selects the minimum cpu required (affects"
 
135
  echo "  --build-suffix=SUFFIX    library name suffix []"
 
136
  echo "  --arch=ARCH              select architecture [$arch]"
 
137
  echo "  --cpu=CPU                select the minimum required CPU (affects"
126
138
  echo "                           instruction selection, may crash on older CPUs)"
127
139
  echo "  --enable-powerpc-perf    enable performance report on PPC"
128
140
  echo "                           (requires enabling PMC)"
129
 
  echo "  --disable-mmx            disable MMX usage"
130
 
  echo "  --disable-mmx2           disable MMX2 usage"
131
 
  echo "  --disable-ssse3          disable SSSE3 usage"
132
 
  echo "  --disable-armv5te        disable armv5te usage"
133
 
  echo "  --disable-armv6          disable armv6 usage"
134
 
  echo "  --disable-armvfp         disable ARM VFP usage"
135
 
  echo "  --disable-iwmmxt         disable iwmmxt usage"
136
 
  echo "  --disable-altivec        disable AltiVec usage"
137
 
  echo "  --disable-network        disable network support [default=no]"
138
 
  echo "  --disable-ipv6           disable ipv6 support [default=no]"
139
 
  echo "  --disable-zlib           disable zlib [default=no]"
140
 
  echo "  --disable-bzlib          disable bzlib [default=no]"
141
 
  echo "  --disable-vhook          disable video hooking support"
 
141
  echo "  --disable-altivec        disable AltiVec optimizations"
 
142
  echo "  --disable-mmx            disable MMX optimizations"
 
143
  echo "  --disable-mmx2           disable MMX2 optimizations"
 
144
  echo "  --disable-sse            disable SSE optimizations"
 
145
  echo "  --disable-ssse3          disable SSSE3 optimizations"
 
146
  echo "  --disable-armv5te        disable armv5te optimizations"
 
147
  echo "  --disable-armv6          disable armv6 optimizations"
 
148
  echo "  --disable-armv6t2        disable armv6t2 optimizations"
 
149
  echo "  --disable-armvfp         disable ARM VFP optimizations"
 
150
  echo "  --disable-iwmmxt         disable iwmmxt optimizations"
 
151
  echo "  --disable-mmi            disable MMI optimizations"
 
152
  echo "  --disable-neon           disable neon optimizations"
 
153
  echo "  --disable-vis            disable VIS optimizations"
 
154
  echo "  --disable-network        disable network support [no]"
 
155
  echo "  --disable-ipv6           disable IPv6 support [no]"
142
156
  echo "  --disable-mpegaudio-hp   faster (but less accurate)"
143
 
  echo "                           MPEG audio decoding [default=no]"
 
157
  echo "                           MPEG audio decoding [no]"
 
158
  echo "  --disable-aandct         disable AAN DCT code"
 
159
  echo "  --disable-fft            disable FFT code"
 
160
  echo "  --disable-golomb         disable Golomb code"
 
161
  echo "  --disable-mdct           disable MDCT code"
144
162
  echo "  --enable-gray            enable full grayscale support (slower color)"
145
163
  echo "  --disable-ffmpeg         disable ffmpeg build"
 
164
  echo "  --disable-ffplay         disable ffplay build"
146
165
  echo "  --disable-ffserver       disable ffserver build"
147
 
  echo "  --disable-ffplay         disable ffplay build"
148
166
  echo "  --enable-small           optimize for size instead of speed"
149
167
  echo "  --enable-hardcoded-tables use hardcoded tables instead of runtime generation"
150
168
  echo "  --enable-memalign-hack   emulate memalign, interferes with memory debuggers"
151
 
  echo "  --disable-encoder=NAME   disables encoder NAME"
152
 
  echo "  --enable-encoder=NAME    enables encoder NAME"
153
 
  echo "  --disable-decoder=NAME   disables decoder NAME"
154
 
  echo "  --enable-decoder=NAME    enables decoder NAME"
155
 
  echo "  --disable-encoders       disables all encoders"
156
 
  echo "  --disable-decoders       disables all decoders"
157
 
  echo "  --disable-muxer=NAME     disables muxer NAME"
158
 
  echo "  --enable-muxer=NAME      enables muxer NAME"
159
 
  echo "  --disable-muxers         disables all muxers"
160
 
  echo "  --disable-demuxer=NAME   disables demuxer NAME"
161
 
  echo "  --enable-demuxer=NAME    enables demuxer NAME"
162
 
  echo "  --disable-demuxers       disables all demuxers"
163
 
  echo "  --enable-parser=NAME     enables parser NAME"
164
 
  echo "  --disable-parser=NAME    disables parser NAME"
165
 
  echo "  --disable-parsers        disables all parsers"
166
 
  echo "  --enable-bsf=NAME        enables bitstream filter NAME"
167
 
  echo "  --disable-bsf=NAME       disables bitstream filter NAME"
168
 
  echo "  --disable-bsfs           disables all bitstream filters"
169
 
  echo "  --enable-protocol=NAME   enables protocol NAME"
170
 
  echo "  --disable-protocol=NAME  disables protocol NAME"
171
 
  echo "  --disable-protocols      disables all protocols"
172
 
  echo "  --disable-devices        disables all devices"
173
 
  echo "  --enable-filter=NAME     enables filter NAME"
174
 
  echo "  --disable-filter=NAME    disables filter NAME"
175
 
  echo "  --disable-filters        disables all filters"
 
169
  echo "  --enable-beos-netserver  enable BeOS netserver"
 
170
  echo "  --disable-encoder=NAME   disable encoder NAME"
 
171
  echo "  --enable-encoder=NAME    enable encoder NAME"
 
172
  echo "  --disable-encoders       disable all encoders"
 
173
  echo "  --disable-decoder=NAME   disable decoder NAME"
 
174
  echo "  --enable-decoder=NAME    enable decoder NAME"
 
175
  echo "  --disable-decoders       disable all decoders"
 
176
  echo "  --disable-muxer=NAME     disable muxer NAME"
 
177
  echo "  --enable-muxer=NAME      enable muxer NAME"
 
178
  echo "  --disable-muxers         disable all muxers"
 
179
  echo "  --disable-demuxer=NAME   disable demuxer NAME"
 
180
  echo "  --enable-demuxer=NAME    enable demuxer NAME"
 
181
  echo "  --disable-demuxers       disable all demuxers"
 
182
  echo "  --enable-parser=NAME     enable parser NAME"
 
183
  echo "  --disable-parser=NAME    disable parser NAME"
 
184
  echo "  --disable-parsers        disable all parsers"
 
185
  echo "  --enable-bsf=NAME        enable bitstream filter NAME"
 
186
  echo "  --disable-bsf=NAME       disable bitstream filter NAME"
 
187
  echo "  --disable-bsfs           disable all bitstream filters"
 
188
  echo "  --enable-protocol=NAME   enable protocol NAME"
 
189
  echo "  --disable-protocol=NAME  disable protocol NAME"
 
190
  echo "  --disable-protocols      disable all protocols"
 
191
  echo "  --disable-indevs         disable input devices"
 
192
  echo "  --disable-outdevs        disable output devices"
 
193
  echo "  --disable-devices        disable all devices"
 
194
  echo "  --enable-filter=NAME     enable filter NAME"
 
195
  echo "  --disable-filter=NAME    disable filter NAME"
 
196
  echo "  --disable-filters        disable all filters"
176
197
  echo "  --list-decoders          show all available decoders"
177
198
  echo "  --list-encoders          show all available encoders"
178
199
  echo "  --list-muxers            show all available muxers"
353
374
 
354
375
set_default(){
355
376
    for opt; do
356
 
        eval test -z "\$$opt" && eval $opt=\$${opt}_default
 
377
        eval : \${$opt:=\$${opt}_default}
357
378
    done
358
379
}
359
380
 
406
427
        ucname="`toupper $cfg`"
407
428
        if enabled $cfg; then
408
429
            echo "#define ${pfx}${ucname} 1" >> $header
409
 
            echo "#define ENABLE_${ucname} 1" >> $header
410
430
            echo "${pfx}${ucname}=yes" >> $makefile
411
431
        else
412
 
            echo "#define ENABLE_${ucname} 0" >> $header
 
432
            echo "#define ${pfx}${ucname} 0" >> $header
413
433
        fi
414
434
    done
415
435
}
494
514
    asm="$2"
495
515
    shift 2
496
516
    check_cc "$@" <<EOF && enable $name || disable $name
497
 
int foo(void){ __asm__ volatile($asm); }
 
517
void foo(void){ __asm__ volatile($asm); }
498
518
EOF
499
519
}
500
520
 
714
734
 
715
735
CONFIG_LIST="
716
736
    $COMPONENT_LIST
 
737
    aandct
717
738
    avfilter
718
739
    avfilter_lavf
719
740
    avisynth
720
741
    beos_netserver
721
742
    bzlib
 
743
    fastdiv
722
744
    ffmpeg
723
745
    ffplay
724
746
    ffserver
753
775
    nonfree
754
776
    postproc
755
777
    powerpc_perf
 
778
    shared
756
779
    small
 
780
    static
757
781
    swscale
 
782
    vdpau
758
783
    vhook
759
784
    x11grab
 
785
    xvmc
760
786
    zlib
761
787
"
762
788
 
769
795
 
770
796
ARCH_LIST='
771
797
    alpha
772
 
    armv4l
 
798
    arm
773
799
    bfin
774
800
    ia64
775
801
    m68k
776
802
    mips
777
803
    parisc
778
 
    powerpc
 
804
    ppc
779
805
    s390
780
806
    sh4
781
807
    sparc
789
815
    altivec
790
816
    armv5te
791
817
    armv6
 
818
    armv6t2
792
819
    armvfp
793
820
    iwmmxt
794
821
    mmi
795
822
    mmx
796
823
    mmx2
797
824
    neon
 
825
    sse
798
826
    ssse3
799
827
    vis
800
828
'
841
869
    memalign
842
870
    mkstemp
843
871
    pld
 
872
    posix_memalign
844
873
    ppc64
845
874
    round
846
875
    roundf
847
876
    sdl
848
877
    sdl_video_size
 
878
    setmode
849
879
    socklen_t
850
880
    soundcard_h
851
881
    poll_h
856
886
    sys_videoio_h
857
887
    termios_h
858
888
    threads
 
889
    truncf
859
890
    winsock2_h
860
891
    yasm
861
892
"
863
894
# options emitted with CONFIG_ prefix but not available on command line
864
895
CONFIG_EXTRA="
865
896
    fft_mmx
 
897
    oldscaler
866
898
"
867
899
 
868
900
CMDLINE_SELECT="
874
906
    extra_warnings
875
907
    logging
876
908
    optimizations
877
 
    shared
878
 
    static
879
909
    stripping
880
910
"
881
911
 
896
926
    cpu
897
927
    cross_prefix
898
928
    extra_version
 
929
    host_cc
 
930
    host_cflags
 
931
    host_ldflags
 
932
    host_libs
899
933
    logfile
 
934
    nm
900
935
    source_path
 
936
    target_exec
901
937
    target_os
 
938
    target_path
902
939
"
903
940
 
904
941
# code dependency declarations
905
942
 
906
943
# architecture extensions
907
 
altivec_deps="powerpc"
908
 
armv5te_deps="armv4l"
909
 
armv6_deps="armv4l"
910
 
armvfp_deps="armv4l"
911
 
iwmmxt_deps="armv4l"
 
944
altivec_deps="ppc"
 
945
armv5te_deps="arm"
 
946
armv6_deps="arm"
 
947
armv6t2_deps="arm"
 
948
armvfp_deps="arm"
 
949
iwmmxt_deps="arm"
912
950
mmi_deps="mips"
913
951
mmx_deps="x86"
914
952
mmx2_deps="x86 mmx"
915
 
neon_deps="armv4l"
916
 
ssse3_deps="x86"
 
953
neon_deps="arm"
 
954
sse_deps="mmx"
 
955
ssse3_deps="x86 sse"
917
956
vis_deps="sparc"
918
957
 
919
958
# common features
920
959
fft_suggest="fft_mmx"
921
960
fft_mmx_deps="mmx yasm"
 
961
oldscaler_deps="!swscale"
922
962
 
923
963
# decoders / encoders
924
964
aac_decoder_select="fft mdct"
929
969
cook_decoder_select="fft mdct"
930
970
cscd_decoder_suggest="zlib"
931
971
dca_decoder_select="fft mdct"
 
972
dnxhd_encoder_select="aandct"
932
973
dxa_decoder_select="zlib"
933
974
eac3_decoder_deps="gpl"
934
975
eac3_decoder_select="fft mdct"
 
976
eatgq_decoder_select="aandct"
935
977
ffv1_decoder_select="golomb"
936
978
flac_decoder_select="golomb"
937
979
flac_encoder_select="golomb"
938
980
flashsv_decoder_select="zlib"
939
981
flashsv_encoder_select="zlib"
 
982
flv_encoder_select="aandct"
 
983
h261_encoder_select="aandct"
 
984
h263_encoder_select="aandct"
 
985
h263p_encoder_select="aandct"
940
986
h264_decoder_select="golomb"
 
987
h264_vdpau_decoder_deps="vdpau"
941
988
imc_decoder_select="fft mdct"
942
989
jpegls_decoder_select="golomb"
943
990
jpegls_encoder_select="golomb"
 
991
ljpeg_encoder_select="aandct"
944
992
loco_decoder_select="golomb"
945
 
mpeg_xvmc_decoder_deps="xvmc"
 
993
mjpeg_encoder_select="aandct"
 
994
mpeg1video_encoder_select="aandct"
 
995
mpeg2video_encoder_select="aandct"
 
996
mpeg4_encoder_select="aandct"
 
997
mpeg_vdpau_decoder_deps="vdpau"
 
998
mpeg1_vdpau_decoder_deps="vdpau"
 
999
mpeg_xvmc_decoder_deps="xvmc X11_extensions_XvMClib_h"
 
1000
msmpeg4v1_encoder_select="aandct"
 
1001
msmpeg4v2_encoder_select="aandct"
 
1002
msmpeg4v3_encoder_select="aandct"
946
1003
nellymoser_decoder_select="fft mdct"
947
1004
nellymoser_encoder_select="fft mdct"
948
1005
png_decoder_select="zlib"
949
1006
png_encoder_select="zlib"
950
1007
qdm2_decoder_select="fft mdct"
 
1008
rv10_encoder_select="aandct"
 
1009
rv20_encoder_select="aandct"
951
1010
shorten_decoder_select="golomb"
952
1011
sonic_decoder_select="golomb"
953
1012
sonic_encoder_select="golomb"
963
1022
wmav1_encoder_select="fft mdct"
964
1023
wmav2_decoder_select="fft mdct"
965
1024
wmav2_encoder_select="fft mdct"
 
1025
wmv1_encoder_select="aandct"
 
1026
wmv2_encoder_select="aandct"
966
1027
zlib_decoder_select="zlib"
967
1028
zlib_encoder_select="zlib"
968
1029
zmbv_decoder_select="zlib"
991
1052
libx264_encoder_deps="libx264"
992
1053
libxvid_encoder_deps="libxvid"
993
1054
mpeg4aac_decoder_deps="libfaad"
 
1055
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
994
1056
 
995
1057
# demuxers / muxers
996
1058
ac3_demuxer_deps="ac3_parser"
1050
1112
shlibdir_default="$libdir_default"
1051
1113
 
1052
1114
# toolchain
 
1115
ar="ar"
1053
1116
cc_default="gcc"
1054
 
yasmexe="yasm"
1055
 
ar="ar"
1056
 
nm="nm"
 
1117
host_cc_default="gcc"
 
1118
ln_s="ln -sf"
 
1119
nm_default="nm"
 
1120
objformat="elf"
1057
1121
ranlib="ranlib"
1058
1122
strip="strip"
1059
 
asmalign_pot="unknown"
1060
 
ln_s="ln -sf"
1061
 
objformat="elf"
 
1123
yasmexe="yasm"
1062
1124
 
1063
1125
# machine
1064
1126
arch=`uname -m`
1075
1137
enable ipv6
1076
1138
enable mpegaudio_hp
1077
1139
enable network
 
1140
enable oldscaler
1078
1141
enable optimizations
1079
1142
enable protocols
1080
1143
enable static
1097
1160
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
1098
1161
LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
1099
1162
 
 
1163
host_cflags='-O3 -g -Wall'
 
1164
host_libs='-lm'
 
1165
 
 
1166
target_path='.'
 
1167
 
1100
1168
# gcc stupidly only outputs the basename of targets with -MM, but we need the
1101
1169
# full relative path for objects in subdirectories for non-recursive Make.
1102
1170
DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2,"'
1161
1229
for opt do
1162
1230
    optval="${opt#*=}"
1163
1231
    case "$opt" in
1164
 
    --extra-cflags=*) add_cflags "$optval"
1165
 
    ;;
1166
 
    --extra-ldflags=*) add_ldflags "$optval"
1167
 
    ;;
1168
 
    --extra-libs=*) add_extralibs "$optval"
 
1232
    --extra-cflags=*) add_cflags $optval
 
1233
    ;;
 
1234
    --extra-ldflags=*) add_ldflags $optval
 
1235
    ;;
 
1236
    --extra-libs=*) add_extralibs $optval
1169
1237
    ;;
1170
1238
    --disable-devices) disable $INDEV_LIST $OUTDEV_LIST
1171
1239
    ;;
1211
1279
echo "# $0 $@" > $logfile
1212
1280
set >> $logfile
1213
1281
 
 
1282
test -n "$cross_prefix" && enable cross_compile
 
1283
 
 
1284
ar="${cross_prefix}${ar}"
1214
1285
cc_default="${cross_prefix}${cc_default}"
1215
 
yasmexe="${cross_prefix}${yasmexe}"
1216
 
ar="${cross_prefix}${ar}"
1217
 
nm="${cross_prefix}${nm}"
 
1286
nm_default="${cross_prefix}${nm_default}"
1218
1287
ranlib="${cross_prefix}${ranlib}"
1219
1288
strip="${cross_prefix}${strip}"
1220
1289
 
1221
 
set_default cc
 
1290
set_default cc nm
 
1291
enabled cross_compile || host_cc_default=$cc
 
1292
set_default host_cc
1222
1293
 
1223
1294
# set temporary file name
1224
 
if test ! -z "$TMPDIR" ; then
1225
 
    TMPDIR1="${TMPDIR}"
1226
 
elif test ! -z "$TEMPDIR" ; then
1227
 
    TMPDIR1="${TEMPDIR}"
1228
 
else
1229
 
    TMPDIR1="/tmp"
1230
 
fi
 
1295
: ${TMPDIR:=$TEMPDIR}
 
1296
: ${TMPDIR:=$TMP}
 
1297
: ${TMPDIR:=/tmp}
1231
1298
 
1232
 
TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
1233
 
TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
1234
 
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
1235
 
TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
1236
 
TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
1237
 
TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
 
1299
TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
 
1300
TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
 
1301
TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
 
1302
TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
 
1303
TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
 
1304
TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
1238
1305
 
1239
1306
check_cflags -std=c99
1240
1307
 
1241
1308
case "$arch" in
1242
1309
    i386|i486|i586|i686|i86pc|BePC)
1243
 
        arch="x86_32"
 
1310
        arch="x86"
 
1311
        subarch="x86_32"
1244
1312
        enable fast_unaligned
1245
1313
    ;;
1246
1314
    x86_64|amd64)
1247
 
        arch="x86_32"
 
1315
        arch="x86"
 
1316
        subarch="x86_32"
1248
1317
        enable cmov
1249
1318
        enable fast_cmov
1250
1319
        enable fast_unaligned
1251
 
        check_cc <<EOF && enable fast_64bit && arch="x86_64"
 
1320
        check_cc <<EOF && enable fast_64bit && subarch="x86_64"
1252
1321
        int test[sizeof(char*) - 7];
1253
1322
EOF
1254
1323
    ;;
1255
 
    # armv4l is a subset of armv[567]*l
1256
1324
    arm|armv[4567]*l)
1257
 
        arch="armv4l"
 
1325
        arch="arm"
1258
1326
    ;;
1259
1327
    alpha)
1260
1328
        arch="alpha"
1261
1329
        enable fast_64bit
 
1330
        check_cflags -mieee
1262
1331
    ;;
1263
1332
    "Power Macintosh"|ppc|powerpc)
1264
 
        arch="powerpc"
 
1333
        arch="ppc"
1265
1334
        enable fast_unaligned
1266
1335
    ;;
1267
1336
    ppc64)
1268
 
        arch="powerpc"
 
1337
        arch="ppc"
1269
1338
        enable fast_64bit
1270
1339
        enable fast_unaligned
1271
1340
    ;;
1272
1341
    mips|mipsel|IP*)
1273
1342
        arch="mips"
1274
1343
    ;;
 
1344
    mips64)
 
1345
        arch="mips"
 
1346
        enable fast_64bit
 
1347
    ;;
1275
1348
    sun4u|sparc64)
1276
 
        arch="sparc64"
 
1349
        arch="sparc"
 
1350
        subarch="sparc64"
1277
1351
        enable fast_64bit
1278
1352
    ;;
1279
1353
    sparc)
1280
1354
        arch="sparc"
1281
1355
    ;;
1282
 
    sh4)
 
1356
    sh4|sh)
1283
1357
        arch="sh4"
1284
1358
    ;;
1285
 
    parisc)
 
1359
    parisc|hppa)
1286
1360
        arch="parisc"
1287
1361
    ;;
1288
 
    parisc64)
 
1362
    parisc64|hppa64)
1289
1363
        arch="parisc"
1290
1364
        enable fast_64bit
1291
1365
    ;;
1307
1381
    ;;
1308
1382
esac
1309
1383
 
1310
 
enable $arch
1311
 
enabled_any x86_32 x86_64 && enable x86
1312
 
enabled     sparc64       && enable sparc
 
1384
enable $arch $subarch
1313
1385
 
1314
1386
# OS specific
1315
1387
case $target_os in
1316
1388
    beos|haiku|zeta)
1317
1389
        prefix_default="$HOME/config"
1318
1390
        # helps building libavcodec
1319
 
        add_cflags "-DPIC -fomit-frame-pointer"
 
1391
        add_cflags -DPIC -fomit-frame-pointer
1320
1392
        # 3 gcc releases known for BeOS, each with ugly bugs
1321
1393
        gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
1322
1394
        case "$gcc_version" in
1324
1396
            disable mmx
1325
1397
            ;;
1326
1398
          *20010315*) echo "BeBits gcc"
1327
 
            add_cflags "-fno-expensive-optimizations"
 
1399
            add_cflags -fno-expensive-optimizations
1328
1400
            ;;
1329
1401
        esac
1330
1402
        SHFLAGS=-nostart
1343
1415
        FFSERVERLDFLAGS=""
1344
1416
        SHFLAGS='-shared -Wl,-h,$$(@F)'
1345
1417
        network_extralibs="-lsocket -lnsl"
 
1418
        add_cflags -D__EXTENSIONS__
1346
1419
        ;;
1347
1420
    netbsd)
1348
1421
        oss_demuxer_extralibs="-lossaudio"
1352
1425
        disable need_memalign
1353
1426
        LIBOBJFLAGS='$(PIC)'
1354
1427
        SHFLAGS='-shared'
1355
 
        SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF).$(LIBVERSION)'
1356
 
        SLIBNAME_WITH_VERSION='$(SLIBNAME)'
1357
 
        SLIBNAME_WITH_MAJOR='$(SLIBNAME)'
1358
1428
        oss_demuxer_extralibs="-lossaudio"
1359
1429
        oss_muxer_extralibs="-lossaudio"
1360
1430
        ;;
1381
1451
    mingw32*)
1382
1452
        target_os=mingw32
1383
1453
        LIBTARGET=i386
1384
 
        if test $arch = x86_64; then
 
1454
        if enabled x86_64; then
1385
1455
            disable need_memalign
1386
1456
            LIBTARGET=x64
1387
1457
        fi
1408
1478
        check_cpp_condition _mingw.h "(__MINGW32_MAJOR_VERSION > 3) || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
1409
1479
            die "ERROR: MinGW runtime version must be >= 3.15."
1410
1480
        enabled_any avisynth vfwcap_demuxer &&
1411
 
            { check_cpp_condition w32api.h "(__W32API_MAJOR_VERSION > 3) || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION >= 12)" ||
1412
 
              die "ERROR: avisynth and vfwcap_demuxer require w32api version 3.12 or later."; }
 
1481
            { check_cpp_condition w32api.h "(__W32API_MAJOR_VERSION > 3) || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION >= 13)" ||
 
1482
              die "ERROR: avisynth and vfwcap_demuxer require w32api version 3.13 or later."; }
1413
1483
        ;;
1414
1484
    cygwin*)
1415
1485
        target_os=cygwin
1434
1504
        disable $INDEV_LIST $OUTDEV_LIST
1435
1505
        network_extralibs="-lsocket"
1436
1506
        EXESUF=".exe"
1437
 
        objformat="win32"
 
1507
        objformat="coff"
1438
1508
        enable dos_paths
1439
1509
        ;;
1440
1510
    linux)
1485
1555
# Combine FFLDFLAGS and the LDFLAGS environment variable.
1486
1556
LDFLAGS="$FFLDFLAGS $LDFLAGS"
1487
1557
 
1488
 
test -n "$cross_prefix" && enable cross_compile
1489
 
 
1490
1558
# we need to build at least one lib type
1491
1559
if ! enabled_any static shared; then
1492
1560
    cat <<EOF
1541
1609
#Darwin CC versions
1542
1610
if test $target_os = darwin; then
1543
1611
    if $cc -v 2>&1 | grep -q xlc; then
1544
 
        add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
 
1612
        add_cflags -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto
1545
1613
    else
1546
 
        add_cflags "-pipe"
1547
 
        check_cflags "-force_cpusubtype_ALL"
1548
 
        check_cflags "-Wno-sign-compare"
 
1614
        add_cflags -pipe
 
1615
        check_cflags -force_cpusubtype_ALL
 
1616
        check_cflags -Wno-sign-compare
1549
1617
        enabled shared || check_cflags -mdynamic-no-pic
1550
1618
    fi
1551
1619
fi
1559
1627
    }
1560
1628
    case $cpu in
1561
1629
        601|ppc601|PowerPC601)
1562
 
            add_cflags "-mcpu=601"
 
1630
            add_cflags -mcpu=601
1563
1631
            warn_altivec enabled PPC601
1564
1632
        ;;
1565
1633
        603*|ppc603*|PowerPC603*)
1566
 
            add_cflags "-mcpu=603"
 
1634
            add_cflags -mcpu=603
1567
1635
            warn_altivec enabled PPC603
1568
1636
        ;;
1569
1637
        604*|ppc604*|PowerPC604*)
1570
 
            add_cflags "-mcpu=604"
 
1638
            add_cflags -mcpu=604
1571
1639
            warn_altivec enabled PPC604
1572
1640
        ;;
1573
1641
        G3|g3|75*|ppc75*|PowerPC75*)
1574
 
            add_cflags "-mcpu=750 -mpowerpc-gfxopt"
 
1642
            add_cflags -mcpu=750 -mpowerpc-gfxopt
1575
1643
            warn_altivec enabled PPC75x
1576
1644
        ;;
1577
1645
        G4|g4|745*|ppc745*|PowerPC745*)
1578
 
            add_cflags "-mcpu=7450 -mpowerpc-gfxopt"
 
1646
            add_cflags -mcpu=7450 -mpowerpc-gfxopt
1579
1647
            warn_altivec disabled PPC745x
1580
1648
        ;;
1581
1649
        74*|ppc74*|PowerPC74*)
1582
 
            add_cflags "-mcpu=7400 -mpowerpc-gfxopt"
 
1650
            add_cflags -mcpu=7400 -mpowerpc-gfxopt
1583
1651
            warn_altivec disabled PPC74xx
1584
1652
        ;;
1585
1653
        G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
1586
 
            add_cflags "-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
 
1654
            add_cflags -mcpu=970 -mpowerpc-gfxopt -mpowerpc64
1587
1655
            warn_altivec disabled PPC970
1588
1656
            enable ppc64
1589
1657
        ;;
1590
1658
        Cell|CELL|cell)
1591
 
            add_cflags "-mcpu=cell"
 
1659
            add_cflags -mcpu=cell
1592
1660
            warn_altivec disabled Cell
1593
1661
            enable ppc64
1594
1662
        ;;
1595
1663
        # targets that do NOT support conditional mov (cmov)
1596
1664
        i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
1597
 
            add_cflags "-march=$cpu"
 
1665
            add_cflags -march=$cpu
1598
1666
            disable cmov
1599
1667
        ;;
1600
1668
        # targets that do support conditional mov (cmov)
1601
1669
        i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
1602
 
            add_cflags "-march=$cpu"
 
1670
            add_cflags -march=$cpu
1603
1671
            enable cmov
1604
1672
            enable fast_cmov
1605
1673
        ;;
1606
1674
        # targets that do support conditional mov but on which it's slow
1607
1675
        pentium4|pentium4m|prescott|nocona)
1608
 
            add_cflags "-march=$cpu"
 
1676
            add_cflags -march=$cpu
1609
1677
            enable cmov
1610
1678
            disable fast_cmov
1611
1679
        ;;
1612
1680
        sparc64)
1613
 
            add_cflags "-mcpu=v9"
 
1681
            add_cflags -mcpu=v9
1614
1682
        ;;
1615
1683
        arm11*|cortex*)
1616
 
            add_cflags "-mcpu=$cpu"
 
1684
            add_cflags -mcpu=$cpu
1617
1685
            enable fast_unaligned
1618
1686
        ;;
1619
1687
        armv*)
1620
 
            add_cflags "-march=$cpu"
 
1688
            add_cflags -march=$cpu
1621
1689
        ;;
1622
1690
        arm*)
1623
 
            add_cflags "-mcpu=$cpu"
 
1691
            add_cflags -mcpu=$cpu
 
1692
        ;;
 
1693
        ev4|ev45|ev5|ev56|pca56|ev6|ev67)
 
1694
            add_cflags -mcpu=$cpu
1624
1695
        ;;
1625
1696
        *)
1626
1697
            echo "WARNING: Unknown CPU \"$cpu\", ignored."
1635
1706
chmod +x $TMPSH >> $logfile 2>&1
1636
1707
if ! $TMPSH >> $logfile 2>&1; then
1637
1708
    cat <<EOF
1638
 
Unable to create and execute files in $TMPDIR1.  Set the TMPDIR environment
1639
 
variable to another directory and make sure that $TMPDIR1 is not mounted
1640
 
noexec.
 
1709
Unable to create and execute files in $TMPDIR.  Set the TMPDIR environment
 
1710
variable to another directory and make sure that it is not mounted noexec.
1641
1711
EOF
1642
1712
    die "Sanity test failed."
1643
1713
fi
1686
1756
 
1687
1757
    check_asm bswap '"bswap %%eax" ::: "%eax"'
1688
1758
 
1689
 
    YASMFLAGS="-f $objformat -DARCH_$(toupper $arch)"
 
1759
    YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
1690
1760
    enabled     x86_64        && append YASMFLAGS "-m amd64"
1691
1761
    enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
1692
1762
    case "$objformat" in
1699
1769
 
1700
1770
# check for assembler specific support
1701
1771
 
1702
 
if test $arch = "powerpc"; then
1703
 
    check_asm dcbzl '"dcbzl 0, 1"'
1704
 
fi
 
1772
enabled ppc && check_asm dcbzl '"dcbzl 0, 1"'
1705
1773
 
1706
1774
# check for SIMD availability
1707
1775
 
1729
1797
fi
1730
1798
 
1731
1799
# We have to check if pld is a nop and disable it.
1732
 
enabled armv4l  && check_asm pld     '"pld [r0]"'
 
1800
enabled arm     && check_asm pld     '"pld [r0]"'
1733
1801
enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
1734
1802
enabled armv6   && check_asm armv6   '"sadd16 r0, r0, r0"'
 
1803
enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
1735
1804
enabled armvfp  && check_asm armvfp  '"fadds s0, s0, s0"'
1736
1805
enabled iwmmxt  && check_asm iwmmxt  '"wunpckelub wr6, wr4"'
1737
1806
enabled mmi     && check_asm mmi     '"lq $2, 0($2)"'
1738
1807
enabled neon    && check_asm neon    '"vadd.i16 q0, q0, q0"'
1739
1808
enabled vis     && check_asm vis     '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc
1740
1809
 
1741
 
enabled vis && add_cflags "-mcpu=ultrasparc -mtune=ultrasparc"
 
1810
enabled vis && add_cflags -mcpu=ultrasparc -mtune=ultrasparc
1742
1811
 
1743
1812
# ---
1744
1813
# big/little-endian test
1762
1831
check_func  inet_aton $network_extralibs
1763
1832
check_func  memalign
1764
1833
check_func  mkstemp
 
1834
check_func  posix_memalign
 
1835
check_func_headers io.h setmode
1765
1836
check_func_headers windows.h GetProcessTimes
1766
1837
 
1767
1838
check_header conio.h
1772
1843
check_header sys/resource.h
1773
1844
check_header sys/select.h
1774
1845
check_header termios.h
 
1846
check_header vdpau/vdpau.h
 
1847
check_header vdpau/vdpau_x11.h
 
1848
check_header X11/extensions/XvMClib.h
1775
1849
 
1776
 
if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
1777
 
    die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
 
1850
if ! enabled_any memalign memalign_hack posix_memalign && enabled need_memalign ; then
 
1851
    die "Error, no aligned memory allocator but SSE enabled, disable it or use --enable-memalign-hack."
1778
1852
fi
1779
1853
 
1780
 
disabled  zlib || check_lib  zlib.h      zlibVersion -lz   || disable  zlib
1781
 
disabled bzlib || check_lib bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
 
1854
disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
 
1855
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
1782
1856
 
1783
1857
# check for some common methods of building with pthread support
1784
1858
# do this before the optional library checks as some of them require pthreads
1809
1883
check_lib math.h sin -lm
1810
1884
 
1811
1885
# test for C99 functions in math.h
1812
 
for func in llrint lrint lrintf round roundf; do
 
1886
for func in llrint lrint lrintf round roundf truncf; do
1813
1887
    check_exec <<EOF && enable $func || disable $func
1814
1888
#include <math.h>
1815
1889
int main(void) { return ($func(3.999f) > 0)?0:1; }
1826
1900
enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
1827
1901
enabled libfaad    && require2 libfaad faad.h faacDecOpen -lfaad
1828
1902
enabled libgsm     && require  libgsm gsm.h gsm_create -lgsm
1829
 
enabled libmp3lame && require  LAME lame/lame.h lame_init -lmp3lame -lm
 
1903
enabled libmp3lame && require  libmp3lame lame/lame.h lame_init -lmp3lame -lm
1830
1904
enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
1831
1905
enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
1832
1906
                           require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
1833
1907
enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
1834
1908
enabled libtheora  && require  libtheora theora/theora.h theora_info_init -ltheora -logg
1835
1909
enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
1836
 
enabled libx264    && require  x264 x264.h x264_encoder_open -lx264 -lm &&
 
1910
enabled libx264    && require  libx264 x264.h x264_encoder_open -lx264 -lm &&
1837
1911
                      { check_cpp_condition x264.h "X264_BUILD >= 65" ||
1838
1912
                        die "ERROR: libx264 version must be >= 0.65."; }
1839
 
enabled libxvid    && require  Xvid xvid.h xvid_global -lxvidcore
 
1913
enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
1840
1914
enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
1841
1915
 
1842
1916
# libdc1394 check
1909
1983
# Network check
1910
1984
 
1911
1985
if enabled network; then
1912
 
    check_type sys/socket.h socklen_t
 
1986
    check_type "sys/types.h sys/socket.h" socklen_t
1913
1987
    # Prefer arpa/inet.h over winsock2
1914
1988
    if check_header arpa/inet.h ; then
1915
1989
        check_func closesocket
1975
2049
check_cflags -Wcast-qual
1976
2050
check_cflags -Wwrite-strings
1977
2051
check_cflags -Wtype-limits
 
2052
check_cflags -Wundef
1978
2053
enabled extra_warnings && check_cflags -Winline
1979
2054
 
1980
2055
# add some linker flags
1988
2063
    optimizations="small"
1989
2064
elif enabled optimizations; then
1990
2065
    if $cc -v 2>&1 | grep -q xlc; then
1991
 
        add_cflags  "-O5"
1992
 
        add_ldflags "-O5"
 
2066
        add_cflags  -O5
 
2067
        add_ldflags -O5
1993
2068
    else
1994
 
        add_cflags "-O3"
 
2069
        add_cflags -O3
1995
2070
    fi
1996
2071
fi
1997
2072
check_cflags -fno-math-errno
2017
2092
if enabled shared; then
2018
2093
    # LIBOBJFLAGS may have already been set in the OS configuration
2019
2094
    if test -z "$LIBOBJFLAGS" ; then
2020
 
        case "$arch" in
 
2095
        case "${subarch-$arch}" in
2021
2096
            x86_64|ia64|alpha|sparc*|power*|parisc*|mips*) LIBOBJFLAGS='$(PIC)' ;;
2022
2097
        esac
2023
2098
    fi
2024
2099
fi
2025
2100
 
2026
2101
if enabled gprof; then
2027
 
    add_cflags  "-p"
2028
 
    add_ldflags "-p"
 
2102
    add_cflags  -p
 
2103
    add_ldflags -p
2029
2104
fi
2030
2105
 
2031
2106
VHOOKCFLAGS="-fPIC"
2032
2107
 
2033
2108
# Find out if the .align argument is a power of two or not.
2034
 
if test $asmalign_pot = "unknown"; then
2035
 
    disable asmalign_pot
2036
 
    echo '__asm__ (".align 3");' | check_cc && enable asmalign_pot
2037
 
fi
 
2109
check_asm asmalign_pot '".align 3"'
2038
2110
 
2039
2111
enabled_any $DECODER_LIST      && enable decoders
2040
2112
enabled_any $ENCODER_LIST      && enable encoders
2062
2134
           $OUTDEV_LIST       \
2063
2135
           $PROTOCOL_LIST     \
2064
2136
 
2065
 
enabled libdc1394 && append pkg_requires "libraw1394"
2066
 
enabled libdirac  && append pkg_requires "dirac"
2067
 
enabled libtheora && append pkg_requires "theora"
2068
 
enabled libvorbis && append pkg_requires "vorbisenc"
2069
 
 
2070
2137
echo "install prefix            $prefix"
2071
2138
echo "source path               $source_path"
2072
2139
echo "C compiler                $cc"
2079
2146
    echo "version string suffix     $extra_version"
2080
2147
fi
2081
2148
echo "big-endian                ${bigendian-no}"
2082
 
if test $arch = "x86_32" -o $arch = "x86_64"; then
 
2149
if enabled x86; then
2083
2150
    echo "yasm                      ${yasm-no}"
2084
2151
    echo "MMX enabled               ${mmx-no}"
 
2152
    echo "SSE enabled               ${sse-no}"
2085
2153
    echo "CMOV enabled              ${cmov-no}"
2086
2154
    echo "CMOV is fast              ${fast_cmov-no}"
2087
2155
    echo "EBX available             ${ebx_available-no}"
2088
2156
    echo "EBP available             ${ebp_available-no}"
2089
2157
fi
2090
 
if test $arch = "armv4l"; then
 
2158
if enabled arm; then
2091
2159
    echo "ARMv5TE enabled           ${armv5te-no}"
2092
2160
    echo "ARMv6 enabled             ${armv6-no}"
 
2161
    echo "ARMv6T2 enabled           ${armv6t2-no}"
2093
2162
    echo "ARM VFP enabled           ${armvfp-no}"
2094
2163
    echo "IWMMXT enabled            ${iwmmxt-no}"
2095
2164
    echo "NEON enabled              ${neon-no}"
2096
2165
fi
2097
 
if test $arch = "mips"; then
 
2166
if enabled mips; then
2098
2167
    echo "MMI enabled               ${mmi-no}"
2099
2168
fi
2100
 
if test $arch = "powerpc"; then
 
2169
if enabled ppc; then
2101
2170
    echo "AltiVec enabled           ${altivec-no}"
2102
2171
    echo "dcbzl available           ${dcbzl-no}"
2103
2172
fi
2143
2212
echo "libvorbis enabled         ${libvorbis-no}"
2144
2213
echo "libx264 enabled           ${libx264-no}"
2145
2214
echo "libxvid enabled           ${libxvid-no}"
 
2215
echo "vdpau enabled             ${vdpau-no}"
2146
2216
echo "zlib enabled              ${zlib-no}"
2147
2217
echo "bzlib enabled             ${bzlib-no}"
2148
2218
echo
2209
2279
echo "EXESUF=$EXESUF" >> config.mak
2210
2280
echo "EXTRA_VERSION=$extra_version" >> config.mak
2211
2281
echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
 
2282
echo "HOSTCC=$host_cc" >> config.mak
 
2283
echo "HOSTCFLAGS=$host_cflags" >> config.mak
 
2284
echo "HOSTLDFLAGS=$host_ldflags" >> config.mak
 
2285
echo "HOSTLIBS=$host_libs" >> config.mak
 
2286
echo "TARGET_EXEC=$target_exec" >> config.mak
 
2287
echo "TARGET_PATH=$target_path" >> config.mak
2212
2288
 
2213
2289
if enabled bigendian; then
2214
2290
    echo "WORDS_BIGENDIAN=yes" >> config.mak
2256
2332
echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
2257
2333
echo "EXTRALIBS=$extralibs" >> config.mak
2258
2334
 
 
2335
echo "ARCH=$arch" >> config.mak
 
2336
 
2259
2337
print_config ARCH_   $TMPH config.mak $ARCH_LIST
2260
2338
print_config HAVE_   $TMPH config.mak $HAVE_LIST
2261
2339
print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \
2303
2381
        doc               \
2304
2382
        libavcodec        \
2305
2383
        libavcodec/alpha  \
2306
 
        libavcodec/armv4l \
 
2384
        libavcodec/arm    \
2307
2385
        libavcodec/bfin   \
2308
 
        libavcodec/i386   \
2309
2386
        libavcodec/mlib   \
2310
2387
        libavcodec/ppc    \
2311
2388
        libavcodec/sh4    \
2312
2389
        libavcodec/sparc  \
 
2390
        libavcodec/x86    \
2313
2391
        libavdevice       \
2314
2392
        libavfilter       \
2315
2393
        libavformat       \
2346
2424
 
2347
2425
pkgconfig_generate(){
2348
2426
name=$1
2349
 
shortname=${name#lib}
 
2427
shortname=${name#lib}${build_suffix}
2350
2428
comment=$2
2351
2429
version=$3
2352
2430
libs=$4
2384
2462
}
2385
2463
 
2386
2464
pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
2387
 
pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
2388
 
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
2389
 
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
 
2465
pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
 
2466
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
 
2467
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
2390
2468
enabled avfilter &&
2391
 
    pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
 
2469
    pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
2392
2470
enabled postproc &&
2393
2471
    pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
2394
2472
if enabled swscale; then
2395
2473
    pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
2396
2474
else
2397
 
    pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
 
2475
    pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavcodec = $LIBAVCODEC_VERSION"
2398
2476
    apply libswscale/libswscale.pc sed s/^Libs:.*$/Libs:/
2399
2477
fi