From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: libpng issues Date: Sun, 11 Feb 2018 18:45:59 -0800 Organization: UCLA Computer Science Department Message-ID: <43b7cd24-568b-a912-7e6b-be910b2bb99c@cs.ucla.edu> References: <20180210.204659.327614606750579213.wl@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B01EA906B6CBD5C18EFE7E49" X-Trace: blaine.gmane.org 1518403526 30890 195.159.176.226 (12 Feb 2018 02:45:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Feb 2018 02:45:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: Werner LEMBERG , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 12 03:45:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1el46r-0005nC-2Y for ged-emacs-devel@m.gmane.org; Mon, 12 Feb 2018 03:44:49 +0100 Original-Received: from localhost ([::1]:57666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1el48s-0001YZ-Os for ged-emacs-devel@m.gmane.org; Sun, 11 Feb 2018 21:46:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1el488-0001Y9-UI for emacs-devel@gnu.org; Sun, 11 Feb 2018 21:46:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1el484-0002Vr-Fi for emacs-devel@gnu.org; Sun, 11 Feb 2018 21:46:08 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39286) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1el484-0002U3-8z; Sun, 11 Feb 2018 21:46:04 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 391111600F3; Sun, 11 Feb 2018 18:46:02 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id rUjfih5um0NF; Sun, 11 Feb 2018 18:45:59 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7E6D4160156; Sun, 11 Feb 2018 18:45:59 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ah61EEKkND7o; Sun, 11 Feb 2018 18:45:59 -0800 (PST) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5BBD21600F3; Sun, 11 Feb 2018 18:45:59 -0800 (PST) In-Reply-To: <20180210.204659.327614606750579213.wl@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222672 Archived-At: This is a multi-part message in MIME format. --------------B01EA906B6CBD5C18EFE7E49 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Werner LEMBERG wrote: > > I've just been bitten by > > https://github.com/glennrp/libpng/issues/206 > > For this reason I suggest two improvements for the configure script of > emacs. > > (1) Use `pkg-config' before `libpng-config' to detect libpng. > > (2) If `libpng-config' is used, filter out `-L/usr/lib' and > `-L/usr/lib64' (as suggested in issue #206). Thanks, I installed the attached into master. It does (1), and as I understand it when (1) works then (2) is unnecessary. I'm hoping we don't have to do (2) as I worry that it might break things on some platforms. --------------B01EA906B6CBD5C18EFE7E49 Content-Type: text/x-patch; name="0001-Work-even-if-libpng-is-installed-in-usr-local.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Work-even-if-libpng-is-installed-in-usr-local.patch" >From 43040127a56b529beac1e2958d0751f4c94e01fc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Feb 2018 18:43:34 -0800 Subject: [PATCH] Work even if libpng is installed in /usr/local Problem reported by Werner Lemberg in: https://lists.gnu.org/r/emacs-devel/2018-02/msg00304.html * configure.ac: Try pkg-config before libpng-config. --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f2a8332..ec25e9b 100644 --- a/configure.ac +++ b/configure.ac @@ -3612,7 +3612,11 @@ AC_DEFUN if test "$opsys" = mingw32; then AC_CHECK_HEADER([png.h], [HAVE_PNG=yes]) elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then - AC_MSG_CHECKING([for png]) + EMACS_CHECK_MODULES([PNG], [libpng >= 1.0.0]) + if test $HAVE_PNG = no; then + # Test old way in case pkg-config doesn't have it (older machines). + AC_MSG_CHECKING([for libpng not configured by pkg-config]) + png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { # libpng-config does not work; configure by hand. @@ -3645,6 +3649,7 @@ AC_DEFUN CFLAGS=$SAVE_CFLAGS LIBS=$SAVE_LIBS AC_MSG_RESULT([$HAVE_PNG]) + fi fi fi if test $HAVE_PNG = yes; then -- 2.7.4 --------------B01EA906B6CBD5C18EFE7E49--