From b7c7ed184df62a20040386ef935f3dc6495dd877 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 14 Oct 2018 17:00:00 +0300 Subject: [PATCH] backport fix for bug 1754 (need the Objective C runtime for ImageIo.m.) (default 2.0 branch commits 361ab0371a02; 56243a3eb8ea along with it..) --- configure | 13 +++++++++---- configure.in | 11 +++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/configure b/configure index e8efe2f3..67585ed1 100755 --- a/configure +++ b/configure @@ -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 @@ -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; } @@ -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 @@ -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; } diff --git a/configure.in b/configure.in index 33be0833..7fe4d970 100644 --- a/configure.in +++ b/configure.in @@ -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 @@ -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 @@ -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 @@ -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