ObjFW  Diff

Differences From Artifact [7b44bd66cf]:

To Artifact [4a2a23a23f]:


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
70
71
	], [
	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(PROPERTIESTESTS_M, "PropertiesTests.m")
	AC_MSG_RESULT(yes)








	], [

	AC_MSG_RESULT(no)])





AC_CHECK_HEADERS([objfw-rt.h objc/objc.h])

test x"$ac_cv_header_objfw_rt_h" = x"yes" && objc_runtime="ObjFW-RT"

if test x"$ac_cv_header_objc_objc_h" = x"yes"; then
	dnl TODO: This is ugly. Let's think of a better check.







<
|




















>
>
>
>
>
>
>
>

>
|
>
>
>
>







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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
	], [
	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(PROPERTIESTESTS_M, "PropertiesTests.m")
	AC_MSG_RESULT(yes)
	], [AC_MSG_RESULT(no)])

AC_MSG_CHECKING(whether Objective C compiler supports blocks)
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -fblocks"
AC_TRY_COMPILE([], [
	int (^foo)(int bar);
	foo = ^(int bar) { return 0; }
	], [
	AC_DEFINE(OF_HAVE_BLOCKS, 1, [Compiler support for blocks])
	AC_MSG_RESULT(yes)
	], [
	AC_MSG_RESULT(no)
	OBJCFLAGS="$old_OBJCFLAGS"
	])

AC_CHECK_HEADERS([objfw-rt.h objc/objc.h])

test x"$ac_cv_header_objfw_rt_h" = x"yes" && objc_runtime="ObjFW-RT"

if test x"$ac_cv_header_objc_objc_h" = x"yes"; then
	dnl TODO: This is ugly. Let's think of a better check.