]> git.eshelyaron.com Git - emacs.git/commitdiff
Support libpng DLLs of versions beyond 1.4.x on MS-Windows.
authorClaudio Bley <claudio.bley@googlemail.com>
Fri, 1 Nov 2013 08:57:55 +0000 (10:57 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 1 Nov 2013 08:57:55 +0000 (10:57 +0200)
 lisp/term/w32-win.el (dynamic-library-alist): Support versions of
 libpng beyond 1.4.x.

lisp/ChangeLog
lisp/term/w32-win.el

index eecc10efbb969c3f212944619b2b0582cefaed56..03819e49d291b3c26b2c088db818e1d5af9412eb 100644 (file)
@@ -3,6 +3,7 @@
        * term/w32-win.el (dynamic-library-alist): Support newer versions
        of libjpeg starting with v7: look only for the DLL from the
        version against which Emacs was built.
+       Support versions of libpng beyond 1.4.x.
 
 2013-11-01  Bozhidar Batsov  <bozhidar@batsov.com>
 
index bf5f1b6435cf555f6529aece4d8551fdd70905a1..ab314127cc4f423f49d2e081283c37aed123a699 100644 (file)
@@ -216,8 +216,15 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
        ;; the version we were compiled against.  (If we were compiled
        ;; without PNG support, libpng-version's value is -1.)
        (if (>= libpng-version 10400)
-          ;; libpng14-14.dll is libpng 1.4.3 from GTK+
-          '(png "libpng14-14.dll" "libpng14.dll")
+          (let ((major (/ libpng-version 10000))
+                (minor (mod (/ libpng-version 100) 10)))
+            (list 'png
+                  ;; libpngXY.dll is the default name when building
+                  ;; with CMake or from a lpngXYY tarball on w32,
+                  ;; libpngXY-XY.dll is the DLL name when building
+                  ;; with libtool / autotools
+                  (format "libpng%d%d.dll" major minor)
+                  (format "libpng%d%d-%d%d.dll" major minor major minor)))
         '(png "libpng12d.dll" "libpng12.dll" "libpng3.dll" "libpng.dll"
               ;; these are libpng 1.2.8 from GTK+
               "libpng13d.dll" "libpng13.dll"))