ObjFW  Check-in [3e3f49406a]

Overview
Comment:Use the new GNU API if gcc >= 4.7.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3e3f49406a88189cb199bba8c791dc83cde677a5a77b564fe4a00b9638c3bc5e
User & Date: js on 2011-10-12 14:26:09
Other Links: manifest | tags
Context
2011-10-12
14:35
Use OFStreamObserver_select on Win32, even if sys/select.h is missing. check-in: fb9371a7ce user: js tags: trunk
14:26
Use the new GNU API if gcc >= 4.7. check-in: 3e3f49406a user: js tags: trunk
2011-10-11
22:35
OFProcess: Make programName and arguments optional init arguments. check-in: d605361c8b user: js tags: trunk
Changes

Modified configure.ac from [255ae73185] to [1ca508f214].

115
116
117
118
119
120
121


122
123
124

125
126
127
128
129
130
131
115
116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
131
132
133







+
+


-
+








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

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

AC_MSG_CHECKING(which Objective C runtime we use)
AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [
	dnl Only accept it if it's from gcc >= 4.7, as the one in 4.6 is buggy
	dnl when using the new API.
	AC_EGREP_CPP(yes, [
		#import <objc/objc.h>
		#ifdef __GNU_LIBOBJC__
		#ifdef __GNU_LIBOBJC__ >= 20110608
		yes
		#endif
	], [
		test x"$objc_runtime" = x"" && objc_runtime="GNU"
	], [
		dnl TODO: This is ugly. Let's think of a better check.
		AC_EGREP_CPP(yes, [
162
163
164
165
166
167
168
169
170
171
172
173
174


175
176
177
178
179
180
181
182
183
164
165
166
167
168
169
170






171
172


173
174
175
176
177
178
179







-
-
-
-
-
-
+
+
-
-







		AC_CHECK_LIB(objc, objc_msgSend, [
			LIBS="-lobjc $LIBS"
		], [
			AC_MSG_ERROR([libobjc not found!])
		])
		;;
	GNU)
		# The new API of the new GNU runtime is currently too broken to
		# be of any use, thus we even use the old API when the new one
		# is detected until the new one has been fixed and offers a way
		# to detect if it is the fixed one.
		dnl AC_DEFINE(OF_GNU_RUNTIME, 1,
		dnl	[Whether we use the GNU ObjC runtime])
		AC_DEFINE(OF_GNU_RUNTIME, 1,
			[Whether we use the GNU ObjC runtime])
		AC_DEFINE(OF_OLD_GNU_RUNTIME, 1,
			[Whether we use the old GNU ObjC runtime])

		AC_CHECK_LIB(objc, objc_msg_lookup, [
			LIBS="-lobjc $LIBS"
		], [
			AC_MSG_ERROR([libobjc not found!])
		])
		;;