aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2018-02-11 18:43:34 -0800
committerPaul Eggert2018-02-11 18:45:06 -0800
commite9ca57cfcbaf1a8dfc6bde5a2afd5f3c7b357cb1 (patch)
treee4f4c282aee13fd303a4c07d5caa5f2de093d00d
parent76a1bd1896655ef092f4510f2099a772d6bb1df5 (diff)
downloademacs-e9ca57cfcbaf1a8dfc6bde5a2afd5f3c7b357cb1.tar.gz
emacs-e9ca57cfcbaf1a8dfc6bde5a2afd5f3c7b357cb1.zip
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.
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f2a8332d71a..ec25e9b8c77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3612,7 +3612,11 @@ elif test "${with_png}" != no; then
3612 if test "$opsys" = mingw32; then 3612 if test "$opsys" = mingw32; then
3613 AC_CHECK_HEADER([png.h], [HAVE_PNG=yes]) 3613 AC_CHECK_HEADER([png.h], [HAVE_PNG=yes])
3614 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then 3614 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
3615 AC_MSG_CHECKING([for png]) 3615 EMACS_CHECK_MODULES([PNG], [libpng >= 1.0.0])
3616 if test $HAVE_PNG = no; then
3617 # Test old way in case pkg-config doesn't have it (older machines).
3618 AC_MSG_CHECKING([for libpng not configured by pkg-config])
3619
3616 png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && 3620 png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
3617 png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { 3621 png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || {
3618 # libpng-config does not work; configure by hand. 3622 # libpng-config does not work; configure by hand.
@@ -3645,6 +3649,7 @@ elif test "${with_png}" != no; then
3645 CFLAGS=$SAVE_CFLAGS 3649 CFLAGS=$SAVE_CFLAGS
3646 LIBS=$SAVE_LIBS 3650 LIBS=$SAVE_LIBS
3647 AC_MSG_RESULT([$HAVE_PNG]) 3651 AC_MSG_RESULT([$HAVE_PNG])
3652 fi
3648 fi 3653 fi
3649fi 3654fi
3650if test $HAVE_PNG = yes; then 3655if test $HAVE_PNG = yes; then