--enable-x11grab enable X11 grabbing [no]
--disable-network disable network support [no]
--disable-dct disable DCT code
+ --disable-dwt disable DWT code
+ --disable-lsp disable LSP code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--disable-fft disable FFT code
and libraw1394 [no]
--enable-libfaac enable AAC encoding via libfaac [no]
--enable-libfdk-aac enable AAC encoding via libfdk-aac [no]
+ --enable-libflite enable flite (voice synthesis) support via libflite [no]
--enable-libfreetype enable libfreetype [no]
--enable-libgsm enable GSM de/encoding via libgsm [no]
--enable-libiec61883 enable iec61883 via libiec61883 [no]
--yasmexe=EXE use yasm-compatible assembler EXE [$yasmexe_default]
--cc=CC use C compiler CC [$cc_default]
--cxx=CXX use C compiler CXX [$cxx_default]
+ --dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
--ld=LD use linker LD [$ld_default]
--host-cc=HOSTCC use host C compiler HOSTCC
--host-cflags=HCFLAGS use HCFLAGS when compiling for host
--host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
--host-libs=HLIBS use libs HLIBS when linking for host
+ --host-os=OS compiler host OS [$target_os]
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
--extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
--extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix []
- --optflags override optimization-related compiler flags
+ --optflags=OPTFLAGS override optimization-related compiler flags
--build-suffix=SUFFIX library name suffix []
--malloc-prefix=PREFIX prefix malloc and related names with PREFIX
--progs-suffix=SUFFIX program name suffix []
instruction selection, may crash on older CPUs)
--enable-pic build position-independent code
--enable-sram allow use of on-chip SRAM
+ --enable-thumb compile for Thumb instruction set
--disable-symver disable symbol versioning
--disable-fastdiv disable table-based division
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
--disable-sse disable SSE optimizations
--disable-ssse3 disable SSSE3 optimizations
--disable-avx disable AVX optimizations
+ --disable-fma4 disable FMA4 optimizations
--disable-armv5te disable armv5te optimizations
--disable-armv6 disable armv6 optimizations
--disable-armv6t2 disable armv6t2 optimizations
eval printf '%s\\n' $CC_O
}
+cc_e(){
+ eval printf '%s\\n' $CC_E
+}
+
check_cc(){
log check_cc "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c $(cc_o $TMPO) $TMPC
+ check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPC
}
check_cxx(){
log check_cxx "$@"
cat > $TMPCPP
log_file $TMPCPP
- check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" -c -o $TMPO $TMPCPP
+ check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
}
check_cpp(){
log check_cpp "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $cc $CPPFLAGS $CFLAGS "$@" -E -o $TMPO $TMPC
+ check_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
}
check_as(){
log check_as "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $as $CPPFLAGS $ASFLAGS "$@" -c -o $TMPO $TMPC
+ check_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C -o $TMPO $TMPC
}
check_asm(){
CONFIG_LIST="
$COMPONENT_LIST
$PROGRAM_LIST
- ac3dsp
avcodec
avdevice
avfilter
fft
fontconfig
frei0r
- gcrypt
gnutls
gpl
gray
libdc1394
libfaac
libfdk_aac
+ libflite
libfreetype
libgsm
libiec61883
mdct
memalign_hack
memory_poisoning
- mpegaudiodsp
- nettle
network
nonfree
openal
pic
postproc
rdft
- rtpdec
runtime_cpudetect
safe_bitstream_reader
shared
- sinewin
small
sram
static
armv6t2
armvfp
avx
+ fma4
mmi
mmx
mmx2
# options emitted with CONFIG_ prefix but not available on command line
CONFIG_EXTRA="
- aandct
+ aandcttables
+ ac3dsp
avutil
+ gcrypt
golomb
gplv3
h264chroma
huffman
lgplv3
lpc
+ mpegaudiodsp
+ nettle
+ rtpdec
+ sinewin
vp3dsp
"
sse_deps="mmx"
ssse3_deps="sse"
avx_deps="ssse3"
+fma4_deps="avx"
aligned_stack_if_any="ppc x86"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
alac_encoder_select="lpc"
amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp"
-amv_encoder_select="aandct"
+amv_encoder_select="aandcttables"
atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
cscd_decoder_suggest="zlib"
dca_decoder_select="mdct"
dirac_decoder_select="dwt golomb"
-dnxhd_encoder_select="aandct"
+dnxhd_encoder_select="aandcttables"
dxa_decoder_select="zlib"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="mdct ac3dsp"
-eamad_decoder_select="aandct"
-eatgq_decoder_select="aandct"
-eatqi_decoder_select="aandct"
+eamad_decoder_select="aandcttables"
+eatgq_decoder_select="aandcttables"
+eatqi_decoder_select="aandcttables"
exr_decoder_select="zlib"
ffv1_decoder_select="golomb"
flac_decoder_select="golomb"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
fraps_decoder_select="huffman"
-h261_encoder_select="aandct"
+h261_encoder_select="aandcttables"
h263_decoder_select="h263_parser"
-h263_encoder_select="aandct"
+h263_encoder_select="aandcttables"
h263_vaapi_hwaccel_select="vaapi h263_decoder"
h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
-ljpeg_encoder_select="aandct"
+ljpeg_encoder_select="aandcttables"
loco_decoder_select="golomb"
-mjpeg_encoder_select="aandct"
+mjpeg_encoder_select="aandcttables"
mlp_decoder_select="mlp_parser"
mp1_decoder_select="mpegaudiodsp"
mp1float_decoder_select="mpegaudiodsp"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder"
-mpeg1video_encoder_select="aandct"
+mpeg1video_encoder_select="aandcttables"
mpeg2_crystalhd_decoder_select="crystalhd"
mpeg2_dxva2_hwaccel_deps="dxva2api_h"
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder"
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
-mpeg2video_encoder_select="aandct"
+mpeg2video_encoder_select="aandcttables"
mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
mpeg4_encoder_select="h263_encoder"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
snow_decoder_select="dwt"
-snow_encoder_select="aandct dwt"
+snow_encoder_select="aandcttables dwt"
sonic_decoder_select="golomb"
sonic_encoder_select="golomb"
sonic_ls_encoder_select="golomb"
-svq1_encoder_select="aandct"
+svq1_encoder_select="aandcttables"
svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel"
svq3_decoder_suggest="zlib"
theora_decoder_select="vp3_decoder"
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"
+x11grab_indev_deps="x11grab"
# protocols
bluray_protocol_deps="libbluray"
delogo_filter_deps="gpl"
deshake_filter_deps="avcodec"
drawtext_filter_deps="libfreetype"
+flite_filter_deps="libflite"
frei0r_filter_deps="frei0r dlopen"
frei0r_filter_extralibs='$ldl'
frei0r_src_filter_deps="frei0r dlopen"
cflags_filter=echo
ldflags_filter=echo
+AS_C='-c'
AS_O='-o $@'
+CC_C='-c'
+CC_E='-E -o $@'
CC_O='-o $@'
+CXX_C='-c'
CXX_O='-o $@'
+LD_O='-o $@'
+HOSTCC_C='-c'
+HOSTCC_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
host_libs='-lm'
# 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'
+DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
+DEPFLAGS='-MM'
# find source path
if test -f configure; then
done
}
-if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
- cc_type=llvm_gcc
- 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 $@'
- cflags_speed='-O3'
- cflags_size='-Os'
-elif $cc -v 2>&1 | grep -qi ^gcc; then
- cc_type=gcc
- 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 $@'
+probe_cc(){
+ pfx=$1
+ _cc=$2
+
+ unset _type _ident _cc_c _cc_e _cc_o _flags _cflags _ldflags
+ unset _depflags _DEPCMD _DEPFLAGS
+ _flags_filter=echo
+
+ if $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
+ _type=llvm_gcc
+ gcc_extra_ver=$(expr "$($_cc --version | head -n1)" : '.*\((.*)\)')
+ _ident="llvm-gcc $($_cc -dumpversion) $gcc_extra_ver"
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc -v 2>&1 | grep -qi ^gcc; then
+ _type=gcc
+ 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 \\(.*\\)")
+ _ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
+ if ! $_cc -dumpversion | grep -q '^2\.'; then
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ fi
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc --version 2>/dev/null | grep -q Intel; then
+ _type=icc
+ _ident=$($_cc --version | head -n1)
+ _depflags='-MMD'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ _cflags_noopt='-O1'
+ elif $_cc -v 2>&1 | grep -q xlc; then
+ _type=xlc
+ _ident=$($_cc -qversion 2>/dev/null | head -n1)
+ _cflags_speed='-O5'
+ _cflags_size='-O5 -qcompact'
+ elif $_cc -V 2>/dev/null | grep -q Compaq; then
+ _type=ccc
+ _ident=$($_cc -V | head -n1 | cut -d' ' -f1-3)
+ _DEPFLAGS='-M'
+ debuglevel=3
+ _ldflags='-Wl,-z,now' # calls to libots crash without this
+ _cflags_speed='-fast'
+ _cflags_size='-O1'
+ elif $_cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
+ test -d "$sysroot" || die "No valid sysroot specified."
+ _type=armcc
+ _ident=$($_cc --vsn | head -n1)
+ armcc_conf="$PWD/armcc.conf"
+ $_cc --arm_linux_configure \
+ --arm_linux_config_file="$armcc_conf" \
+ --configure_sysroot="$sysroot" \
+ --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
+ die "Error creating armcc configuration file."
+ $_cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
+ _flags="--arm_linux_config_file=$armcc_conf --translate_gcc"
+ as_default="${cross_prefix}gcc"
+ _depflags='-MMD'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc -version 2>/dev/null | grep -q TMS470; then
+ _type=tms470
+ _ident=$($_cc -version | head -n1 | tr -s ' ')
+ _flags='--gcc --abi=eabi -me'
+ _cflags='-D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__='
+ _cc_e='-ppl -fe=$@'
+ _cc_o='-fe=$@'
+ as_default="${cross_prefix}gcc"
+ ld_default="${cross_prefix}gcc"
+ _depflags='-ppa -ppd=$(@:.o=.d)'
+ _cflags_speed='-O3 -mf=5'
+ _cflags_size='-O3 -mf=2'
+ _flags_filter=tms470_flags
+ elif $_cc -v 2>&1 | grep -q clang; then
+ _type=clang
+ _ident=$($_cc --version | head -n1)
+ _depflags='-MMD'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc -V 2>&1 | grep -q Sun; then
+ _type=suncc
+ _ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+ _DEPFLAGS='-xM1'
+ _ldflags='-std=c99'
+ _cflags_speed='-O5'
+ _cflags_size='-O5 -xspace'
+ _flags_filter=suncc_flags
+ elif $_cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
+ _type=pathscale
+ _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O2'
+ _cflags_size='-Os'
+ _flags_filter='filter_out -Wdisabled-optimization'
+ elif $_cc -v 2>&1 | grep -q Open64; then
+ _type=open64
+ _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O2'
+ _cflags_size='-Os'
+ _flags_filter='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
+ elif $_cc -V 2>&1 | grep -q Portland; then
+ _type=pgi
+ _ident="PGI $($_cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')"
+ opt_common='-alias=ansi -Mlre -Mpre'
+ _cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common"
+ _cflags_size="-O2 -Munroll=c:1 $opt_common"
+ _cflags_noopt="-O1"
+ _flags_filter=pgi_flags
fi
- cflags_speed='-O3'
- cflags_size='-Os'
-elif $cc --version 2>/dev/null | grep -q Intel; then
- cc_type=icc
- cc_ident=$($cc --version | head -n1)
- CC_DEPFLAGS='-MMD'
- AS_DEPFLAGS='-MMD'
- cflags_speed='-O3'
- cflags_size='-Os'
- cflags_noopt='-O1'
-elif $cc -v 2>&1 | grep -q xlc; then
- cc_type=xlc
- cc_ident=$($cc -qversion 2>/dev/null | head -n1)
- cflags_speed='-O5'
- cflags_size='-O5 -qcompact'
-elif $cc -V 2>/dev/null | grep -q Compaq; then
- cc_type=ccc
- 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
- cflags_speed='-fast'
- cflags_size='-O1'
-elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
- test -d "$sysroot" || die "No valid sysroot specified."
- cc_type=armcc
- cc_ident=$($cc --vsn | head -n1)
- armcc_conf="$PWD/armcc.conf"
- $cc --arm_linux_configure \
- --arm_linux_config_file="$armcc_conf" \
- --configure_sysroot="$sysroot" \
- --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
- die "Error creating armcc configuration file."
- $cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
- cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
- as_default="${cross_prefix}gcc"
- CC_DEPFLAGS='-MMD'
- AS_DEPFLAGS='-MMD'
- cflags_speed='-O3'
- cflags_size='-Os'
- asflags_filter="filter_out -W${armcc_opt}*"
-elif $cc -version 2>/dev/null | grep -q TMS470; then
- cc_type=tms470
- cc_ident=$($cc -version | head -n1 | tr -s ' ')
- cc="$cc --gcc --abi=eabi -me"
- CC_O='-fe=$@'
- as_default="${cross_prefix}gcc"
- ld_default="${cross_prefix}gcc"
- add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=
- CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)'
- AS_DEPFLAGS='-MMD'
- cflags_speed='-O3 -mf=5'
- cflags_size='-O3 -mf=2'
- cflags_filter=tms470_flags
-elif $cc -v 2>&1 | grep -q clang; then
- cc_type=clang
- cc_ident=$($cc --version | head -n1)
- CC_DEPFLAGS='-MMD'
- AS_DEPFLAGS='-MMD'
- cflags_speed='-O3'
- cflags_size='-Os'
-elif $cc -V 2>&1 | grep -q Sun; then
- cc_type=suncc
- cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
- DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
- DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
- add_ldflags -xc99
- cflags_speed='-O5'
- cflags_size='-O5 -xspace'
- cflags_filter=suncc_flags
-elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
- cc_type=pathscale
- cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
- CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
- AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
- cflags_speed='-O2'
- cflags_size='-Os'
- cflags_filter='filter_out -Wdisabled-optimization'
-elif $cc -v 2>&1 | grep -q Open64; then
- cc_type=open64
- cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
- CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
- AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
- cflags_speed='-O2'
- cflags_size='-Os'
- cflags_filter='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
-elif $cc -V 2>&1 | grep -q Portland; then
- cc_type=pgi
- cc_ident="PGI $($cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')"
- opt_common='-alias=ansi -Mlre -Mpre'
- cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common"
- cflags_size="-O2 -Munroll=c:1 $opt_common"
- cflags_noopt="-O1"
- cflags_filter=pgi_flags
-fi
+
+ eval ${pfx}_type=\$_type
+ eval ${pfx}_ident=\$_ident
+}
+
+set_ccvars(){
+ eval ${1}_C=\${_cc_c-\${${1}_C}}
+ eval ${1}_E=\${_cc_e-\${${1}_E}}
+ eval ${1}_O=\${_cc_o-\${${1}_O}}
+
+ if [ -n "$_depflags" ]; then
+ eval ${1}_DEPFLAGS=\$_depflags
+ else
+ eval ${1}DEP=\${_DEPCMD:-\$DEPCMD}
+ eval ${1}DEP_FLAGS=\${_DEPFLAGS:-\$DEPFLAGS}
+ eval DEP${1}FLAGS=\$_flags
+ fi
+}
+
+probe_cc cc "$cc"
+cflags_filter=$_flags_filter
+cflags_speed=$_cflags_speed
+cflags_size=$_cflags_size
+cflags_noopt=$_cflags_noopt
+add_cflags $_flags $_cflags
+cc_ldflags=$_ldflags
+set_ccvars CC
+
+probe_cc hostcc "$host_cc"
+host_cflags_filter=$_flags_filter
+host_ldflags_filter=$_flags_filter
+add_host_cflags $_flags $_cflags
+add_host_ldflags $_flags $_ldflags
+set_ccvars HOSTCC
test -n "$cc_type" && enable $cc_type ||
warn "Unknown C compiler $cc, unable to select optimal CFLAGS"
: ${ld_default:=$cc}
set_default ar as dep_cc ld
-test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD
-test -n "$CXX_DEPFLAGS" || CXXDEP=$DEPEND_CMD
-test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD
+probe_cc as "$as"
+asflags_filter=$_flags_filter
+add_asflags $_flags $_cflags
+set_ccvars AS
+
+probe_cc ld "$ld"
+ldflags_filter=$_flags_filter
+add_ldflags $_flags $_ldflags
+test "$cc_type" != "$ld_type" && add_ldflags $cc_ldflags
+LD_O=${_cc_o-$LD_O}
+
+if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
+ probe_cc depcc "$dep_cc"
+ CCDEP=${_DEPCMD:-$DEPCMD}
+ CCDEP_FLAGS=${_DEPFLAGS:=$DEPFLAGS}
+ DEPCCFLAGS=$_flags
+fi
add_cflags $extra_cflags
add_cxxflags $extra_cxxflags
fi
LIBTARGET=i386
if enabled x86_64; then
- LIBTARGET=x64
+ LIBTARGET="i386:x86-64"
elif enabled arm; then
LIBTARGET=arm-wince
fi
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
- SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ dlltool="${cross_prefix}dlltool"
+ if check_cmd lib.exe; then
+ SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ if enabled x86_64; then
+ LIBTARGET=x64
+ fi
+ elif check_cmd $dlltool --version; then
+ SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+ fi
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
SLIB_INSTALL_LINKS=
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
+ check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
fi
case "$cpu" in
enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
+flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+enabled libflite && require2 libflite "flite/flite.h" flite_init $flite_libs
enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
echo "SSE enabled ${sse-no}"
echo "SSSE3 enabled ${ssse3-no}"
echo "AVX enabled ${avx-no}"
+ echo "FMA4 enabled ${fma4-no}"
echo "CMOV enabled ${cmov-no}"
echo "CMOV is fast ${fast_cmov-no}"
echo "EBX available ${ebx_available-no}"
AS=$as
LD=$ld
DEPCC=$dep_cc
+DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)
+DEPAS=$as
+DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
+DLLTOOL=$dlltool
YASM=$yasmexe
-YASMDEP=$yasmexe
+DEPYASM=$yasmexe
AR=$ar
RANLIB=$ranlib
CP=cp -p
CFLAGS=$CFLAGS
CXXFLAGS=$CXXFLAGS
ASFLAGS=$ASFLAGS
-AS_O=$CC_O
+AS_C=$AS_C
+AS_O=$AS_O
+CC_C=$CC_C
CC_O=$CC_O
+CXX_C=$CXX_C
CXX_O=$CXX_O
+LD_O=$LD_O
LDFLAGS=$LDFLAGS
FFSERVERLDFLAGS=$FFSERVERLDFLAGS
SHFLAGS=$SHFLAGS
SLIBSUF=$SLIBSUF
EXESUF=$EXESUF
EXTRA_VERSION=$extra_version
-DEPFLAGS=$DEPFLAGS
CCDEP=$CCDEP
CXXDEP=$CXXDEP
+CCDEP_FLAGS=$CCDEP_FLAGS
ASDEP=$ASDEP
+ASDEP_FLAGS=$ASDEP_FLAGS
CC_DEPFLAGS=$CC_DEPFLAGS
AS_DEPFLAGS=$AS_DEPFLAGS
HOSTCC=$host_cc
HOSTEXESUF=$HOSTEXESUF
HOSTLDFLAGS=$host_ldflags
HOSTLIBS=$host_libs
+DEPHOSTCC=$host_cc
+DEPHOSTCCFLAGS=$DEPHOSTCCFLAGS \$(HOSTCCFLAGS)
+HOSTCCDEP=$HOSTCCDEP
+HOSTCCDEP_FLAGS=$HOSTCCDEP_FLAGS
+HOSTCC_DEPFLAGS=$HOSTCC_DEPFLAGS
+HOSTCC_C=$HOSTCC_C
+HOSTCC_O=$HOSTCC_O
TARGET_EXEC=$target_exec
TARGET_PATH=$target_path
SDL_LIBS=$sdl_libs