ObjFW  Diff

Differences From Artifact [2adbb067d7]:

To Artifact [da87975601]:


21
22
23
24
25
26
27

















28
29
30
31
32
33
34
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)

AC_DEFINE(OF_CONFIGURED, 1, [Define so that we know we got our config.h])


















BUILDSYS_LIB
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
if test x"$PLUGIN_SUFFIX" != "x"; then
	AC_SUBST(OFPLUGIN_M, "OFPlugin.m")
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







21
22
23
24
25
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
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)

AC_DEFINE(OF_CONFIGURED, 1, [Define so that we know we got our config.h])

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, [
	#import <objc/objc.h>
	#ifdef __objc_INCLUDE_GNU
	gnu
	#endif
	], [
	AC_DEFINE(OF_GNU_RUNTIME, 1, [Whether we use the GNU ObjC runtime])
	AC_SUBST(RUNTIME_DEF, "-DOF_GNU_RUNTIME")
	objc_runtime="GNU"
	], [
	AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime])
	AC_SUBST(RUNTIME_DEF, "-DOF_APPLE_RUNTIME")
	objc_runtime="Apple"])
AC_MSG_RESULT($objc_runtime)

BUILDSYS_LIB
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
if test x"$PLUGIN_SUFFIX" != "x"; then
	AC_SUBST(OFPLUGIN_M, "OFPlugin.m")
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
		], [
		AC_MSG_RESULT(yes)
		size_max="SIZE_T_MAX"], [
		AC_MSG_RESULT(no)
		size_max="((size_t)-1)"])
	AC_DEFINE_UNQUOTED(SIZE_MAX, $size_max, [Maximum value for size_t])])

AC_CHECK_HEADER(objc/runtime.h,
	[AC_DEFINE(HAVE_OBJC_RUNTIME_H, 1, [Whether we have objc/runtime.h])])

AC_CHECK_FUNC(objc_sync_enter,, [
	AC_SUBST(OBJC_SYNC, "objc_sync")
	AC_SUBST(OBJC_SYNC_M, "objc_sync.m")
	AC_DEFINE(NEED_OBJC_SYNC_INIT, 1,
		[Whether objc_sync_init needs to be called])])

AC_CHECK_FUNC(asprintf, [







<
<
<







77
78
79
80
81
82
83



84
85
86
87
88
89
90
		], [
		AC_MSG_RESULT(yes)
		size_max="SIZE_T_MAX"], [
		AC_MSG_RESULT(no)
		size_max="((size_t)-1)"])
	AC_DEFINE_UNQUOTED(SIZE_MAX, $size_max, [Maximum value for size_t])])




AC_CHECK_FUNC(objc_sync_enter,, [
	AC_SUBST(OBJC_SYNC, "objc_sync")
	AC_SUBST(OBJC_SYNC_M, "objc_sync.m")
	AC_DEFINE(NEED_OBJC_SYNC_INIT, 1,
		[Whether objc_sync_init needs to be called])])

AC_CHECK_FUNC(asprintf, [