[FFmpeg-devel] [PATCH] lzo build system checks

Reimar Döffinger Reimar.Doeffinger
Thu Apr 9 16:36:41 CEST 2009


On Thu, Apr 09, 2009 at 04:25:36PM +0200, Diego Biurrun wrote:
> Index: configure
> ===================================================================
> --- configure	(revision 18382)
> +++ configure	(working copy)
> @@ -895,6 +895,7 @@
>      llrint
>      lrint
>      lrintf
> +    lzo1x_999_compress
>      machine_ioctl_bt848_h
>      machine_ioctl_meteor_h
>      malloc_h
> @@ -1970,6 +1971,7 @@
>  check_func  mkstemp
>  check_func  posix_memalign
>  check_func_headers io.h setmode
> +check_func_headers lzo/lzo1x.h lzo1x_999_compress
>  check_func_headers windows.h GetProcessTimes
>  check_func_headers windows.h VirtualAlloc
>  
> Index: libavutil/Makefile
> ===================================================================
> --- libavutil/Makefile	(revision 18382)
> +++ libavutil/Makefile	(working copy)
> @@ -42,6 +42,7 @@
>         utils.o                                                          \
>  
>  TESTPROGS = adler32 aes base64 crc des lls md5 pca sha1 softfloat tree
> +TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo
>  
>  DIRS = arm bfin sh4 x86
>  

Looks right to me.

> Index: libavutil/lzo.c
> ===================================================================
> --- libavutil/lzo.c	(revision 18382)
> +++ libavutil/lzo.c	(working copy)
> @@ -239,6 +239,10 @@
>  #include <lzo/lzo1x.h>
>  #include "log.h"
>  #define MAXSZ (10*1024*1024)
> +
> +//#define HAVE_LZO1X_DECOMPRESS_SAFE 1
> +//#define HAVE_LZO1X_DECOMPRESS 1

I meant those would have to be
#define HAVE_LZO1X_DECOMPRESS_SAFE 0
#define HAVE_LZO1X_DECOMPRESS 0

But I don't really like it since if someone changes them, lzo-test will
no longer test our lzo implementation, thus I prefer if they have to be
defined on the command-line (which is also the reason for using
defined/undefined instead of 0/1).
And while I agree the names are probably bad I think yours are worse, I
would propose using e.g.
TEST_LIBLZO or BENCHMARK_LIBLZO if you consider those any better.



More information about the ffmpeg-devel mailing list