@@ -7,10 +7,13 @@ AC_CONFIG_SRCDIR(src) AC_CANONICAL_HOST +dnl Used to disable checking for -pedantic on some platforms where it's broken +check_pedantic="yes" + case "$host" in *-msdosdjgpp*) enable_shared="no" enable_threads="no" enable_sockets="no" @@ -29,10 +32,11 @@ LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver" LIBS="$LIBS -lpsputility -lpspuser -lpspkernel" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO + check_pedantic="no" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ;; esac @@ -74,10 +78,11 @@ LDFLAGS="$LDFLAGS -specs=ds_arm9.specs" LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO + check_pedantic="no" AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for the Nintendo DS]) AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) @@ -1079,42 +1084,37 @@ ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) - case "$host" in - *-psp*) - # PSP headers don't work with -pedantic - ;; - *) - old_OBJCFLAGS="$OBJCFLAGS" - OBJCFLAGS="$OBJCFLAGS -pedantic" - AC_MSG_CHECKING(whether -pedantic is buggy) - AC_TRY_COMPILE([ - #import - - #ifdef __has_attribute - # if __has_attribute(objc_root_class) - __attribute__((__objc_root_class__)) - # endif - #endif - @interface Foo - { - void *foo; - } - @end - - @interface Bar: Foo - @end - ], [], [ - AC_MSG_RESULT(no) - ], [ - AC_MSG_RESULT(yes) - OBJCFLAGS="$old_OBJCFLAGS" - ]) - ;; - esac + AS_IF([test x"$check_pedantic" = x"yes"], [ + old_OBJCFLAGS="$OBJCFLAGS" + OBJCFLAGS="$OBJCFLAGS -pedantic" + AC_MSG_CHECKING(whether -pedantic is buggy) + AC_TRY_COMPILE([ + #import + + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif + @interface Foo + { + void *foo; + } + @end + + @interface Bar: Foo + @end + ], [], [ + AC_MSG_RESULT(no) + ], [ + AC_MSG_RESULT(yes) + OBJCFLAGS="$old_OBJCFLAGS" + ]) + ]) ]) AS_IF([test x"$cross_compiling" = x"yes"], [ AC_SUBST(BIN_PREFIX, "${host_alias}-")