Newer
Older
'
ARCH_LIST='
alpha
avr32
avr32_ap
avr32_uc
bfin
ia64
m68k
mips
parisc
s390
sh4
sparc
sparc64
x86
x86_32
x86_64
'
ARCH_EXT_LIST='
amd3dnow
amd3dnowext
iwmmxt
mmi
mmx
Diego Biurrun
committed
ppc4xx
'
HAVE_LIST="
$ARCH_EXT_LIST
$THREADS_LIST
altivec_h
François Revol
committed
arpa_inet_h
dev_bktr_ioctl_bt848_h
dev_bktr_ioctl_meteor_h
dev_ic_bt8xx_h
dev_video_bktr_ioctl_bt848_h
dev_video_meteor_ioctl_meteor_h
dos_paths
ebp_available
ebx_available
Vitor Sessak
committed
exp2
exp2f
fast_clz
Martin Storsjö
committed
getaddrinfo
GetProcessMemoryInfo
GetProcessTimes
Alessandro Sappia
committed
libdc1394_1
libdc1394_2
llrint
local_aligned_16
local_aligned_8
localtime_r
Alex Converse
committed
log2
Vitor Sessak
committed
log2f
lrint
Diego Biurrun
committed
lzo1x_999_compress
machine_ioctl_bt848_h
machine_ioctl_meteor_h
round
roundf
sdl
sdl_video_size
setmode
struct_addrinfo
struct_ipv6_mreq
struct_rusage_ru_maxrss
struct_sockaddr_in6
Ronald S. Bultje
committed
struct_sockaddr_sa_len
struct_sockaddr_storage
symver
symver_asm_label
sys_param_h
sys_select_h
VirtualAlloc
xmm_clobbers
"
# options emitted with CONFIG_ prefix but not available on command line
CONFIG_EXTRA="
$ARCH_EXT_LIST
$THREADS_LIST
logging
optimizations
symver
PATHS_LIST='
incdir
libdir
mandir
prefix
shlibdir
'
CMDLINE_SET="
$PATHS_LIST
build_suffix
cc
cpu
cross_prefix
extra_version
host_cc
host_cflags
host_ldflags
host_libs
malloc_prefix
sysinclude
sysroot
CMDLINE_APPEND="
extra_cflags
"
armv5te_deps="arm"
armv6_deps="arm"
armvfp_deps="arm"
iwmmxt_deps="arm"
Diego Biurrun
committed
mmi_deps="mips"
altivec_deps="ppc"
ppc4xx_deps="ppc"
vis_deps="sparc"
amd3dnow_deps="mmx"
amd3dnowext_deps="amd3dnow"
mmx2_deps="mmx"
sse_deps="mmx"
ssse3_deps="sse"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
fast_unaligned_if_any="armv6 ppc x86"
need_memalign="altivec neon sse"
symver_if_any="symver_asm_label symver_gnu_asm"
# subsystems
mdct_select="fft"
rdft_select="fft"
mpegaudiodsp_select="dct"
# decoders / encoders / hardware accelerators
aac_decoder_select="mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
ac3_decoder_select="mdct ac3dsp ac3_parser"
ac3_encoder_select="mdct ac3dsp"
ac3_fixed_encoder_select="mdct ac3dsp"
alac_encoder_select="lpc"
amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp"
atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
binkaudio_rdft_decoder_select="mdct rdft sinewin"
cavs_decoder_select="golomb"
cook_decoder_select="mdct sinewin"
dca_decoder_select="mdct"
dnxhd_encoder_select="aandct"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="mdct ac3dsp"
eatgq_decoder_select="aandct"
ffv1_decoder_select="golomb"
flac_decoder_select="golomb"
flac_encoder_select="golomb lpc"
flashsv_decoder_select="zlib"
flashsv_encoder_select="zlib"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
fraps_decoder_select="huffman"
h261_encoder_select="aandct"
Diego Biurrun
committed
h263_decoder_select="h263_parser"
h263_encoder_select="aandct"
h263_vaapi_hwaccel_select="vaapi h263_decoder"
h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
h264_decoder_select="golomb h264chroma h264dsp h264pred"
h264_dxva2_hwaccel_deps="dxva2api_h"
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
h264_vaapi_hwaccel_select="vaapi h264_decoder"
h264_vda_hwaccel_select="vda h264_decoder"
h264_vdpau_decoder_select="vdpau h264_decoder"
imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
ljpeg_encoder_select="aandct"
loco_decoder_select="golomb"
mjpeg_encoder_select="aandct"
mlp_decoder_select="mlp_parser"
mp1_decoder_select="mpegaudiodsp"
mp1float_decoder_select="mpegaudiodsp"
mp2_decoder_select="mpegaudiodsp"
mp2float_decoder_select="mpegaudiodsp"
mp3_decoder_select="mpegaudiodsp"
mp3adu_decoder_select="mpegaudiodsp"
mp3adufloat_decoder_select="mpegaudiodsp"
mp3float_decoder_select="mpegaudiodsp"
mp3on4_decoder_select="mpegaudiodsp"
mp3on4float_decoder_select="mpegaudiodsp"
mpc7_decoder_select="mpegaudiodsp"
mpc8_decoder_select="mpegaudiodsp"
mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
mpeg1video_encoder_select="aandct"
mpeg2_dxva2_hwaccel_deps="dxva2api_h"
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
mpeg2video_encoder_select="aandct"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
mpeg4_encoder_select="h263_encoder"
mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"

