mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 19:03:24 +00:00
* configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed
but libpng-config --libs omits them. Problem reported by Glenn Morris.
This commit is contained in:
parent
7e00998fbc
commit
ec5f5b309d
2 changed files with 25 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed
|
||||||
|
but libpng-config --libs omits them. Problem reported by Glenn
|
||||||
|
Morris.
|
||||||
|
|
||||||
2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
|
2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339).
|
Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339).
|
||||||
|
|
23
configure.ac
23
configure.ac
|
@ -3080,10 +3080,25 @@ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
|
||||||
if png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
|
if png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
|
||||||
png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD`
|
png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD`
|
||||||
then
|
then
|
||||||
HAVE_PNG=yes
|
# On some platforms, LIBPNG must also contain -lz -lm.
|
||||||
PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
|
SAVE_CFLAGS=$CFLAGS
|
||||||
LIBPNG=$png_libs
|
SAVE_LIBS=$LIBS
|
||||||
else
|
CFLAGS="$CFLAGS $png_cflags"
|
||||||
|
for png_libextras in '' ' -lz -lm'; do
|
||||||
|
LIBS="$png_libs$png_libextras $SAVE_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$png_libextras])
|
||||||
|
test $HAVE_PNG = yes && break
|
||||||
|
done
|
||||||
|
CFLAGS=$SAVE_CFLAGS
|
||||||
|
LIBS=$SAVE_LIBS
|
||||||
|
fi
|
||||||
|
if test $HAVE_PNG != yes; then
|
||||||
# libpng-config does not work; configure it by hand.
|
# libpng-config does not work; configure it by hand.
|
||||||
# Debian unstable as of July 2003 has multiple libpngs, and puts png.h
|
# Debian unstable as of July 2003 has multiple libpngs, and puts png.h
|
||||||
# in /usr/include/libpng.
|
# in /usr/include/libpng.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue