aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-11 23:36:57 +0200
committerJohannes Schickel2013-09-16 15:55:36 +0200
commitac66cc921904387518f2e0b2a14670e9598defe4 (patch)
treef539abdbbbc443f711e7dbf164fc6f72ee6e6747 /configure
parent9d9833537f98a24b9be37e426917856bb1193be1 (diff)
downloadscummvm-rg350-ac66cc921904387518f2e0b2a14670e9598defe4.tar.gz
scummvm-rg350-ac66cc921904387518f2e0b2a14670e9598defe4.tar.bz2
scummvm-rg350-ac66cc921904387518f2e0b2a14670e9598defe4.zip
GRAPHICS: Implement JPEGDecoder based on libjpeg.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure b/configure
index 1da7d7fb78..d4ee1e5a8c 100755
--- a/configure
+++ b/configure
@@ -115,6 +115,7 @@ _timidity=auto
_zlib=auto
_mpeg2=auto
_sparkle=auto
+_jpeg=auto
_png=auto
_theoradec=auto
_faad=auto
@@ -188,6 +189,7 @@ add_feature faad "libfaad" "_faad"
add_feature flac "FLAC" "_flac"
add_feature freetype2 "FreeType2" "_freetype2"
add_feature mad "MAD" "_mad"
+add_feature jpeg "JPEG" "_jpeg"
add_feature png "PNG" "_png"
add_feature theoradec "libtheoradec" "_theoradec"
add_feature vorbis "Vorbis file support" "_vorbis _tremor"
@@ -936,6 +938,9 @@ Optional Libraries:
--with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional)
--disable-opengl disable OpenGL (ES) support [autodetect]
+ --with-jpeg-prefix=DIR Prefix where libjpeg is installed (optional)
+ --disable-jpeg disable JPEG decoder [autodetect]
+
--with-png-prefix=DIR Prefix where libpng is installed (optional)
--disable-png disable PNG decoder [autodetect]
@@ -1015,6 +1020,8 @@ for ac_option in $@; do
--disable-nasm) _nasm=no ;;
--enable-mpeg2) _mpeg2=yes ;;
--disable-mpeg2) _mpeg2=no ;;
+ --disable-jpeg) _jpeg=no ;;
+ --enable-jpeg) _jpeg=yes ;;
--disable-png) _png=no ;;
--enable-png) _png=yes ;;
--disable-theoradec) _theoradec=no ;;
@@ -1096,6 +1103,11 @@ for ac_option in $@; do
MAD_CFLAGS="-I$arg/include"
MAD_LIBS="-L$arg/lib"
;;
+ --with-jpeg-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ JPEG_CFLAGS="-I$arg/include"
+ JPEG_LIBS="-L$arg/lib"
+ ;;
--with-png-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
PNG_CFLAGS="-I$arg/include"
@@ -3339,6 +3351,32 @@ define_in_config_h_if_yes "$_alsa" 'USE_ALSA'
echo "$_alsa"
#
+# Check for libjpeg
+#
+echocheck "libjpeg >= v6b"
+if test "$_jpeg" = auto ; then
+ _jpeg=no
+ cat > $TMPC << EOF
+#include <stdio.h>
+#include <jpeglib.h>
+int main(void) {
+#if JPEG_LIB_VERSION >= 62
+#else
+ syntax error
+#endif
+ return 0;
+}
+EOF
+ cc_check $JPEG_CFLAGS $JPEG_LIBS -ljpeg && _jpeg=yes
+fi
+if test "$_jpeg" = yes ; then
+ LIBS="$LIBS $JPEG_LIBS -ljpeg"
+ INCLUDES="$INCLUDES $JPEG_CFLAGS"
+fi
+define_in_config_if_yes "$_jpeg" 'USE_JPEG'
+echo "$_jpeg"
+
+#
# Check for PNG
#
echocheck "PNG >= 1.2.8"