Fixed bug 1361 - Make error when building SDL_image from hg on Haiku - wants ObjectiveC compiler
authorSam Lantinga <slouken@libsdl.org>
Tue, 03 Jan 2012 22:14:17 -0500
changeset 29466fc2d8ddfbc
parent 293 b51a5e14a456
child 295 58fe012f40be
Fixed bug 1361 - Make error when building SDL_image from hg on Haiku - wants ObjectiveC compiler

Only include the Objective C source if we're building ImageIO
Makefile.am
Makefile.in
configure
configure.in
     1.1 --- a/Makefile.am	Tue Jan 03 21:37:48 2012 -0500
     1.2 +++ b/Makefile.am	Tue Jan 03 22:14:17 2012 -0500
     1.3 @@ -6,7 +6,11 @@
     1.4  libSDL_imageinclude_HEADERS =	\
     1.5  	SDL_image.h
     1.6  
     1.7 -libSDL_image_la_SOURCES =		\
     1.8 +if USE_IMAGEIO
     1.9 +IMAGEIO_SOURCE = IMG_ImageIO.m
    1.10 +endif
    1.11 +
    1.12 +libSDL_image_la_SOURCES =	\
    1.13  	IMG.c			\
    1.14  	IMG_bmp.c		\
    1.15  	IMG_gif.c		\
    1.16 @@ -20,8 +24,8 @@
    1.17  	IMG_xcf.c		\
    1.18  	IMG_xpm.c		\
    1.19  	IMG_xv.c		\
    1.20 -	IMG_webp.c	\
    1.21 -	IMG_ImageIO.m
    1.22 +	IMG_webp.c		\
    1.23 +	$(IMAGEIO_SOURCE)
    1.24  
    1.25  EXTRA_DIST =			\
    1.26  	Android.mk		\
     2.1 --- a/Makefile.in	Tue Jan 03 21:37:48 2012 -0500
     2.2 +++ b/Makefile.in	Tue Jan 03 22:14:17 2012 -0500
     2.3 @@ -71,10 +71,14 @@
     2.4  libLTLIBRARIES_INSTALL = $(INSTALL)
     2.5  LTLIBRARIES = $(lib_LTLIBRARIES)
     2.6  am__DEPENDENCIES_1 =
     2.7 +am__libSDL_image_la_SOURCES_DIST = IMG.c IMG_bmp.c IMG_gif.c IMG_jpg.c \
     2.8 +	IMG_lbm.c IMG_pcx.c IMG_png.c IMG_pnm.c IMG_tga.c IMG_tif.c \
     2.9 +	IMG_xcf.c IMG_xpm.c IMG_xv.c IMG_webp.c IMG_ImageIO.m
    2.10 +@USE_IMAGEIO_TRUE@am__objects_1 = IMG_ImageIO.lo
    2.11  am_libSDL_image_la_OBJECTS = IMG.lo IMG_bmp.lo IMG_gif.lo IMG_jpg.lo \
    2.12  	IMG_lbm.lo IMG_pcx.lo IMG_png.lo IMG_pnm.lo IMG_tga.lo \
    2.13  	IMG_tif.lo IMG_xcf.lo IMG_xpm.lo IMG_xv.lo IMG_webp.lo \
    2.14 -	IMG_ImageIO.lo
    2.15 +	$(am__objects_1)
    2.16  libSDL_image_la_OBJECTS = $(am_libSDL_image_la_OBJECTS)
    2.17  libSDL_image_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
    2.18  	--mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \
    2.19 @@ -105,7 +109,7 @@
    2.20  	$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) \
    2.21  	$(LDFLAGS) -o $@
    2.22  SOURCES = $(libSDL_image_la_SOURCES) showimage.c
    2.23 -DIST_SOURCES = $(libSDL_image_la_SOURCES) showimage.c
    2.24 +DIST_SOURCES = $(am__libSDL_image_la_SOURCES_DIST) showimage.c
    2.25  pkgconfigDATA_INSTALL = $(INSTALL_DATA)
    2.26  DATA = $(pkgconfig_DATA)
    2.27  libSDL_imageincludeHEADERS_INSTALL = $(INSTALL_HEADER)
    2.28 @@ -263,6 +267,7 @@
    2.29  libSDL_imageinclude_HEADERS = \
    2.30  	SDL_image.h
    2.31  
    2.32 +@USE_IMAGEIO_TRUE@IMAGEIO_SOURCE = IMG_ImageIO.m
    2.33  libSDL_image_la_SOURCES = \
    2.34  	IMG.c			\
    2.35  	IMG_bmp.c		\
    2.36 @@ -277,8 +282,8 @@
    2.37  	IMG_xcf.c		\
    2.38  	IMG_xpm.c		\
    2.39  	IMG_xv.c		\
    2.40 -	IMG_webp.c	\
    2.41 -	IMG_ImageIO.m
    2.42 +	IMG_webp.c		\
    2.43 +	$(IMAGEIO_SOURCE)
    2.44  
    2.45  EXTRA_DIST = \
    2.46  	Android.mk		\
     3.1 --- a/configure	Tue Jan 03 21:37:48 2012 -0500
     3.2 +++ b/configure	Tue Jan 03 22:14:17 2012 -0500
     3.3 @@ -883,6 +883,8 @@
     3.4  am__fastdepOBJC_TRUE
     3.5  am__fastdepOBJC_FALSE
     3.6  WINDRES
     3.7 +USE_IMAGEIO_TRUE
     3.8 +USE_IMAGEIO_FALSE
     3.9  USE_VERSION_RC_TRUE
    3.10  USE_VERSION_RC_FALSE
    3.11  SDL_VERSION
    3.12 @@ -3710,13 +3712,13 @@
    3.13  else
    3.14    lt_cv_nm_interface="BSD nm"
    3.15    echo "int some_variable = 0;" > conftest.$ac_ext
    3.16 -  (eval echo "\"\$as_me:3713: $ac_compile\"" >&5)
    3.17 +  (eval echo "\"\$as_me:3715: $ac_compile\"" >&5)
    3.18    (eval "$ac_compile" 2>conftest.err)
    3.19    cat conftest.err >&5
    3.20 -  (eval echo "\"\$as_me:3716: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    3.21 +  (eval echo "\"\$as_me:3718: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    3.22    (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    3.23    cat conftest.err >&5
    3.24 -  (eval echo "\"\$as_me:3719: output\"" >&5)
    3.25 +  (eval echo "\"\$as_me:3721: output\"" >&5)
    3.26    cat conftest.out >&5
    3.27    if $GREP 'External.*some_variable' conftest.out > /dev/null; then
    3.28      lt_cv_nm_interface="MS dumpbin"
    3.29 @@ -4943,7 +4945,7 @@
    3.30    ;;
    3.31  *-*-irix6*)
    3.32    # Find out which ABI we are using.
    3.33 -  echo '#line 4946 "configure"' > conftest.$ac_ext
    3.34 +  echo '#line 4948 "configure"' > conftest.$ac_ext
    3.35    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3.36    (eval $ac_compile) 2>&5
    3.37    ac_status=$?
    3.38 @@ -7104,11 +7106,11 @@
    3.39     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    3.40     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    3.41     -e 's:$: $lt_compiler_flag:'`
    3.42 -   (eval echo "\"\$as_me:7107: $lt_compile\"" >&5)
    3.43 +   (eval echo "\"\$as_me:7109: $lt_compile\"" >&5)
    3.44     (eval "$lt_compile" 2>conftest.err)
    3.45     ac_status=$?
    3.46     cat conftest.err >&5
    3.47 -   echo "$as_me:7111: \$? = $ac_status" >&5
    3.48 +   echo "$as_me:7113: \$? = $ac_status" >&5
    3.49     if (exit $ac_status) && test -s "$ac_outfile"; then
    3.50       # The compiler can only warn and ignore the option if not recognized
    3.51       # So say no if there are warnings other than the usual output.
    3.52 @@ -7443,11 +7445,11 @@
    3.53     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    3.54     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    3.55     -e 's:$: $lt_compiler_flag:'`
    3.56 -   (eval echo "\"\$as_me:7446: $lt_compile\"" >&5)
    3.57 +   (eval echo "\"\$as_me:7448: $lt_compile\"" >&5)
    3.58     (eval "$lt_compile" 2>conftest.err)
    3.59     ac_status=$?
    3.60     cat conftest.err >&5
    3.61 -   echo "$as_me:7450: \$? = $ac_status" >&5
    3.62 +   echo "$as_me:7452: \$? = $ac_status" >&5
    3.63     if (exit $ac_status) && test -s "$ac_outfile"; then
    3.64       # The compiler can only warn and ignore the option if not recognized
    3.65       # So say no if there are warnings other than the usual output.
    3.66 @@ -7548,11 +7550,11 @@
    3.67     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    3.68     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    3.69     -e 's:$: $lt_compiler_flag:'`
    3.70 -   (eval echo "\"\$as_me:7551: $lt_compile\"" >&5)
    3.71 +   (eval echo "\"\$as_me:7553: $lt_compile\"" >&5)
    3.72     (eval "$lt_compile" 2>out/conftest.err)
    3.73     ac_status=$?
    3.74     cat out/conftest.err >&5
    3.75 -   echo "$as_me:7555: \$? = $ac_status" >&5
    3.76 +   echo "$as_me:7557: \$? = $ac_status" >&5
    3.77     if (exit $ac_status) && test -s out/conftest2.$ac_objext
    3.78     then
    3.79       # The compiler can only warn and ignore the option if not recognized
    3.80 @@ -7603,11 +7605,11 @@
    3.81     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    3.82     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    3.83     -e 's:$: $lt_compiler_flag:'`
    3.84 -   (eval echo "\"\$as_me:7606: $lt_compile\"" >&5)
    3.85 +   (eval echo "\"\$as_me:7608: $lt_compile\"" >&5)
    3.86     (eval "$lt_compile" 2>out/conftest.err)
    3.87     ac_status=$?
    3.88     cat out/conftest.err >&5
    3.89 -   echo "$as_me:7610: \$? = $ac_status" >&5
    3.90 +   echo "$as_me:7612: \$? = $ac_status" >&5
    3.91     if (exit $ac_status) && test -s out/conftest2.$ac_objext
    3.92     then
    3.93       # The compiler can only warn and ignore the option if not recognized
    3.94 @@ -10361,7 +10363,7 @@
    3.95    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    3.96    lt_status=$lt_dlunknown
    3.97    cat > conftest.$ac_ext <<_LT_EOF
    3.98 -#line 10364 "configure"
    3.99 +#line 10366 "configure"
   3.100  #include "confdefs.h"
   3.101  
   3.102  #if HAVE_DLFCN_H
   3.103 @@ -10457,7 +10459,7 @@
   3.104    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   3.105    lt_status=$lt_dlunknown
   3.106    cat > conftest.$ac_ext <<_LT_EOF
   3.107 -#line 10460 "configure"
   3.108 +#line 10462 "configure"
   3.109  #include "confdefs.h"
   3.110  
   3.111  #if HAVE_DLFCN_H
   3.112 @@ -12759,6 +12761,14 @@
   3.113          fi
   3.114          ;;
   3.115  esac
   3.116 + if test x$enable_imageio = xyes; then
   3.117 +  USE_IMAGEIO_TRUE=
   3.118 +  USE_IMAGEIO_FALSE='#'
   3.119 +else
   3.120 +  USE_IMAGEIO_TRUE='#'
   3.121 +  USE_IMAGEIO_FALSE=
   3.122 +fi
   3.123 +
   3.124   if test x$use_version_rc = xtrue; then
   3.125    USE_VERSION_RC_TRUE=
   3.126    USE_VERSION_RC_FALSE='#'
   3.127 @@ -15159,6 +15169,13 @@
   3.128  Usually this means the macro was only invoked conditionally." >&2;}
   3.129     { (exit 1); exit 1; }; }
   3.130  fi
   3.131 +if test -z "${USE_IMAGEIO_TRUE}" && test -z "${USE_IMAGEIO_FALSE}"; then
   3.132 +  { { echo "$as_me:$LINENO: error: conditional \"USE_IMAGEIO\" was never defined.
   3.133 +Usually this means the macro was only invoked conditionally." >&5
   3.134 +echo "$as_me: error: conditional \"USE_IMAGEIO\" was never defined.
   3.135 +Usually this means the macro was only invoked conditionally." >&2;}
   3.136 +   { (exit 1); exit 1; }; }
   3.137 +fi
   3.138  if test -z "${USE_VERSION_RC_TRUE}" && test -z "${USE_VERSION_RC_FALSE}"; then
   3.139    { { echo "$as_me:$LINENO: error: conditional \"USE_VERSION_RC\" was never defined.
   3.140  Usually this means the macro was only invoked conditionally." >&5
   3.141 @@ -16102,6 +16119,8 @@
   3.142  am__fastdepOBJC_TRUE!$am__fastdepOBJC_TRUE$ac_delim
   3.143  am__fastdepOBJC_FALSE!$am__fastdepOBJC_FALSE$ac_delim
   3.144  WINDRES!$WINDRES$ac_delim
   3.145 +USE_IMAGEIO_TRUE!$USE_IMAGEIO_TRUE$ac_delim
   3.146 +USE_IMAGEIO_FALSE!$USE_IMAGEIO_FALSE$ac_delim
   3.147  USE_VERSION_RC_TRUE!$USE_VERSION_RC_TRUE$ac_delim
   3.148  USE_VERSION_RC_FALSE!$USE_VERSION_RC_FALSE$ac_delim
   3.149  SDL_VERSION!$SDL_VERSION$ac_delim
   3.150 @@ -16118,7 +16137,7 @@
   3.151  LTLIBOBJS!$LTLIBOBJS$ac_delim
   3.152  _ACEOF
   3.153  
   3.154 -  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then
   3.155 +  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
   3.156      break
   3.157    elif $ac_last_try; then
   3.158      { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     4.1 --- a/configure.in	Tue Jan 03 21:37:48 2012 -0500
     4.2 +++ b/configure.in	Tue Jan 03 22:14:17 2012 -0500
     4.3 @@ -86,6 +86,7 @@
     4.4          fi
     4.5          ;;
     4.6  esac
     4.7 +AM_CONDITIONAL(USE_IMAGEIO, test x$enable_imageio = xyes)
     4.8  AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
     4.9  
    4.10  dnl set this to use on systems that use lib64 instead of lib