diff options
| author | Paul Eggert | 2014-05-03 23:34:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-03 23:34:04 -0700 |
| commit | ec5f5b309d86d33a978a2419015e9aaaa31758b9 (patch) | |
| tree | 8d073720cb787c50713cfaddbe50519c9fd5799d | |
| parent | 7e00998fbc3e04e5bb613076cec816eccfa8bb3e (diff) | |
| download | emacs-ec5f5b309d86d33a978a2419015e9aaaa31758b9.tar.gz emacs-ec5f5b309d86d33a978a2419015e9aaaa31758b9.zip | |
* configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed
but libpng-config --libs omits them. Problem reported by Glenn
Morris.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | configure.ac | 23 |
2 files changed, 25 insertions, 4 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed | ||
| 4 | but libpng-config --libs omits them. Problem reported by Glenn | ||
| 5 | Morris. | ||
| 6 | |||
| 1 | 2014-05-03 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2014-05-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339). | 9 | Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339). |
diff --git a/configure.ac b/configure.ac index 4fd842817b6..1f458771bbd 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -3080,10 +3080,25 @@ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then | |||
| 3080 | if png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && | 3080 | if png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && |
| 3081 | png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` | 3081 | png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` |
| 3082 | then | 3082 | then |
| 3083 | HAVE_PNG=yes | 3083 | # On some platforms, LIBPNG must also contain -lz -lm. |
| 3084 | PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"` | 3084 | SAVE_CFLAGS=$CFLAGS |
| 3085 | LIBPNG=$png_libs | 3085 | SAVE_LIBS=$LIBS |
| 3086 | else | 3086 | CFLAGS="$CFLAGS $png_cflags" |
| 3087 | for png_libextras in '' ' -lz -lm'; do | ||
| 3088 | LIBS="$png_libs$png_libextras $SAVE_LIBS" | ||
| 3089 | AC_LINK_IFELSE( | ||
| 3090 | [AC_LANG_PROGRAM([[#include <png.h> | ||
| 3091 | ]], | ||
| 3092 | [[return png_get_channels (0, 0);]])], | ||
| 3093 | [HAVE_PNG=yes | ||
| 3094 | PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"` | ||
| 3095 | LIBPNG=$png_libs$png_libextras]) | ||
| 3096 | test $HAVE_PNG = yes && break | ||
| 3097 | done | ||
| 3098 | CFLAGS=$SAVE_CFLAGS | ||
| 3099 | LIBS=$SAVE_LIBS | ||
| 3100 | fi | ||
| 3101 | if test $HAVE_PNG != yes; then | ||
| 3087 | # libpng-config does not work; configure it by hand. | 3102 | # libpng-config does not work; configure it by hand. |
| 3088 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | 3103 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h |
| 3089 | # in /usr/include/libpng. | 3104 | # in /usr/include/libpng. |