summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-24 17:03:22 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-24 17:03:53 -0800
commit2dae636237603b436b48e77e2f893bb4d42f3ce7 (patch)
tree784fbcc19b67b7933d2bb380ac4fc5f0e0dae719
parentda52e939aa26b0fc241151ba554bdca6ea1ef38c (diff)
downloademacs-2dae636237603b436b48e77e2f893bb4d42f3ce7.tar.gz
Use libpng-config --ldflags, not --libs
Problem reported by James K. Lowden (Bug#25268). * configure.ac (LIBPNG): Pass --ldflags, not --libs, to libpng-config.
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5aaf006c549..cd6c689a52c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3476,7 +3476,7 @@ elif test "${with_png}" != no; then
elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
AC_MSG_CHECKING([for png])
png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
- png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` || {
+ png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || {
# libpng-config does not work; configure by hand.
# Debian unstable as of July 2003 has multiple libpngs, and puts png.h
# in /usr/include/libpng.
@@ -3486,18 +3486,18 @@ elif test "${with_png}" != no; then
else
png_cflags=
fi
- png_libs='-lpng'
+ png_ldflags='-lpng'
}
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
CFLAGS="$CFLAGS $png_cflags"
- LIBS="$png_libs -lz -lm $LIBS"
+ LIBS="$png_ldflags -lz -lm $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <png.h>]],
[[return !png_get_channels (0, 0);]])],
[HAVE_PNG=yes
PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
- LIBPNG=$png_libs
+ LIBPNG=$png_ldflags
# $LIBPNG requires explicit -lz in some cases.
# We don't know what those cases are, exactly, so play it safe and
# append -lz to any nonempty $LIBPNG, unless we're already using LIBZ.