30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
])
AC_SUBST(NO_CONST_CFSTRINGS)
AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
@protocol OFFastEnumeration
- (int)countByEnumeratingWithState: (void*)state
objects: (struct objc_object**)objects
count: (int)count;
@end
], [
struct objc_object *n = (struct objc_object*)0;
for (struct objc_object *i in n);
], [
AC_DEFINE(OF_HAVE_FAST_ENUMERATION, 1,
[Compiler support for Fast Enumeration])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(whether Objective C compiler supports properties)
AC_TRY_COMPILE([
@interface Foo
{
id bar;
}
@property (retain, nonatomic) struct objc_object *bar;
@end
], [
Foo *foo = (struct objc_object*)0;
[foo setBar: (struct objc_object*)0];
[foo bar];
], [
AC_DEFINE(OF_HAVE_PROPERTIES, 1, [Compiler support for properties])
AC_SUBST(PROPERTIESTESTS_M, "PropertiesTests.m")
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
|
|
|
|
|
|
|
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
])
AC_SUBST(NO_CONST_CFSTRINGS)
AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
@protocol OFFastEnumeration
- (int)countByEnumeratingWithState: (void*)state
objects: (id*)objects
count: (int)count;
@end
], [
id n = (id)0;
for (id i in n);
], [
AC_DEFINE(OF_HAVE_FAST_ENUMERATION, 1,
[Compiler support for Fast Enumeration])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(whether Objective C compiler supports properties)
AC_TRY_COMPILE([
@interface Foo
{
id bar;
}
@property (retain, nonatomic) id bar;
@end
], [
Foo *foo = (id)0;
[foo setBar: (id)0];
[foo bar];
], [
AC_DEFINE(OF_HAVE_PROPERTIES, 1, [Compiler support for properties])
AC_SUBST(PROPERTIESTESTS_M, "PropertiesTests.m")
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
|