Apply patch 5: add a configure flag to switch on/off jpeg support. Patch by Daniel...
authorpabs3 <pabs3@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 2 Oct 2008 11:44:43 +0000 (11:44 +0000)
committerpabs3 <pabs3@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 2 Oct 2008 11:44:43 +0000 (11:44 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2078 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/AUTHORS
synfig-core/trunk/configure.ac

index 1b629da..f7ec827 100644 (file)
@@ -14,6 +14,7 @@ Chris Moore (dooglus)
 Martin Michlmayr
 Carlos López González (genete)
 Gerco Ballintijn
+Daniel Hornung (rubikcube)
 
 Translators:
 
index 882f16d..7ab5740 100644 (file)
@@ -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