fix compile without jpeg

im_jpeg2vips.c failed to compile if jpeglib.h was missing, thanks
Alessandro
This commit is contained in:
John Cupitt 2013-03-22 09:12:06 +00:00
parent 028e93430e
commit 4ebe588da6
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@
- removed some left-over debugging code from configure.ac
- better handling of args without values, thanks Ruven
- better error messages from vips.c
- im_jpeg2vips.c builds without jpeglib.h, thanks Alessandro
6/2/13 started 7.32.1
- fix --without-lcms, thanks speckins

View File

@ -44,13 +44,15 @@
#include <vips/intl.h>
#include <stdlib.h>
#include <setjmp.h>
#include <vips/vips.h>
#include <setjmp.h>
#ifdef HAVE_JPEG
#include <jpeglib.h>
#include <jerror.h>
#include "../foreign/jpeg.h"
#endif /*HAVE_JPEG*/
static int
jpeg2vips( const char *name, IMAGE *out, gboolean header_only )
@ -116,7 +118,8 @@ jpeg2vips( const char *name, IMAGE *out, gboolean header_only )
header_only, shrink, fail_on_warn ) )
return( -1 );
#else
vips_error( "im_jpeg2vips", _( "no JPEG support in your libvips" ) );
vips_error( "im_jpeg2vips",
"%s", _( "no JPEG support in your libvips" ) );
return( -1 );
#endif /*HAVE_JPEG*/