@@ -29,12 +29,21 @@ AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings" AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings") ]) -AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32, - [OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"]) +AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32, [ + old_OBJCFLAGS="$OBJCFLAGS" + OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32 -Werror" + AC_TRY_COMPILE([ + #import + ], [], [ + OBJCFLAGS="$old_OBJCFLAGS -Wshorten-64-to-32" + ], [ + OBJCFLAGS="$old_OBJCFLAGS" + ]) +]) AX_CHECK_COMPILER_FLAGS(-Wsemicolon-before-method-body, [OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"]) AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration) AC_TRY_COMPILE([