diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -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" |