Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -78,30 +78,31 @@ OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wwrite-strings -Wpointer-arith" old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Wcast-align" AC_MSG_CHECKING(whether -Wcast-align is buggy) - AC_TRY_COMPILE([ - #ifdef __has_attribute - # if __has_attribute(objc_root_class) - __attribute__((__objc_root_class__)) - # endif - #endif - @interface Foo - { - struct objc_class *_isa; - } - @end - - @implementation Foo - - (void)foo - { - struct objc_class *c = _isa; - (void)c; - } - @end - ], [ + AC_COMPILE_IFELSE([ + AC_LANG_SOURCE([ + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif + @interface Foo + { + struct objc_class *_isa; + } + @end + + @implementation Foo + - (void)foo + { + struct objc_class *c = _isa; + (void)c; + } + @end + ]) ], [ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(yes) OBJCFLAGS="$old_OBJCFLAGS"