[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] trunk/kdelibs: Use giflib if it's available
From:       "Joshua J. Berry" <des () condordes ! net>
Date:       2005-12-22 2:35:50
Message-ID: 43AA1106.7000208 () condordes ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In kdelibs trunk, KHTML's GIF image loader assumes that libungif is
present.  However, some distros (notably, Gentoo) can have an alternate
implementation installed as libgif.  The two libraries cannot both be
installed at once, however, to the best of my knowledge, they are at
least source compatible.  (They both use the same header file, anyway.)

This patch detects libgif (which I believe supports compression) and
will use it instead of libungif if it is present.  Please apply.

(No, I don't have an SVN account, nor do I really have time for one,
sadly. :) )

- -- Josh

Index: khtml/imload/decoders/Makefile.am
===================================================================
- --- khtml/imload/decoders/Makefile.am	(revision 490466)
+++ khtml/imload/decoders/Makefile.am	(working copy)
@@ -2,7 +2,7 @@
 libdecoders_la_SOURCES = jpegloader.cpp pngloader.cpp gifloader.cpp

 libdecoders_la_METASOURCES = AUTO
- -libdecoders_la_LIBADD = -ljpeg -lungif
+libdecoders_la_LIBADD = -ljpeg $(GIF_LIBRARY)
 noinst_HEADERS = jpegloader.h pngloader.h gifloader.h

 INCLUDES = -I$(top_srcdir)/khtml/imload $(all_includes)
Index: configure.in.in
===================================================================
- --- configure.in.in	(revision 490466)
+++ configure.in.in	(working copy)
@@ -253,6 +253,12 @@
   AC_DEFINE(HAVE_SENDFILE,1,[Define if you want sendfile() support])
 fi

+GIF_LIBRARY=''
+AC_CHECK_LIB(gif, DGifOpen, [GIF_LIBRARY='-lgif'], [
+                   AC_CHECK_LIB(ungif, [GIF_LIBRARY='-lungif'],
+                        [AC_MSG_ERROR(No GIF library found.)])])
+AC_SUBST(GIF_LIBRARY)
+
 AC_MSG_CHECKING(if MIT-SHM support is wanted)
 AC_ARG_ENABLE(mitshm,
 AC_HELP_STRING([--enable-mitshm],[use MIT-SHM for pixmap loading/saving]),

- --
Joshua J. Berry

"I haven't lost my mind -- it's backed up on tape somewhere."
    -- /usr/games/fortune
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDqhEGaIxeYlQMsxsRApgFAJ9bLLiOwq9ZL1Cf070sp0dBYC/5xwCfbk35
aFrFUK4womQd9BG7gEbMpsg=
=dYnu
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic