[MPlayer-dev-eng] [PATCH] configure: check for gsm.h and openjpeg-1.5/openjpeg.h

Diego Biurrun diego at biurrun.de
Sat Jan 26 01:37:20 CET 2013


On Fri, Jan 25, 2013 at 10:42:01PM +0100, Erik Auerswald wrote:
> 
> the attached patch for configure adds checks for the header files
> gsm.h and openjpeg-1.5/openjpeg.h.
> 
> The gsm.h check is used in ffmpeg/libavcodec/libgsm.c,
> the openjpeg-1.5/openjpeg.h one in
> ffmpeg/libavcodec/libopenjpegdec.c and
> ffmpeg/libavcodec/libopenjpegenc.c.
> 
> This fixes the -Wundef warnings for HAVE_GSM_H and
> HAVE_OPENJPEG_1_5_OPENJPEG_H.

I must say this whole business of duplicating ./ffmpeg/configure in
./configure is getting crazier by the day.  ./configure is approaching
10k lines of brittle, hard-to-maintain shell scripting with dizzying
amounts of code duplication.

Almost all of the changes done to configure are part of this cat and
mouse game.  Somebody needs to step up and fix this properly instead.

> --- configure	(revision 35887)
> +++ configure	(working copy)
> @@ -3822,6 +3822,28 @@
>  
> +echocheck "gsm.h"
> +_gsm_h=no
> +header_check gsm.h && _gsm_h=yes
> +if [ $_gsm_h = yes ]; then
> +  def_gsm_h='#define HAVE_GSM_H 1'
> +else
> +  def_gsm_h='#define HAVE_GSM_H 0'
> +fi
> +echores "$_gsm_h"
> +
> +
> +echocheck "openjpeg-1.5/openjpeg.h"
> +_openjpeg_1_5_openjpeg_h=no
> +header_check openjpeg-1.5/openjpeg.h && _openjpeg_1_5_openjpeg_h=yes
> +if [ $_openjpeg_1_5_openjpeg_h = yes ]; then
> +  def_openjpeg_1_5_openjpeg_h='#define HAVE_OPENJPEG_1_5_OPENJPEG_H 1'
> +else
> +  def_openjpeg_1_5_openjpeg_h='#define HAVE_OPENJPEG_1_5_OPENJPEG_H 0'
> +fi
> +echores "$_openjpeg_1_5_openjpeg_h"

Please drop the silly leading underscores and rephrase it compactly
like the windows.h check, saves about 10 lines.

Diego


More information about the MPlayer-dev-eng mailing list