Skip to content

Commit

Permalink
Fixed bug 1361 - Make error when building SDL_image from hg on Haiku …
Browse files Browse the repository at this point in the history
…- wants ObjectiveC compiler

Only include the Objective C source if we're building ImageIO
  • Loading branch information
slouken committed Jan 4, 2012
1 parent 48829cb commit 62e3da7
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 22 deletions.
10 changes: 7 additions & 3 deletions Makefile.am
Expand Up @@ -6,7 +6,11 @@ libSDL_imageincludedir = $(includedir)/SDL
libSDL_imageinclude_HEADERS = \
SDL_image.h

libSDL_image_la_SOURCES = \
if USE_IMAGEIO
IMAGEIO_SOURCE = IMG_ImageIO.m
endif

libSDL_image_la_SOURCES = \
IMG.c \
IMG_bmp.c \
IMG_gif.c \
Expand All @@ -20,8 +24,8 @@ libSDL_image_la_SOURCES = \
IMG_xcf.c \
IMG_xpm.c \
IMG_xv.c \
IMG_webp.c \
IMG_ImageIO.m
IMG_webp.c \
$(IMAGEIO_SOURCE)

EXTRA_DIST = \
Android.mk \
Expand Down
13 changes: 9 additions & 4 deletions Makefile.in
Expand Up @@ -71,10 +71,14 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__libSDL_image_la_SOURCES_DIST = IMG.c IMG_bmp.c IMG_gif.c IMG_jpg.c \
IMG_lbm.c IMG_pcx.c IMG_png.c IMG_pnm.c IMG_tga.c IMG_tif.c \
IMG_xcf.c IMG_xpm.c IMG_xv.c IMG_webp.c IMG_ImageIO.m
@USE_IMAGEIO_TRUE@am__objects_1 = IMG_ImageIO.lo
am_libSDL_image_la_OBJECTS = IMG.lo IMG_bmp.lo IMG_gif.lo IMG_jpg.lo \
IMG_lbm.lo IMG_pcx.lo IMG_png.lo IMG_pnm.lo IMG_tga.lo \
IMG_tif.lo IMG_xcf.lo IMG_xpm.lo IMG_xv.lo IMG_webp.lo \
IMG_ImageIO.lo
$(am__objects_1)
libSDL_image_la_OBJECTS = $(am_libSDL_image_la_OBJECTS)
libSDL_image_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \
Expand Down Expand Up @@ -105,7 +109,7 @@ OBJCLINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libSDL_image_la_SOURCES) showimage.c
DIST_SOURCES = $(libSDL_image_la_SOURCES) showimage.c
DIST_SOURCES = $(am__libSDL_image_la_SOURCES_DIST) showimage.c
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA)
libSDL_imageincludeHEADERS_INSTALL = $(INSTALL_HEADER)
Expand Down Expand Up @@ -263,6 +267,7 @@ libSDL_imageincludedir = $(includedir)/SDL
libSDL_imageinclude_HEADERS = \
SDL_image.h

@USE_IMAGEIO_TRUE@IMAGEIO_SOURCE = IMG_ImageIO.m
libSDL_image_la_SOURCES = \
IMG.c \
IMG_bmp.c \
Expand All @@ -277,8 +282,8 @@ libSDL_image_la_SOURCES = \
IMG_xcf.c \
IMG_xpm.c \
IMG_xv.c \
IMG_webp.c \
IMG_ImageIO.m
IMG_webp.c \
$(IMAGEIO_SOURCE)

EXTRA_DIST = \
Android.mk \
Expand Down
49 changes: 34 additions & 15 deletions configure
Expand Up @@ -883,6 +883,8 @@ OBJCDEPMODE
am__fastdepOBJC_TRUE
am__fastdepOBJC_FALSE
WINDRES
USE_IMAGEIO_TRUE
USE_IMAGEIO_FALSE
USE_VERSION_RC_TRUE
USE_VERSION_RC_FALSE
SDL_VERSION
Expand Down Expand Up @@ -3710,13 +3712,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:3713: $ac_compile\"" >&5)
(eval echo "\"\$as_me:3715: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:3716: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:3718: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:3719: output\"" >&5)
(eval echo "\"\$as_me:3721: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
Expand Down Expand Up @@ -4943,7 +4945,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4946 "configure"' > conftest.$ac_ext
echo '#line 4948 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
Expand Down Expand Up @@ -7104,11 +7106,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7107: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7109: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7111: \$? = $ac_status" >&5
echo "$as_me:7113: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
Expand Down Expand Up @@ -7443,11 +7445,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7446: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7448: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7450: \$? = $ac_status" >&5
echo "$as_me:7452: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
Expand Down Expand Up @@ -7548,11 +7550,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7551: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7553: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7555: \$? = $ac_status" >&5
echo "$as_me:7557: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -7603,11 +7605,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7606: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7608: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7610: \$? = $ac_status" >&5
echo "$as_me:7612: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -10361,7 +10363,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10364 "configure"
#line 10366 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Expand Down Expand Up @@ -10457,7 +10459,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10460 "configure"
#line 10462 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Expand Down Expand Up @@ -12759,6 +12761,14 @@ fi
fi
;;
esac
if test x$enable_imageio = xyes; then
USE_IMAGEIO_TRUE=
USE_IMAGEIO_FALSE='#'
else
USE_IMAGEIO_TRUE='#'
USE_IMAGEIO_FALSE=
fi
if test x$use_version_rc = xtrue; then
USE_VERSION_RC_TRUE=
USE_VERSION_RC_FALSE='#'
Expand Down Expand Up @@ -15159,6 +15169,13 @@ echo "$as_me: error: conditional \"am__fastdepOBJC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${USE_IMAGEIO_TRUE}" && test -z "${USE_IMAGEIO_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"USE_IMAGEIO\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"USE_IMAGEIO\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${USE_VERSION_RC_TRUE}" && test -z "${USE_VERSION_RC_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"USE_VERSION_RC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
Expand Down Expand Up @@ -16102,6 +16119,8 @@ OBJCDEPMODE!$OBJCDEPMODE$ac_delim
am__fastdepOBJC_TRUE!$am__fastdepOBJC_TRUE$ac_delim
am__fastdepOBJC_FALSE!$am__fastdepOBJC_FALSE$ac_delim
WINDRES!$WINDRES$ac_delim
USE_IMAGEIO_TRUE!$USE_IMAGEIO_TRUE$ac_delim
USE_IMAGEIO_FALSE!$USE_IMAGEIO_FALSE$ac_delim
USE_VERSION_RC_TRUE!$USE_VERSION_RC_TRUE$ac_delim
USE_VERSION_RC_FALSE!$USE_VERSION_RC_FALSE$ac_delim
SDL_VERSION!$SDL_VERSION$ac_delim
Expand All @@ -16118,7 +16137,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Expand Down
1 change: 1 addition & 0 deletions configure.in
Expand Up @@ -86,6 +86,7 @@ case "$host" in
fi
;;
esac
AM_CONDITIONAL(USE_IMAGEIO, test x$enable_imageio = xyes)
AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)

dnl set this to use on systems that use lib64 instead of lib
Expand Down

0 comments on commit 62e3da7

Please sign in to comment.