X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=187ee5c77b02d91b6ff7fbd449544d2a86b59ae1;hb=45bae968a92633037e476a4892c4fa949ffe4508;hp=fc8529f39bf7c966ab3b28d7a3d5b5d7c6734941;hpb=f7ad5aa2e810ac3b341d1681db3288a404b001ee;p=ffmpeg diff --git a/configure b/configure index fc8529f39bf..187ee5c77b0 100755 --- a/configure +++ b/configure @@ -81,17 +81,13 @@ show_help(){ echo " --disable-ffplay disable ffplay build" echo " --disable-ffserver disable ffserver build" echo " --enable-postproc enable GPLed postprocessing support [no]" - echo " --enable-swscale enable GPLed software scaler support [no]" - echo " --enable-avfilter video filter support (replaces vhook) [no]" + echo " --enable-avfilter video filter support [no]" echo " --enable-avfilter-lavf video filters dependent on avformat [no]" - echo " --disable-vhook disable video hooking support" echo " --enable-beosthreads use BeOS threads [no]" echo " --enable-os2threads use OS/2 threads [no]" echo " --enable-pthreads use pthreads [no]" echo " --enable-w32threads use Win32 threads [no]" echo " --enable-x11grab enable X11 grabbing [no]" - echo " --enable-vdpau enable VDPAU support [no]" - echo " --enable-xvmc enable XvMC support [no]" echo " --disable-network disable network support [no]" echo " --disable-ipv6 disable IPv6 support [no]" echo " --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]" @@ -102,6 +98,7 @@ show_help(){ echo " --disable-fft disable FFT code" echo " --disable-golomb disable Golomb code" echo " --disable-mdct disable MDCT code" + echo " --disable-rdft disable RDFT code" echo " --enable-hardcoded-tables use hardcoded tables instead of runtime generation" echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers" echo " --enable-beos-netserver enable BeOS netserver" @@ -158,6 +155,7 @@ show_help(){ echo " --enable-libmp3lame enable MP3 encoding via libmp3lame [no]" echo " --enable-libnut enable NUT (de)muxing via libnut," echo " native (de)muxer exists [no]" + echo " --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]" echo " --enable-libschroedinger enable Dirac support via libschroedinger [no]" echo " --enable-libspeex enable Speex decoding via libspeex [no]" echo " --enable-libtheora enable Theora encoding via libtheora [no]" @@ -173,10 +171,13 @@ show_help(){ echo " --source-path=PATH path to source code [$source_path]" echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]" echo " --enable-cross-compile assume a cross-compiler is used" + echo " --sysroot=PATH root of cross-build tree" + echo " --sysinclude=PATH location of cross-build system headers" echo " --target-os=OS compiler targets OS [$target_os]" echo " --target-exec=CMD command to run executables on target" echo " --target-path=DIR path to view of build directory on target" echo " --nm=NM use nm tool" + echo " --as=AS use assembler AS [$as_default]" echo " --cc=CC use C compiler CC [$cc_default]" echo " --host-cc=HOSTCC use host C compiler HOSTCC" echo " --host-cflags=HCFLAGS use HCFLAGS when compiling for host" @@ -194,6 +195,7 @@ show_help(){ echo " (requires enabling PMC)" echo " --disable-altivec disable AltiVec optimizations" echo " --disable-amd3dnow disable 3DNow! optimizations" + echo " --disable-amd3dnowext disable 3DNow! extended optimizations" echo " --disable-mmx disable MMX optimizations" echo " --disable-mmx2 disable MMX2 optimizations" echo " --disable-sse disable SSE optimizations" @@ -206,6 +208,7 @@ show_help(){ echo " --disable-mmi disable MMI optimizations" echo " --disable-neon disable neon optimizations" echo " --disable-vis disable VIS optimizations" + echo " --disable-yasm disable use of yasm assembler" echo echo "Developer options (useful when working on FFmpeg itself):" echo " --disable-debug disable debugging symbols" @@ -252,7 +255,6 @@ Include the log file "$logfile" produced by configure as this will help solving the problem. EOF fi - rm -f $TMPC $TMPE $TMPH $TMPO $TMPS $TMPSH exit 1 } @@ -320,6 +322,14 @@ disable_weak(){ set_weak no $* } +enable_safe(){ + enable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g') +} + +disable_safe(){ + disable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g') +} + do_enable_deep(){ for var; do enabled $var && continue @@ -430,7 +440,7 @@ print_config(){ makefile=$3 shift 3 for cfg; do - ucname="`toupper $cfg`" + ucname="$(toupper $cfg)" if enabled $cfg; then echo "#define ${pfx}${ucname} 1" >> $header echo "${pfx}${ucname}=yes" >> $makefile @@ -514,12 +524,19 @@ check_cpp(){ check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC } +check_as(){ + log check_as "$@" + cat > $TMPC + log_file $TMPC + check_cmd $as $CFLAGS "$@" -c -o $TMPO $TMPC +} + check_asm(){ log check_asm "$@" name="$1" asm="$2" shift 2 - check_cc "$@" < int x; EOF @@ -591,7 +607,7 @@ check_func_headers(){ incs="$incs #include <$hdr>" done - check_ld "$@" < $tmp) 2>/dev/null || + die "Unable to create temoporary file in $TMPDIR." + append TMPFILES $tmp + eval $1=$tmp +} + +trap 'rm -f -- $TMPFILES' EXIT +trap exit HUP INT TERM + +tmpfile TMPC .c +tmpfile TMPE $EXESUF +tmpfile TMPH .h +tmpfile TMPO .o +tmpfile TMPS .S +tmpfile TMPSH .sh + +unset -f mktemp + +# make sure we can execute files in $TMPDIR +cat > $TMPSH 2>> $logfile <> $logfile 2>&1 +if ! $TMPSH >> $logfile 2>&1; then + cat </dev/null | grep -qi gcc; then + cc_type=gcc +elif $cc --version 2>/dev/null | grep -q Intel; then + cc_type=icc +elif $cc -v 2>&1 | grep -q xlc; then + cc_type=xlc +elif $cc -V 2>/dev/null | grep -q Compaq; then + cc_type=ccc + DEPEND_CMD='$(CC) $(CFLAGS) -M $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"' + debuglevel=3 + add_ldflags -Wl,-z,now # calls to libots crash without this +elif $cc --vsn 2>/dev/null | grep -q RVCT; then + test -d "$sysroot" || die "No valid sysroot specified." + cc_type=armcc + 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="$cc --arm_linux_config_file=$armcc_conf --translate_gcc" + as_default="${cross_prefix}gcc" +fi + +test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc" + +set_default as + +if test -n "$sysroot"; then + case "$cc_type" in + gcc) + add_cflags --sysroot="$sysroot" + add_ldflags --sysroot="$sysroot" + ;; + esac +fi + +# compiler sanity check +check_exec < +EOF +check_cc -D_LARGEFILE_SOURCE < +EOF case "$arch" in - i386|i486|i586|i686|i86pc|BePC) - arch="x86" - subarch="x86_32" - enable fast_unaligned - ;; - x86_64|amd64) - arch="x86" - subarch="x86_32" - enable cmov - enable fast_cmov - enable fast_unaligned - check_cc <&1 | grep -q xlc; then + if enabled xlc; then add_cflags -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto else add_cflags -pipe @@ -1712,7 +1810,7 @@ if test $cpu != "generic"; then add_cflags -mcpu=$cpu ;; ev4|ev45|ev5|ev56|pca56|ev6|ev67) - add_cflags -mcpu=$cpu + enabled ccc && add_cflags -arch $cpu || add_cflags -mcpu=$cpu ;; *) echo "WARNING: Unknown CPU \"$cpu\", ignored." @@ -1720,40 +1818,15 @@ if test $cpu != "generic"; then esac fi -# make sure we can execute files in $TMPDIR -cat > $TMPSH 2>> $logfile <> $logfile 2>&1 -if ! $TMPSH >> $logfile 2>&1; then - cat < /dev/null 2>&1; then - sdl_cflags=`"${SDL_CONFIG}" --cflags` + sdl_cflags=$("${SDL_CONFIG}" --cflags) temp_cflags $sdl_cflags - temp_extralibs `"${SDL_CONFIG}" --libs` + temp_extralibs $("${SDL_CONFIG}" --libs) if check_lib2 SDL.h SDL_Init; then - _sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'` + _sdlversion=$("${SDL_CONFIG}" --version | sed 's/[^0-9]//g') if test "$_sdlversion" -lt 121 ; then enable sdl_too_old else @@ -2051,7 +2122,6 @@ check_header dev/ic/bt8xx.h check_header sys/soundcard.h check_header soundcard.h -check_header alsa/asoundlib.h && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound # deal with the X11 frame grabber @@ -2087,9 +2157,11 @@ if enabled small; then check_cflags -Os # not all compilers support -Os optimizations="small" elif enabled optimizations; then - if $cc -v 2>&1 | grep -q xlc; then + if enabled xlc; then add_cflags -O5 add_ldflags -O5 + elif enabled ccc; then + add_cflags -fast else add_cflags -O3 fi @@ -2098,19 +2170,29 @@ check_cflags -fno-math-errno check_cflags -fno-signed-zeros # add some flags for Intel C Compiler -if $cc --version 2> /dev/null | grep -q Intel; then - # Just warnings, no remarks - check_cflags -w1 - # -wd: Disable following warnings - # 144, 167, 556: -Wno-pointer-sign - # 10006: ignoring unknown option -fno-signed-zeros - # 10156: ignoring option '-W'; no argument required - check_cflags -wd144,167,556,10006,10156 - # 11030: Warning unknown option --as-needed - # 10156: ignoring option '-export'; no argument required - check_ldflags -wd10156,11030 - # Allow to compile with optimizations - check_ldflags -march=$cpu +if enabled icc; then + # Just warnings, no remarks + check_cflags -w1 + # -wd: Disable following warnings + # 144, 167, 556: -Wno-pointer-sign + # 10006: ignoring unknown option -fno-signed-zeros + # 10156: ignoring option '-W'; no argument required + check_cflags -wd144,167,556,10006,10156 + # 11030: Warning unknown option --as-needed + # 10156: ignoring option '-export'; no argument required + check_ldflags -wd10156,11030 + # Allow to compile with optimizations + check_ldflags -march=$cpu + # icc 11.0 and 11.1 work with ebp_available, but don't pass the test + enable ebp_available +elif enabled ccc; then + # disable some annoying warnings + add_cflags -msg_disable cvtu32to64 + add_cflags -msg_disable embedcomment + add_cflags -msg_disable needconstext + add_cflags -msg_disable nomainieee + add_cflags -msg_disable ptrmismatch1 + add_cflags -msg_disable unreachcode fi # PIC flags for shared library objects where they are needed @@ -2128,8 +2210,6 @@ if enabled gprof; then add_ldflags -p fi -VHOOKCFLAGS="-fPIC" - # Find out if the .align argument is a power of two or not. check_asm asmalign_pot '".align 3"' @@ -2176,12 +2256,14 @@ if enabled x86; then echo "MMX enabled ${mmx-no}" echo "MMX2 enabled ${mmx2-no}" echo "3DNow! enabled ${amd3dnow-no}" + echo "3DNow! extended enabled ${amd3dnowext-no}" echo "SSE enabled ${sse-no}" echo "SSSE3 enabled ${ssse3-no}" echo "CMOV enabled ${cmov-no}" echo "CMOV is fast ${fast_cmov-no}" echo "EBX available ${ebx_available-no}" echo "EBP available ${ebp_available-no}" + echo "10 operands supported ${ten_operands-no}" fi if enabled arm; then echo "ARMv5TE enabled ${armv5te-no}" @@ -2210,14 +2292,8 @@ echo "optimizations ${optimizations-no}" echo "static ${static-no}" echo "shared ${shared-no}" echo "postprocessing support ${postproc-no}" -echo "software scaler enabled ${swscale-no}" echo "new filter support ${avfilter-no}" echo "filters using lavformat ${avfilter_lavf-no}" -echo "video hooking ${vhook-no}" -if enabled vhook; then - echo "Imlib2 support ${imlib2-no}" - echo "FreeType support ${freetype2-no}" -fi echo "network support ${network-no}" if enabled network; then echo "IPv6 support ${ipv6-no}" @@ -2239,13 +2315,13 @@ echo "libfaad dlopened ${libfaadbin-no}" echo "libgsm enabled ${libgsm-no}" echo "libmp3lame enabled ${libmp3lame-no}" echo "libnut enabled ${libnut-no}" +echo "libopenjpeg enabled ${libopenjpeg-no}" echo "libschroedinger enabled ${libschroedinger-no}" echo "libspeex enabled ${libspeex-no}" echo "libtheora enabled ${libtheora-no}" echo "libvorbis enabled ${libvorbis-no}" echo "libx264 enabled ${libx264-no}" echo "libxvid enabled ${libxvid-no}" -echo "vdpau enabled ${vdpau-no}" echo "zlib enabled ${zlib-no}" echo "bzlib enabled ${bzlib-no}" echo @@ -2286,6 +2362,7 @@ echo "BINDIR=\$(DESTDIR)$bindir" >> config.mak echo "DATADIR=\$(DESTDIR)$datadir" >> config.mak echo "MANDIR=\$(DESTDIR)$mandir" >> config.mak echo "CC=$cc" >> config.mak +echo "AS=$as" >> config.mak echo "YASM=$yasmexe" >> config.mak echo "AR=$ar" >> config.mak echo "RANLIB=$ranlib" >> config.mak @@ -2295,13 +2372,10 @@ enabled stripping && echo "STRIP=echo ignoring strip" >> config.mak echo "OPTFLAGS=$CFLAGS" >> config.mak -echo "VHOOKCFLAGS=$VHOOKCFLAGS" >> config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak echo "SHFLAGS=$SHFLAGS" >> config.mak echo "YASMFLAGS=$YASMFLAGS" >> config.mak -echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak -echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak echo "BUILD_STATIC=$static" >> config.mak echo "BUILDSUF=$build_suffix" >> config.mak @@ -2316,6 +2390,7 @@ echo "EXTRA_VERSION=$extra_version" >> config.mak echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak echo "HOSTCC=$host_cc" >> config.mak echo "HOSTCFLAGS=$host_cflags" >> config.mak +echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak echo "HOSTLDFLAGS=$host_ldflags" >> config.mak echo "HOSTLIBS=$host_libs" >> config.mak echo "TARGET_EXEC=$target_exec" >> config.mak @@ -2327,8 +2402,8 @@ if enabled bigendian; then fi if enabled sdl; then - echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak - echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak + echo "SDL_LIBS=$("${SDL_CONFIG}" --libs)" >> config.mak + echo "SDL_CFLAGS=$("${SDL_CONFIG}" --cflags)" >> config.mak fi if enabled texi2html; then echo "BUILD_DOC=yes" >> config.mak @@ -2408,8 +2483,6 @@ cmp -s $TMPH config.h && echo "config.h is unchanged" || mv -f $TMPH config.h -rm -f $TMPC $TMPE $TMPH $TMPO $TMPS $TMPSH - # build tree in object directory if source path is different from current one if enabled source_path_used; then DIRS="\ @@ -2431,7 +2504,6 @@ if enabled source_path_used; then libswscale \ tests \ tools \ - vhook \ " FILES="\ Makefile \ @@ -2504,9 +2576,4 @@ enabled avfilter && pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" enabled postproc && pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" -if enabled swscale; then - pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" -else - pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavcodec = $LIBAVCODEC_VERSION" - apply libswscale/libswscale.pc sed s/^Libs:.*$/Libs:/ -fi +pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"