diff options
| author | Paul Eggert | 2018-02-11 18:43:34 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-02-11 18:45:06 -0800 |
| commit | e9ca57cfcbaf1a8dfc6bde5a2afd5f3c7b357cb1 (patch) | |
| tree | e4f4c282aee13fd303a4c07d5caa5f2de093d00d | |
| parent | 76a1bd1896655ef092f4510f2099a772d6bb1df5 (diff) | |
| download | emacs-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.ac | 7 |
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 |
| 3649 | fi | 3654 | fi |
| 3650 | if test $HAVE_PNG = yes; then | 3655 | if test $HAVE_PNG = yes; then |