ObjFW  Check-in [5ca3d6302a]

Overview
Comment:Add --enable-runtime.

This forces using the included runtime, even on OS X.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | runtime
Files: files | file ages | folders
SHA3-256: 5ca3d6302af3b6076fc1fa33ac61f89e6776e511088f508168c741532c95af46
User & Date: js on 2012-04-22 16:02:52
Other Links: branch diff | manifest | tags
Context
2012-04-22
16:05
Safer way to create the global mutex. check-in: 51b73c821c user: js tags: runtime
16:02
Add --enable-runtime. check-in: 5ca3d6302a user: js tags: runtime
15:56
Add class_registerAlias_np(). check-in: 8525f9600e user: js tags: runtime
Changes

Modified configure.ac from [11d50fbc2c] to [bc4e640e1c].

153
154
155
156
157
158
159



160
161
162
163
164
165
166
167
168
169
170

171
172
173
174
175
176
177
178
179
180



181
182
183
184
185
186
187
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")
])

objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)



AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [
	dnl TODO: This is ugly. Let's think of a better check.
	AC_EGREP_CPP(yes, [
		#import <objc/objc.h>
		#ifdef __objc_INCLUDE_GNU
		yes
		#endif
	], [
		dnl We don't want the GNU runtime
	], [
		objc_runtime="Apple runtime"

	])
])
AC_MSG_RESULT($objc_runtime)

case $objc_runtime in
	"ObjFW runtime")
		AC_DEFINE(OF_OBJFW_RUNTIME, 1,
			[Whether we use the ObjFW runtime])
		AC_SUBST(GNU_RUNTIME, "-fgnu-runtime")
		OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"




		AC_SUBST(RUNTIME, "runtime")
		if test x"$enable_shared" != x"no"; then
			AC_SUBST(RUNTIME_LIB_A, "runtime.lib.a")
			AC_SUBST(RUNTIME_RUNTIME_LIB_A, "runtime/runtime.lib.a")
		fi
		if test x"$enable_static" = x"yes" \







>
>
>
|
|
|
|
|
|
|
|
|
|
|
>










>
>
>







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")
])

objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
	AS_HELP_STRING([--enable-runtime], [use the included runtime]))
AS_IF([test x"$enable_runtime" != x"yes"], [
	AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [
		dnl TODO: This is ugly. Let's think of a better check.
		AC_EGREP_CPP(yes, [
			#import <objc/objc.h>
			#ifdef __objc_INCLUDE_GNU
			yes
			#endif
		], [
			dnl We don't want the GNU runtime
		], [
			objc_runtime="Apple runtime"
		])
	])
])
AC_MSG_RESULT($objc_runtime)

case $objc_runtime in
	"ObjFW runtime")
		AC_DEFINE(OF_OBJFW_RUNTIME, 1,
			[Whether we use the ObjFW runtime])
		AC_SUBST(GNU_RUNTIME, "-fgnu-runtime")
		OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"

		AX_CHECK_COMPILER_FLAGS(-fno-objc-nonfragile-abi, [
			OBJCFLAGS="$OBJCFLAGS -fno-objc-nonfragile-abi"])

		AC_SUBST(RUNTIME, "runtime")
		if test x"$enable_shared" != x"no"; then
			AC_SUBST(RUNTIME_LIB_A, "runtime.lib.a")
			AC_SUBST(RUNTIME_RUNTIME_LIB_A, "runtime/runtime.lib.a")
		fi
		if test x"$enable_static" = x"yes" \
207
208
209
210
211
212
213
214
215


216
217
218
219
220
221
222
		[Whether we have objc_enumerationMutation])
])

case "$host_os" in
	darwin*)
		AC_SUBST(REEXPORT_LIBOBJC, ["-Wl,-reexport-lobjc"])
		AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"])
		AC_SUBST(MACH_ALIAS_LIST,
			 ["-Xarch_x86_64 -Wl,-alias_list,mach_alias_list"])


		;;
esac

AC_C_BIGENDIAN([
	AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])
])








|
|
>
>







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
		[Whether we have objc_enumerationMutation])
])

case "$host_os" in
	darwin*)
		AC_SUBST(REEXPORT_LIBOBJC, ["-Wl,-reexport-lobjc"])
		AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"])
		AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
			tmp="-Xarch_x86_64 -Wl,-alias_list,mach_alias_list"
			AC_SUBST(MACH_ALIAS_LIST, $tmp)
		])
		;;
esac

AC_C_BIGENDIAN([
	AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])
])