Skip to content

Commit

Permalink
backport fix for bug 1754 (need the Objective C runtime for ImageIo.m.)
Browse files Browse the repository at this point in the history
(default 2.0 branch commits 361ab0371a02; 56243a3eb8ea along with it..)
  • Loading branch information
sezero committed Oct 14, 2018
1 parent 019f68f commit b7c7ed1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
13 changes: 9 additions & 4 deletions configure
Expand Up @@ -12963,7 +12963,7 @@ else
fi
if test x$enable_imageio = xyes; then
IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
IMG_LIBS="-Wl,-framework,ApplicationServices -lobjc $IMG_LIBS"
else
CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
fi
Expand Down Expand Up @@ -13658,7 +13658,12 @@ else
fi
if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
{ $as_echo "$as_me:$LINENO: checking for ImageIO support" >&5
$as_echo_n "checking for ImageIO support... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_imageio" >&5
$as_echo "$enable_imageio" >&6; }
if (test x$enable_jpg = xyes || test x$enable_tif = xyes) && test x$enable_imageio != xyes; then
if test "${ac_cv_header_jpeglib_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
$as_echo_n "checking for jpeglib.h... " >&6; }
Expand Down Expand Up @@ -13891,7 +13896,7 @@ $as_echo "$as_me: WARNING: JPG image loading disabled" >&2;}
fi
fi
if test "x$enable_png" = xyes; then
if test x$enable_png = xyes -a x$enable_imageio != xyes; then
pkg_failed=no
{ $as_echo "$as_me:$LINENO: checking for LIBPNG" >&5
Expand Down Expand Up @@ -14407,7 +14412,7 @@ $as_echo "$as_me: WARNING: PNG image loading disabled" >&2;}
fi
fi
if test x$enable_tif = xyes; then
if test x$enable_tif = xyes -a x$enable_imageio != xyes; then
if test "${ac_cv_header_tiffio_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for tiffio.h" >&5
$as_echo_n "checking for tiffio.h... " >&6; }
Expand Down
11 changes: 7 additions & 4 deletions configure.in
Expand Up @@ -79,8 +79,11 @@ case "$host" in
*-*-darwin*)
AC_ARG_ENABLE([imageio], [AC_HELP_STRING([--enable-imageio], [use native Mac OS X frameworks for loading images [default=yes]])],
[], [enable_imageio=yes])
dnl Show a message when we use ImageIO support so it's not a surprise
AC_MSG_CHECKING([for ImageIO support])
AC_MSG_RESULT($enable_imageio)
if test x$enable_imageio = xyes; then
IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
IMG_LIBS="-Wl,-framework,ApplicationServices -lobjc $IMG_LIBS"
else
CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
fi
Expand Down Expand Up @@ -159,7 +162,7 @@ AC_ARG_ENABLE([webp], [AC_HELP_STRING([--enable-webp], [support loading WEBP ima
AC_ARG_ENABLE([webp-shared], AC_HELP_STRING([--enable-webp-shared], [dynamically load WEBP support [[default=yes]]]),
[], [enable_webp_shared=yes])

if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
if (test x$enable_jpg = xyes || test x$enable_tif = xyes) && test x$enable_imageio != xyes; then
AC_CHECK_HEADER([jpeglib.h], [have_jpg_hdr=yes])
AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], [have_jpg_lib=yes])
if test x$have_jpg_hdr = xyes -a x$have_jpg_lib = xyes; then
Expand Down Expand Up @@ -188,7 +191,7 @@ if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
fi
fi

if test "x$enable_png" = xyes; then
if test x$enable_png = xyes -a x$enable_imageio != xyes; then
PKG_CHECK_MODULES([LIBPNG], [libpng], [dnl
have_png_hdr=yes
have_png_lib=yes
Expand Down Expand Up @@ -225,7 +228,7 @@ if test "x$enable_png" = xyes; then
fi
fi

if test x$enable_tif = xyes; then
if test x$enable_tif = xyes -a x$enable_imageio != xyes; then
AC_CHECK_HEADER([tiffio.h], [have_tif_hdr=yes])
AC_CHECK_LIB([tiff], [TIFFClientOpen], [have_tif_lib=yes], [], [-lz])
if test x$have_tif_hdr = xyes -a x$have_tif_lib = xyes; then
Expand Down

0 comments on commit b7c7ed1

Please sign in to comment.