NVIDIA Corporation
committed
mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"
msmpeg4v1_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v1_encoder_select="h263_encoder"
msmpeg4v2_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v2_encoder_select="h263_encoder"
msmpeg4v3_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v3_encoder_select="h263_encoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="mdct sinewin"
png_decoder_select="zlib"
png_encoder_select="zlib"
qcelp_decoder_select="lsp"
qdm2_decoder_select="mdct rdft mpegaudiodsp"
Diego Biurrun
committed
rv10_decoder_select="h263_decoder"
Diego Biurrun
committed
rv10_encoder_select="h263_encoder"
Diego Biurrun
committed
rv20_decoder_select="h263_decoder"
Diego Biurrun
committed
rv20_encoder_select="h263_encoder"
rv30_decoder_select="golomb h264chroma h264pred"
rv40_decoder_select="golomb h264chroma h264pred"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
snow_decoder_select="dwt"
snow_encoder_select="aandct dwt"
svq3_decoder_select="golomb h264chroma h264dsp h264pred"
theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib"
truehd_decoder_select="mlp_decoder"
twinvq_decoder_select="mdct lsp sinewin"
vc1_decoder_select="h263_decoder h264chroma"
vc1_dxva2_hwaccel_deps="dxva2api_h DXVA_PictureParameters_wDecodedPictureIndex"
vc1_dxva2_hwaccel_select="dxva2 vc1_decoder"
vc1_vaapi_hwaccel_select="vaapi vc1_decoder"
vc1_vdpau_decoder_select="vdpau vc1_decoder"
vc1image_decoder_select="vc1_decoder"
vorbis_decoder_select="mdct"
vorbis_encoder_select="mdct"
vp6_decoder_select="huffman"
vp6a_decoder_select="vp6_decoder"
vp6f_decoder_select="vp6_decoder"
vp8_decoder_select="h264pred"
wmapro_decoder_select="mdct sinewin"
wmav1_decoder_select="mdct sinewin"
wmav1_encoder_select="mdct sinewin"
wmav2_decoder_select="mdct sinewin"
wmav2_encoder_select="mdct sinewin"
wmavoice_decoder_select="lsp rdft dct mdct sinewin"
Diego Biurrun
committed
wmv1_decoder_select="h263_decoder"
wmv1_encoder_select="h263_encoder"
Diego Biurrun
committed
wmv2_decoder_select="h263_decoder"
wmv2_encoder_select="h263_encoder"
wmv3_decoder_select="vc1_decoder"
wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
wmv3_vdpau_decoder_select="vc1_vdpau_decoder"
wmv3image_decoder_select="wmv3_decoder"
zlib_decoder_select="zlib"
zlib_encoder_select="zlib"
zmbv_decoder_select="zlib"
zmbv_encoder_select="zlib"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
Diego Biurrun
committed
# parsers
h264_parser_select="golomb h264chroma h264dsp h264pred"
Diego Biurrun
committed
libdirac_decoder_deps="libdirac !libschroedinger"
libdirac_encoder_deps="libdirac"
libfaac_encoder_deps="libfaac"
libgsm_decoder_deps="libgsm"
libgsm_encoder_deps="libgsm"
libgsm_ms_decoder_deps="libgsm"
libgsm_ms_encoder_deps="libgsm"
Diego Biurrun
committed
libmp3lame_encoder_deps="libmp3lame"
libopencore_amrnb_decoder_deps="libopencore_amrnb"
libopencore_amrnb_encoder_deps="libopencore_amrnb"
libopencore_amrwb_decoder_deps="libopencore_amrwb"
libopenjpeg_decoder_deps="libopenjpeg"
libschroedinger_decoder_deps="libschroedinger"
libschroedinger_encoder_deps="libschroedinger"
libvo_aacenc_encoder_deps="libvo_aacenc"
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
libvorbis_encoder_deps="libvorbis"
Diego Biurrun
committed
libx264_encoder_deps="libx264"
libxavs_encoder_deps="libxavs"
Diego Biurrun
committed
libxvid_encoder_deps="libxvid"
ac3_demuxer_select="ac3_parser"
asf_stream_muxer_select="asf_muxer"
avisynth_demuxer_deps="avisynth"
dirac_demuxer_select="dirac_parser"
Diego Biurrun
committed
eac3_demuxer_select="ac3_parser"
flac_demuxer_select="flac_parser"
ipod_muxer_select="mov_muxer"
libnut_demuxer_deps="libnut"
libnut_muxer_deps="libnut"
matroska_audio_muxer_select="matroska_muxer"
matroska_demuxer_suggest="zlib bzlib"
mov_demuxer_suggest="zlib"
mp3_demuxer_select="mpegaudio_parser"
mp4_muxer_select="mov_muxer"
mpegtsraw_demuxer_select="mpegts_demuxer"
mxf_d10_muxer_select="mxf_muxer"
psp_muxer_select="mov_muxer"
rtp_demuxer_select="sdp_demuxer"
Martin Storsjö
committed
rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer"
rtsp_demuxer_select="http_protocol rtpdec"
rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol"
sap_muxer_select="rtp_muxer rtp_protocol"
Martin Storsjö
committed
sdp_demuxer_select="rtpdec"
spdif_muxer_select="aac_parser"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
w64_demuxer_deps="wav_demuxer"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
alsa_outdev_deps="alsa_asoundlib_h"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
dv1394_indev_deps="dv1394 dv_demuxer"
jack_indev_deps="jack_jack_h"
libcdio_indev_deps="libcdio"
libdc1394_indev_deps="libdc1394"
oss_indev_deps_any="soundcard_h sys_soundcard_h"
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
sndio_indev_deps="sndio_h"
sndio_outdev_deps="sndio_h"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
x11_grab_device_indev_deps="x11grab XShmCreateImage"
x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
gopher_protocol_deps="network"
httpproxy_protocol_deps="network"
httpproxy_protocol_select="tcp_protocol"
http_protocol_deps="network"
http_protocol_select="tcp_protocol"
rtmp_protocol_select="tcp_protocol"
rtp_protocol_select="udp_protocol"
tcp_protocol_deps="network"
tls_protocol_deps_any="openssl gnutls"
tls_protocol_select="tcp_protocol"
udp_protocol_deps="network"
boxblur_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen strtok_r"
frei0r_src_filter_deps="frei0r dlopen strtok_r"
ocv_filter_deps="libopencv"
yadif_filter_deps="gpl"
# libraries
avdevice_deps="avcodec avformat"
avformat_deps="avcodec"
postproc_deps="gpl"
Vitor Sessak
committed
avconv_deps="avcodec avformat swscale"
avplay_deps="avcodec avformat swscale sdl"
avplay_select="rdft"
avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared"
# tests
test_deps(){
suf1=$1
suf2=$2
shift 2
for v; do
dep=${v%=*}
tests=${v#*=}
for name in ${tests}; do
append ${name}_test_deps ${dep}$suf1 ${dep}$suf2
done
done
}
mxf_d10_test_deps="avfilter"
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
test_deps _encoder _decoder \
adpcm_ima_qt \
adpcm_ima_wav \
adpcm_ms \
adpcm_swf \
adpcm_yamaha=adpcm_yam \
alac \
asv1 \
asv2 \
bmp \
dnxhd="dnxhd_1080i dnxhd_720p dnxhd_720p_rd" \
dvvideo="dv dv_411 dv50" \
ffv1 \
flac \
flashsv \
flv \
adpcm_g726=g726 \
gif \
h261 \
h263="h263 h263p" \
huffyuv \
jpegls \
mjpeg="jpg mjpeg ljpeg" \
mp2 \
mpeg1video="mpeg mpeg1b" \
mpeg2video="mpeg2 mpeg2_422 mpeg2_idct_int mpeg2_ilace mpeg2_ivlc_qprd" \
mpeg2video="mpeg2thread mpeg2thread_ilace" \
mpeg4="mpeg4 mpeg4_adap mpeg4_qpel mpeg4_qprd mpeg4adv mpeg4nr" \
mpeg4="mpeg4thread error rc" \
msmpeg4v2 \
pbm=pbmpipe \
pcx \
pgm="pgm pgmpipe" \
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
ppm="ppm ppmpipe" \
rawvideo="rgb yuv" \
roq \
rv10 \
rv20 \
sgi \
snow="snow snowll" \
svq1 \
targa=tga \
tiff \
wmav1 \
wmav2 \
wmv1 \
wmv2 \
test_deps _muxer _demuxer \
aiff \
pcm_alaw=alaw \
asf \
au \
avi \
dv=dv_fmt \
ffm \
flv=flv_fmt \
gxf \
matroska=mkv \
mmf \
mov \
pcm_mulaw=mulaw \
nut \
ogg \
rawvideo=pixfmt \
rm \
swf \
mpegts=ts \
voc \
wav \
yuv4mpegpipe=yuv4mpeg \
ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder"
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
logfile="config.log"
prefix_default="/usr/local"
bindir_default='${prefix}/bin'
datadir_default='${prefix}/share/avconv'
incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
shlibdir_default="$libdir_default"
cc_default="gcc"
Diego Biurrun
committed
cc_version=\"unknown\"
nm_default="nm"
arch_default=$(uname -m)
Guillaume Poirier
committed
cpu="generic"
target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
enable $PROGRAM_LIST
enable avcodec
enable avdevice
enable avfilter
enable swscale
enable asm
enable debug
enable doc
enable fastdiv
enable optimizations
enable safe_bitstream_reader
Cédric Schieli
committed
enable swscale_alpha
LIBPREF="lib"
LIBSUF=".a"
FULLNAME='$(NAME)$(BUILDSUF)'
LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
SLIBPREF="lib"
SLIBSUF=".so"
SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
AS_O='-o $@'
CC_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -O3 -g'
# since the object filename is not given with the -MM flag, the compiler
# is only able to print the basename, and we must add the path ourselves
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
# find source path
if test -f configure; then
else
source_path=$(cd $(dirname "$0"); pwd)
echo "$source_path" | grep -q '[[:blank:]]' &&
Diego Biurrun
committed
die "Out of tree builds are impossible with whitespace in source path."
test -e "$source_path/config.h" &&
die "Out of tree builds are impossible with config.h in source dir."
fi
r=${v#*=}
l=${v%"$r"}
r=$(sh_quote "$r")
LIBAV_CONFIGURATION="${LIBAV_CONFIGURATION# } ${l}${r}"
find_things(){
thing=$1
pattern=$2
file=$source_path/$3
sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
}
ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c)
DECODER_LIST=$(find_things decoder DEC libavcodec/allcodecs.c)
HWACCEL_LIST=$(find_things hwaccel HWACCEL libavcodec/allcodecs.c)
PARSER_LIST=$(find_things parser PARSER libavcodec/allcodecs.c)
BSF_LIST=$(find_things bsf BSF libavcodec/allcodecs.c)
MUXER_LIST=$(find_things muxer _MUX libavformat/allformats.c)
DEMUXER_LIST=$(find_things demuxer DEMUX libavformat/allformats.c)
OUTDEV_LIST=$(find_things outdev OUTDEV libavdevice/alldevices.c)
INDEV_LIST=$(find_things indev _IN libavdevice/alldevices.c)
PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
FILTER_LIST=$(find_things filter FILTER libavfilter/allfilters.c)
ALL_COMPONENTS="
$BSF_LIST
$DECODER_LIST
$DEMUXER_LIST
$ENCODER_LIST
$FILTER_LIST
$HWACCEL_LIST
$INDEV_LIST
$MUXER_LIST
$OUTDEV_LIST
$PARSER_LIST
$PROTOCOL_LIST
"
map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
}
ACODEC_TESTS=$(find_tests acodec)
VCODEC_TESTS=$(find_tests vsynth1)
LAVF_TESTS=$(find_tests lavf)
LAVFI_TESTS=$(find_tests lavfi)
SEEK_TESTS=$(find_tests seek seek_)
ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST))
for n in $COMPONENT_LIST; do
v=$(toupper ${n%s})_LIST
eval enable \$$v
eval ${n}_if_any="\$$v"
done
enable $ARCH_EXT_LIST $ALL_TESTS
die_unknown(){
echo "Unknown option \"$1\"."
echo "See $0 --help for available options."
exit 1
}
Panagiotis Issaris
committed
show_list() {
echo $* | sed s/$suffix//g | tr ' ' '\n' | sort | pr -3 -t
Panagiotis Issaris
committed
exit 0
}
for opt do
Diego Biurrun
committed
optval="${opt#*=}"
case "$opt" in
--extra-ldflags=*) add_ldflags $optval
Diego Biurrun
committed
;;
--extra-libs=*) add_extralibs $optval
Diego Biurrun
committed
;;
--disable-devices) disable $INDEV_LIST $OUTDEV_LIST
;;
--enable-debug=*) debuglevel="$optval"
;;
map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
Diego Biurrun
committed
--enable-*=*|--disable-*=*)
eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
eval list=\$$(toupper $thing)_LIST
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
$action $(filter "$name" $list)
Diego Biurrun
committed
;;
--enable-?*|--disable-?*)
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
if is_in $option $COMPONENT_LIST; then
test $action = disable && action=unset
eval $action \$$(toupper ${option%s})_LIST
elif is_in $option $CMDLINE_SELECT; then
$action $option
else
die_unknown $opt
fi
Diego Biurrun
committed
;;
--list-*)
NAME="${opt#--list-}"
is_in $NAME $COMPONENT_LIST || die_unknown $opt
NAME=${NAME%s}
eval show_list $NAME \$$(toupper $NAME)_LIST
;;
--help|-h) show_help
;;
*)
optname="${opt%%=*}"
optname="${optname#--}"
optname=$(echo "$optname" | sed 's/-/_/g')
if is_in $optname $CMDLINE_SET; then
eval $optname='$optval'
elif is_in $optname $CMDLINE_APPEND; then
append $optname "$optval"
else
die_unknown $opt
fi
Diego Biurrun
committed
;;
esac
done
echo "# $0 $LIBAV_CONFIGURATION" > $logfile
test -n "$cross_prefix" && enable cross_compile
if enabled cross_compile; then
test -n "$arch" && test -n "$target_os" ||
die "Must specify target arch and OS when cross-compiling"
fi
set_default arch target_os
ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}"
pkg_config_default="${cross_prefix}${pkg_config_default}"
ranlib="${cross_prefix}${ranlib}"
sysinclude_default="${sysroot}/usr/include"
set_default cc nm pkg_config sysinclude
enabled cross_compile || host_cc_default=$cc
set_default host_cc
if ! $pkg_config --version >/dev/null 2>&1; then
warn "$pkg_config not found, library detection may fail."
pkg_config=false
fi
exesuf() {
case $1 in
mingw32*|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
esac
}
EXESUF=$(exesuf $target_os)
HOSTEXESUF=$(exesuf $host_os)
: ${TMPDIR:=$TMP}
if ! check_cmd mktemp -u XXXXXX; then
# simple replacement for missing mktemp
# NOT SAFE FOR GENERAL USE
mktemp(){
echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
}
fi
tmpfile(){
tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
(set -C; exec > $tmp) 2>/dev/null ||
die "Unable to create temporary file in $TMPDIR."
append TMPFILES $tmp
eval $1=$tmp
}
trap 'rm -f -- $TMPFILES' EXIT
tmpfile TMPC .c
tmpfile TMPE $EXESUF
tmpfile TMPH .h
tmpfile TMPO .o
tmpfile TMPS .S
tmpfile TMPSH .sh
tmpfile TMPV .ver
# make sure we can execute files in $TMPDIR
cat > $TMPSH 2>> $logfile <<EOF
#! /bin/sh
EOF
chmod +x $TMPSH >> $logfile 2>&1
if ! $TMPSH >> $logfile 2>&1; then
cat <<EOF
Unable to create and execute files in $TMPDIR. Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
EOF
die "Sanity test failed."
fi
filter_asflags=echo
filter_cflags=echo
filter_cppflags=echo
if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
cc_type=llvm_gcc
cc_version=__VERSION__
gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
cc_ident="llvm-gcc $($cc -dumpversion) $gcc_extra_ver"
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
speed_cflags='-O3'
size_cflags='-Os'
elif $cc -v 2>&1 | grep -qi ^gcc; then
cc_type=gcc
Diego Biurrun
committed
cc_version=__VERSION__
gcc_version=$($cc --version | head -n1)
gcc_basever=$($cc -dumpversion)
gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
cc_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
if ! $cc -dumpversion | grep -q '^2\.'; then
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
fi
speed_cflags='-O3'
size_cflags='-Os'
elif $cc --version 2>/dev/null | grep -q Intel; then
cc_type=icc
cc_version="AV_STRINGIFY(__INTEL_COMPILER)"
cc_ident=$($cc --version | head -n1)
icc_version=$($cc -dumpversion)
CC_DEPFLAGS='-MMD'
AS_DEPFLAGS='-MMD'
speed_cflags='-O3'
size_cflags='-Os'
noopt_cflags='-O1'
elif $cc -v 2>&1 | grep -q xlc; then
cc_type=xlc
cc_version="AV_STRINGIFY(__IBMC__)"
cc_ident=$($cc -qversion 2>/dev/null | head -n1)
speed_cflags='-O5'
size_cflags='-O5 -qcompact'
elif $cc -V 2>/dev/null | grep -q Compaq; then
cc_type=ccc
cc_version="AV_STRINGIFY(__DECC_VER)"
cc_ident=$($cc -V | head -n1 | cut -d' ' -f1-3)
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -M'
debuglevel=3
add_ldflags -Wl,-z,now # calls to libots crash without this