backport fix for bug 1754 (need the Objective C runtime for ImageIo.m.) SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 14 Oct 2018 17:00:00 +0300
branchSDL-1.2
changeset 6025d369ebb4940
parent 601 98b284005f5e
child 604 93d1be43b70a
backport fix for bug 1754 (need the Objective C runtime for ImageIo.m.)

(default 2.0 branch commits 361ab0371a02; 56243a3eb8ea along with it..)
configure
configure.in
     1.1 --- a/configure	Sun Oct 14 15:00:50 2018 +0300
     1.2 +++ b/configure	Sun Oct 14 17:00:00 2018 +0300
     1.3 @@ -12963,7 +12963,7 @@
     1.4  fi
     1.5  
     1.6          if test x$enable_imageio = xyes; then
     1.7 -            IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
     1.8 +            IMG_LIBS="-Wl,-framework,ApplicationServices -lobjc $IMG_LIBS"
     1.9          else
    1.10              CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
    1.11          fi
    1.12 @@ -13658,7 +13658,12 @@
    1.13  fi
    1.14  
    1.15  
    1.16 -if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
    1.17 +{ $as_echo "$as_me:$LINENO: checking for ImageIO support" >&5
    1.18 +$as_echo_n "checking for ImageIO support... " >&6; }
    1.19 +{ $as_echo "$as_me:$LINENO: result: $enable_imageio" >&5
    1.20 +$as_echo "$enable_imageio" >&6; }
    1.21 +
    1.22 +if (test x$enable_jpg = xyes || test x$enable_tif = xyes) && test x$enable_imageio != xyes; then
    1.23      if test "${ac_cv_header_jpeglib_h+set}" = set; then
    1.24    { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
    1.25  $as_echo_n "checking for jpeglib.h... " >&6; }
    1.26 @@ -13891,7 +13896,7 @@
    1.27      fi
    1.28  fi
    1.29  
    1.30 -if test "x$enable_png" = xyes; then
    1.31 +if test x$enable_png = xyes -a x$enable_imageio != xyes; then
    1.32  
    1.33  pkg_failed=no
    1.34  { $as_echo "$as_me:$LINENO: checking for LIBPNG" >&5
    1.35 @@ -14407,7 +14412,7 @@
    1.36      fi
    1.37  fi
    1.38  
    1.39 -if test x$enable_tif = xyes; then
    1.40 +if test x$enable_tif = xyes -a x$enable_imageio != xyes; then
    1.41      if test "${ac_cv_header_tiffio_h+set}" = set; then
    1.42    { $as_echo "$as_me:$LINENO: checking for tiffio.h" >&5
    1.43  $as_echo_n "checking for tiffio.h... " >&6; }
     2.1 --- a/configure.in	Sun Oct 14 15:00:50 2018 +0300
     2.2 +++ b/configure.in	Sun Oct 14 17:00:00 2018 +0300
     2.3 @@ -79,8 +79,11 @@
     2.4      *-*-darwin*)
     2.5          AC_ARG_ENABLE([imageio], [AC_HELP_STRING([--enable-imageio], [use native Mac OS X frameworks for loading images [default=yes]])],
     2.6                        [], [enable_imageio=yes])
     2.7 +        dnl Show a message when we use ImageIO support so it's not a surprise
     2.8 +        AC_MSG_CHECKING([for ImageIO support])
     2.9 +        AC_MSG_RESULT($enable_imageio)
    2.10          if test x$enable_imageio = xyes; then
    2.11 -            IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
    2.12 +            IMG_LIBS="-Wl,-framework,ApplicationServices -lobjc $IMG_LIBS"
    2.13          else
    2.14              CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
    2.15          fi
    2.16 @@ -159,7 +162,7 @@
    2.17  AC_ARG_ENABLE([webp-shared], AC_HELP_STRING([--enable-webp-shared], [dynamically load WEBP support [[default=yes]]]),
    2.18   [], [enable_webp_shared=yes])
    2.19  
    2.20 -if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
    2.21 +if (test x$enable_jpg = xyes || test x$enable_tif = xyes) && test x$enable_imageio != xyes; then
    2.22      AC_CHECK_HEADER([jpeglib.h], [have_jpg_hdr=yes])
    2.23      AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], [have_jpg_lib=yes])
    2.24      if test x$have_jpg_hdr = xyes -a x$have_jpg_lib = xyes; then
    2.25 @@ -188,7 +191,7 @@
    2.26      fi
    2.27  fi
    2.28  
    2.29 -if test "x$enable_png" = xyes; then
    2.30 +if test x$enable_png = xyes -a x$enable_imageio != xyes; then
    2.31      PKG_CHECK_MODULES([LIBPNG], [libpng], [dnl
    2.32          have_png_hdr=yes
    2.33          have_png_lib=yes
    2.34 @@ -225,7 +228,7 @@
    2.35      fi
    2.36  fi
    2.37  
    2.38 -if test x$enable_tif = xyes; then
    2.39 +if test x$enable_tif = xyes -a x$enable_imageio != xyes; then
    2.40      AC_CHECK_HEADER([tiffio.h], [have_tif_hdr=yes])
    2.41      AC_CHECK_LIB([tiff], [TIFFClientOpen], [have_tif_lib=yes], [], [-lz])
    2.42      if test x$have_tif_hdr = xyes -a x$have_tif_lib = xyes; then