26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
#import <objc/objc.h>
], [
id n = nil;
for (id i in n);
], [
AC_DEFINE(OF_HAVE_FAST_ENUMERATION, 1, [Fast Enumeration support])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)])
AC_MSG_CHECKING(which Objective C runtime we use)
dnl TODO: This is ugly. Let's think of a better check.
AC_EGREP_CPP(gnu, [
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
26
27
28
29
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
|
AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
#import <objc/objc.h>
], [
id n = nil;
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([
#import <objc/objc.h>
@interface Foo
{
id bar;
}
@property (retain, nonatomic) id bar;
@end
], [
Foo *foo = nil;
[foo setBar: nil];
[foo bar];
], [
AC_DEFINE(OF_HAVE_PROPERTIES, 1, [Compiler support for properties])
AC_SUBST(PROPERTIES_M, "properties.m")
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)])
AC_MSG_CHECKING(which Objective C runtime we use)
dnl TODO: This is ugly. Let's think of a better check.
AC_EGREP_CPP(gnu, [
|