Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -187,10 +187,15 @@ TESTS_OBJCFLAGS="$TESTS_OBJCFLAGS -Wno-atomic-properties" ]) AC_MSG_CHECKING(whether Objective C compiler supports properties) AC_TRY_COMPILE([ + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif @interface Foo { id bar; } @@ -296,10 +301,15 @@ AC_MSG_CHECKING([whether -fobjc-runtime=objfw is supported]) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -fobjc-runtime=objfw" AC_TRY_LINK([ + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif @interface Test + (void)test; @end @implementation Test @@ -1265,10 +1275,15 @@ AS_IF([test x"$GOBJC" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror" AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to GCC bugs) 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 @@ -1427,10 +1442,15 @@ AC_MSG_CHECKING(whether -Wdocumentation works correctly) AC_TRY_COMPILE([ /*! * @class Test conftest.m conftest.m */ + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif @interface Test @end ], [ ], [ AC_MSG_RESULT(yes) @@ -1446,10 +1466,15 @@ AC_TRY_COMPILE([ #include #include + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif @interface Foo { void *foo; } @end