X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=d8a57284c9ae3dcd634c8140c8c40e91323d2afd;hb=52d113ee06ba136e530c11e651a5ae085384d49c;hp=8a59262299e0b10287b95dd2f35dba40dbaee2ac;hpb=2a8a860ae65b0c1c955f148d8697cc30adc71cf3;p=ffmpeg diff --git a/configure b/configure index 8a59262299e..d8a57284c9a 100755 --- a/configure +++ b/configure @@ -54,6 +54,8 @@ if test "$E1" != 0 || test "$E2" = 0; then exit 1 fi +test -d /usr/xpg4/bin && PATH=/usr/xpg4/bin:$PATH + show_help(){ cat </dev/null | grep -q TMS470; then + elif $_cc -version 2>/dev/null | grep -Eq 'TMS470|TI ARM'; 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' @@ -2305,7 +2327,7 @@ probe_cc(){ 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' + opt_common='-alias=ansi -Mdse -Mlre -Mpre' _cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common" _cflags_size="-O2 -Munroll=c:1 $opt_common" _cflags_noopt="-O1" @@ -2401,6 +2423,17 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then DEPCCFLAGS=$_flags fi +if $ar 2>&1 | grep -q Microsoft; then + arflags="-nologo" + ar_o='-out:$@' +elif $ar 2>&1 | grep -q 'Texas Instruments'; then + arflags="rq" + ar_o='$@' +else + arflags="rc" + ar_o='$@' +fi + add_cflags $extra_cflags add_asflags $extra_cflags @@ -2760,7 +2793,6 @@ case $target_os in dlltool="${cross_prefix}dlltool" ranlib=: enable dos_paths - check_cflags -fno-common add_cppflags -U__STRICT_ANSI__ ;; cygwin*) @@ -2776,7 +2808,6 @@ case $target_os in SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a' objformat="win32" enable dos_paths - check_cflags -fno-common add_cppflags -U__STRICT_ANSI__ ;; *-dos|freedos|opendos) @@ -2838,6 +2869,12 @@ case $target_os in -l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \ -l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib ;; + osf1) + add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT + AVSERVERLDFLAGS= + ;; + minix) + ;; none) ;; *) @@ -2871,6 +2908,16 @@ fi test -n "$libc_type" && enable $libc_type +# hacks for compiler/libc/os combinations + +if enabled_all tms470 glibc; then + CPPFLAGS="-I${source_path}/compat/tms470 ${CPPFLAGS}" + add_cppflags -D__USER_LABEL_PREFIX__= + add_cppflags -D__builtin_memset=memset + add_cppflags -D__gnuc_va_list=va_list -D_VA_LIST_DEFINED + add_cflags -pds=48 # incompatible redefinition of macro +fi + esc(){ echo "$*" | sed 's/%/%25/g;s/:/%3a/g' } @@ -2992,7 +3039,6 @@ EOF elif enabled mips; then check_inline_asm loongson '"dmult.g $1, $2, $3"' - enabled mmi && check_inline_asm mmi '"lq $2, 0($2)"' elif enabled ppc; then @@ -3032,10 +3078,7 @@ elif enabled sparc; then elif enabled x86; then - check_code ld immintrin.h "return __xgetbv(0)" && enable xgetbv - check_code ld intrin.h "int info[4]; __cpuid(info, 0)" && enable cpuid check_code ld intrin.h "__rdtsc()" && enable rdtsc - check_code ld intrin.h "unsigned int x = __readeflags()" && enable rweflags check_code ld mmintrin.h "_mm_empty()" && enable mm_empty @@ -3171,6 +3214,7 @@ check_func sysctl check_func usleep check_func_headers io.h setmode check_lib2 "windows.h shellapi.h" CommandLineToArgvW -lshell32 +check_lib2 "windows.h wincrypt.h" CryptGenRandom -ladvapi32 check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi check_func_headers windows.h GetProcessAffinityMask check_func_headers windows.h GetProcessTimes @@ -3265,6 +3309,7 @@ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_de enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg +enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init @@ -3408,17 +3453,31 @@ void ff_foo(void) {} EOF fi -if [ -n "$optflags" ]; then - add_cflags $optflags -elif enabled small; then - add_cflags $cflags_size -elif enabled optimizations; then - add_cflags $cflags_speed -else - add_cflags $cflags_noopt +if [ -z "$optflags" ]; then + if enabled small; then + optflags=$cflags_size + elif enabled optimizations; then + optflags=$cflags_speed + else + optflags=$cflags_noopt + fi fi -check_cflags -fno-math-errno -check_cflags -fno-signed-zeros + +check_optflags(){ + check_cflags "$@" + enabled lto && check_ldflags "$@" +} + + +if enabled lto; then + test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker" + check_cflags -flto + check_ldflags -flto $cpuflags +fi + +check_optflags $optflags +check_optflags -fno-math-errno +check_optflags -fno-signed-zeros if enabled icc; then # Just warnings, no remarks @@ -3453,10 +3512,11 @@ elif enabled ccc; then add_cflags -msg_disable ptrmismatch1 add_cflags -msg_disable unreachcode elif enabled gcc; then - check_cflags -fno-tree-vectorize + check_optflags -fno-tree-vectorize check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes check_cflags -Werror=declaration-after-statement + check_cflags -Werror=vla elif enabled llvm_gcc; then check_cflags -mllvm -stack-alignment=16 elif enabled clang; then @@ -3525,9 +3585,6 @@ if enabled arm; then echo "ARM VFP enabled ${armvfp-no}" echo "NEON enabled ${neon-no}" fi -if enabled mips; then - echo "MMI enabled ${mmi-no}" -fi if enabled ppc; then echo "AltiVec enabled ${altivec-no}" echo "PPC 4xx optimizations ${ppc4xx-no}" @@ -3563,6 +3620,7 @@ echo "libopencore-amrnb support ${libopencore_amrnb-no}" echo "libopencore-amrwb support ${libopencore_amrwb-no}" echo "libopencv support ${libopencv-no}" echo "libopenjpeg enabled ${libopenjpeg-no}" +echo "libopus enabled ${libopus-no}" echo "libpulse enabled ${libpulse-no}" echo "librtmp enabled ${librtmp-no}" echo "libschroedinger enabled ${libschroedinger-no}" @@ -3631,6 +3689,8 @@ DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS) YASM=$yasmexe DEPYASM=$yasmexe AR=$ar +ARFLAGS=$arflags +AR_O=$ar_o RANLIB=$ranlib LN_S=$ln_s CPPFLAGS=$CPPFLAGS