[FFmpeg-devel] [PATCH] Other configure version check patches
Måns Rullgård
mans
Sat Oct 18 21:51:01 CEST 2008
Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> Hi,
>
> MinGW patche by Ramiro, this patch also suggest a better way to convey
> the meaning of the check to the user, so I think that
> require_cpp_condition() may be safely removed.
>
> Regards.
> --
> FFmpeg = Frightening and Funny Magic Programmable Ecumenical Glue
>
> Index: configure
> ===================================================================
> --- configure (revision 15634)
> +++ configure (working copy)
> @@ -1736,7 +1736,7 @@
> enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
> enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
> enabled libx264 && require x264 x264.h x264_encoder_open -lx264 -lm \
> - && require_cpp_condition x264 x264.h "X264_BUILD >= 65"
> + && { check_cpp_condition x264.h "X264_BUILD >= 65" || die "libx264 version must be >= 0.65."; }
Are those { } really needed? It seems to me it should work fine
without (and that's how I would probably have done it in the first
place).
> Index: configure
> ===================================================================
> --- configure (revision 15633)
> +++ configure (working copy)
> @@ -1316,6 +1316,10 @@
> SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
> objformat="win32"
> enable dos_paths
> + check_cpp_condition _mingw.h "(__MINGW32_MAJOR_VERSION > 3) || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
> + die "MinGW runtime must be >= 3.15."
Does the header name really start with an _? That's unusual...
> + check_cpp_condition w32api.h "(__W32API_MAJOR_VERSION > 3) || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION >= 12)" ||
> + die "w32api must be >= 3.12."
Those lines are frightfully long, but I don't see any better alternative.
> Index: configure
> ===================================================================
> --- configure (revision 15634)
> +++ configure (working copy)
> @@ -627,14 +627,6 @@
> check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
> }
>
> -require_cpp_condition(){
> - name="$1"
> - header="$2"
> - cpp_condition="$3"
> - shift 3
> - check_cpp_condition $header "$cpp_condition" || die "ERROR: $name does not satisfy CPP condition: $cpp_condition"
> -}
I never really liked this one anyway.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list