emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e9ca57c: Work even if libpng is installed in /usr/l


From: Paul Eggert
Subject: [Emacs-diffs] master e9ca57c: Work even if libpng is installed in /usr/local
Date: Sun, 11 Feb 2018 21:45:11 -0500 (EST)

branch: master
commit e9ca57cfcbaf1a8dfc6bde5a2afd5f3c7b357cb1
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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 @@ elif test "${with_png}" != no; then
   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 @@ elif test "${with_png}" != no; then
     CFLAGS=$SAVE_CFLAGS
     LIBS=$SAVE_LIBS
     AC_MSG_RESULT([$HAVE_PNG])
+   fi
   fi
 fi
 if test $HAVE_PNG = yes; then



reply via email to

[Prev in Thread] Current Thread [Next in Thread]