From 5e52e7089a63443fc6b58563a8269ac2e53b520e Mon Sep 17 00:00:00 2001 From: pabs3 Date: Thu, 2 Oct 2008 11:44:43 +0000 Subject: [PATCH] Apply patch 5: add a configure flag to switch on/off jpeg support. Patch by Daniel Hornung (rubikcube) git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2078 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/AUTHORS | 1 + synfig-core/trunk/configure.ac | 45 ++++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/synfig-core/trunk/AUTHORS b/synfig-core/trunk/AUTHORS index 1b629da..f7ec827 100644 --- a/synfig-core/trunk/AUTHORS +++ b/synfig-core/trunk/AUTHORS @@ -14,6 +14,7 @@ Chris Moore (dooglus) Martin Michlmayr Carlos López González (genete) Gerco Ballintijn +Daniel Hornung (rubikcube) Translators: diff --git a/synfig-core/trunk/configure.ac b/synfig-core/trunk/configure.ac index 882f16d..7ab5740 100644 --- a/synfig-core/trunk/configure.ac +++ b/synfig-core/trunk/configure.ac @@ -372,6 +372,19 @@ if test $use_openexr_half = yes ; then { } ; fi +# JPEG CHECK (commandline switch) ------------------------ +AC_ARG_WITH(jpeg,[ + --without-jpeg Disable support for JPEG],[ +],[ + with_jpeg="yes" +]) +if test $with_jpeg = "no" ; then { + AM_CONDITIONAL(WITH_JPEG,false) +} else { + AM_CONDITIONAL(WITH_JPEG,true) +} ; fi + + @@ -417,7 +430,6 @@ dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"]) TARGET_PNG="yes" TARGET_MNG="yes" -TARGET_JPEG="yes" AC_CHECK_LIB(png, png_write_row,[ PNG_LIBS="-lpng" @@ -448,23 +460,26 @@ AC_CHECK_LIB(mng, mng_initialize,[ AM_CONDITIONAL(HAVE_LIBMNG,false) ],[-lz -L${exec_prefix}/lib]) -AC_CHECK_LIB(jpeg, jpeg_CreateCompress,[ - JPEG_LIBS="-ljpeg" - AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] ) - AC_SUBST(JPEG_LIBS) - AM_CONDITIONAL(HAVE_LIBJPEG,true) -],[ +# check for JPEG availability +if test $with_jpeg = "yes" ; then { + AC_CHECK_LIB(jpeg, jpeg_CreateCompress,[ + JPEG_LIBS="-ljpeg" + AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] ) + AC_SUBST(JPEG_LIBS) + TARGET_JPEG="yes" + AM_CONDITIONAL(HAVE_LIBJPEG,true) + ],[ + AC_MSG_RESULT([ *** JPEG Output target disabled]) + TARGET_JPEG="no" + AM_CONDITIONAL(HAVE_LIBJPEG,false) + ],[ + -L${exec_prefix}/lib + ]) +} else { AC_MSG_RESULT([ *** JPEG Output target disabled]) TARGET_JPEG="no" AM_CONDITIONAL(HAVE_LIBJPEG,false) -],[-L${exec_prefix}/lib]) - - -dnl AC_CHECK_HEADERS(jpeglib.h,[],[ -dnl AC_MSG_RESULT([ *** JPEG Output target disabled]) -dnl TARGET_JPEG="no" -dnl AM_CONDITIONAL(HAVE_LIBJPEG,false) -dnl ]) +} ; fi -- 2.7.4