From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Fishman Newsgroups: gmane.emacs.bugs Subject: bug#15531: Emacs configure fails with gif 5.0 Date: Sat, 05 Oct 2013 11:27:53 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1380996855 15363 80.91.229.3 (5 Oct 2013 18:14:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Oct 2013 18:14:15 +0000 (UTC) To: 15531@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 05 20:14:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VSWMs-000582-20 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2013 20:14:18 +0200 Original-Received: from localhost ([::1]:52644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSWMr-0005rv-EA for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2013 14:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSWMj-0005rP-5L for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 14:14:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSWMd-0005H9-3z for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 14:14:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSWMd-0005H3-0M for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 14:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VSWMc-0001W3-JH for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry Fishman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Oct 2013 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13809967885741 (code B ref -1); Sat, 05 Oct 2013 18:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2013 18:13:08 +0000 Original-Received: from localhost ([127.0.0.1]:56357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSWLj-0001UV-3R for submit@debbugs.gnu.org; Sat, 05 Oct 2013 14:13:07 -0400 Original-Received: from bzsmtp01vmoc.mail2world.com ([74.202.142.112]:2616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSTlu-00060o-QN for submit@debbugs.gnu.org; Sat, 05 Oct 2013 11:27:59 -0400 Original-Received: from mail pickup service by bzsmtp01vmoc.mail2world.com with Microsoft SMTPSVC; Sat, 5 Oct 2013 08:27:56 -0700 auth-sender: bfishman@alum.rpi.edu Original-Received: from 71.52.212.238 unverified ([71.52.212.238]) by bzsmtp01vmoc.mail2world.com with Mail2World SMTP Server; Sat, 05 Oct 2013 08:27:54 -0700 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEXG87t8xXThBQWq85q9 87AvUC6PUVH/BgamyajC87a/87P////r6+ud7oq49KsBy7dJAAACKUlEQVQ4jc3Sv2vbQBQH 8CulwcEdeoOKwM1QD/bSzVktKDEdMpRqeMKQFNqAhEGbh3aVB5sDafAYL106xZMzuAiehnqI EciLMR2viz0Vor+hdydZMa6z97sI9NH7cYdI9ZGQr4/kP4Fu1akehFqHDaoHoOviPLD3oVtz 7PIErFCeeRdqOuvptwDMYSyfpKB7iYh3DOCTeOKzegGvk8hD1O22eD2B9tUWum9wbpXYy6NA wAzMeQFu1AeT2VAW0Af4sYUvfmRbCWLciXq0B2ZYf4C+GL/AGBIcOP4O4MzFKbiTAGOPYg7V mu1j5OIdfIgT7FtHGKoZIHKB6IuK9kDODpNsK0pPVnqCFbyFSyYWMMPnIA9CVsbm5l2HuRjZ FVERBXFPs8QQMhIZvqUX8jJmiTzIRy5FwWhEdAmR4y1KnQbn1KrnMOrLj6PPDnW8bw2+1K7I OINrecF9jwyJyBlfAvkzvlEy6DBHJ3m+8yU5HY9V0TWl+nALx+slMQTkRWKHQprEOJeST3qg p8RoHZRjsmm1ctrrJ0HkX0mFvG+uTnf7qe3SNG2dcc4bm70iAemaHxAJ91zF2G2noMl/UVVk bAoihgINlKwa6XkuhBsKGJgnPBuVEeG/5Wzqz3tZ0bYh4SsBS+qXZtTMRTWUcC/Bnybi7+R5 VoaAdZNz7ZU/RT8u2nEuQTw0VpmjH/7UChHQlFAGT1Rg8GS7Hcm+0F4EDgvYIohLAFS++wvs R0Pau3fdJgAAAABJRU5ErkJggg== User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-OriginalArrivalTime: 05 Oct 2013 15:27:56.0530 (UTC) FILETIME=[77650520:01CEC1DF] X-Mailman-Approved-At: Sat, 05 Oct 2013 14:13:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78942 Archived-At: --=-=-= Content-Type: text/plain Package: emacs Version: 24.3.50 The configure script fails to recognize the gif_lib.h header file for gif 5.0 and so prints an error that git support can not be found. The gif_lib.h header file has been reorganized for gif 5.0. There is no longer a EGifPutExtensionLast function. However there is a new GifMakeMapObject I used in my patch. A better way would probably be to look at the new GIFLIB_MAJOR define now in gif_lib.h. I have included a patch, but I do not have many OS/platforms that I can check. I am far from understanding autoconfig, but my attempt at a fix (git patch) is included below: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=emacs-gif-5.patch Content-Description: configure and image.c patches diff --git a/configure.ac b/configure.ac index 53426b6..0f05d8e 100644 --- a/configure.ac +++ b/configure.ac @@ -3109,8 +3109,9 @@ elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \ || test "${HAVE_W32}" = "yes"; then AC_CHECK_HEADER(gif_lib.h, # EGifPutExtensionLast only exists from version libungif-4.1.0b1. -# Earlier versions can crash Emacs. - [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)]) +# Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast. + [AC_CHECK_LIB(gif, GifMakeMapObject, HAVE_GIF=yes, + [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)])]) if test "$HAVE_GIF" = yes; then LIBGIF=-lgif diff --git a/src/image.c b/src/image.c index e429830..c414f5b 100644 --- a/src/image.c +++ b/src/image.c @@ -7219,14 +7219,22 @@ gif_image_p (Lisp_Object object) #endif /* HAVE_NTGUI */ +#ifndef GIFLIB_MAJOR +#define GIFLIB_MAJOR 0 +#endif #ifdef WINDOWSNT /* GIF library details. */ DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *)); DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *)); +#if GIFLIB_MAJOR < 5 DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *)); +#else +DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *)); +DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *, int *)); +#endif static bool init_gif_functions (void) @@ -7316,7 +7324,11 @@ gif_load (struct frame *f, struct image *img) } /* Open the GIF file. */ +#if GIFLIB_MAJOR < 5 gif = fn_DGifOpenFileName (SSDATA (file)); +#else + gif = fn_DGifOpenFileName (SSDATA (file), NULL); +#endif if (gif == NULL) { image_error ("Cannot open `%s'", file, Qnil); @@ -7337,7 +7349,11 @@ gif_load (struct frame *f, struct image *img) memsrc.len = SBYTES (specified_data); memsrc.index = 0; +#if GIFLIB_MAJOR < 5 gif = fn_DGifOpen (&memsrc, gif_read_from_memory); +#else + gif = fn_DGifOpen (&memsrc, gif_read_from_memory, NULL); +#endif if (!gif) { image_error ("Cannot open memory source `%s'", img->spec, Qnil); --=-=-= Content-Type: text/plain -- Barry Fishman --=-=-=--