ObjFW  Check-in [a31ef8bcfc]

Overview
Comment:Update buildsys
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a31ef8bcfcc31a5d4dac47d1bf76ff9e50c9263faacb0dea14e564251b34b022
User & Date: js on 2018-02-07 21:07:03
Other Links: manifest | tags
Context
2018-02-07
21:11
OFPlugin: Adjust to having proper .bundles now check-in: 45f72a3f13 user: js tags: trunk
21:07
Update buildsys check-in: a31ef8bcfc user: js tags: trunk
2018-01-24
21:40
Work around Apple assembler macros being different check-in: f38956ce92 user: js tags: trunk
Changes

Modified build-aux/m4/buildsys.m4 from [037e222758] to [c43c49a12f].

116
117
118
119
120
121
122























123
124
125
126
127
128
129
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







		for i in $(find . -name Makefile); do
			DEPSFILE="$(dirname $i)/.deps"
			test -f "$DEPSFILE" && rm "$DEPSFILE"
			touch -t 0001010000 "$DEPSFILE"
		done
	])
])

AC_DEFUN([BUILDSYS_CHECK_IOS], [
	case "$host_os" in
		darwin*)
			AC_MSG_CHECKING(whether host is iOS)
			AC_EGREP_CPP(yes, [
				#include <TargetConditionals.h>

				#if (defined(TARGET_OS_IPHONE) && \
				    TARGET_OS_IPHONE) || \
				    (defined(TARGET_OS_SIMULATOR) && \
				    TARGET_OS_SIMULATOR)
				yes
				#endif
			], [
				host_is_ios="yes"
			], [
				host_is_ios="no"
			])
			AC_MSG_RESULT($host_is_ios)
			;;
	esac
])

AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_MSG_CHECKING(whether we need an implib)
	case "$host_os" in
		cygwin* | mingw*)
			AC_MSG_RESULT(yes)
139
140
141
142
143
144
145

146
147
148
149
150
151
152
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
195
196
197
198
199
200
201
202
203
204

205
206




207
208
209
210
211
212
213
214
215
216
217
218
219

220
221




222
223
224
225
226
227
228
229
230
231
232
233
234

235
236




237
238
239
240
241
242
243
244
245
246
247
248
249

250
251


252
253
254
255
256

257
258
259
260
261
262
263
264
265
266

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
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
195
196
197
198
199
200
201
202
203
204
205
206


207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224


225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242


243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260


261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278


279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312




313








314
315
316

317
318
319
320
321
322
323
324
325
326
327







+














+
+
+
+
+
-
-
+
+
+
+













+
-
-
+
+
+
+













+
-
-
+
+
+
+













+
-
-
+
+
+
+













+
-
-
+
+
+
+













+
-
-
+
+
+
+













+


+
+





+






-
-
-
-
+
-
-
-
-
-
-
-
-



-












	AC_SUBST(PROG_IMPLIB_NEEDED)
	AC_SUBST(PROG_IMPLIB_LDFLAGS)
])

AC_DEFUN([BUILDSYS_SHARED_LIB], [
	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_REQUIRE([BUILDSYS_CHECK_IOS])
	AC_MSG_CHECKING(for shared library system)

	case "$host_os" in
		darwin*)
			AC_MSG_RESULT(Darwin)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
			LIB_PREFIX='lib'
			LIB_SUFFIX='.dylib'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
			PLUGIN_SUFFIX='.bundle'
			AS_IF([test x"$host_is_ios" = x"yes"], [
				LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out && ${LD} -o $$out/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out'
			], [
				LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out/Contents/MacOS && ${LD} -o $$out/Contents/MacOS/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out'
			])
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
			INSTALL_PLUGIN='rm -fr ${DESTDIR}${plugindir}/$$i && cp -R $$i ${DESTDIR}${plugindir}/'
			UNINSTALL_PLUGIN='rm -fr ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB=''
			;;
		mingw* | cygwin*)
			AC_MSG_RESULT(MinGW / Cygwin)
			LIB_CFLAGS=''
			LIB_LDFLAGS='-shared -Wl,--export-all-symbols,--out-implib,${SHARED_LIB}.a'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.dll'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS=''
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.dll'
			LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
			INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
			INSTALL_LIB='${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
			UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
			INSTALL_PLUGIN='${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
			UNINSTALL_PLUGIN='rm -f ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB='${SHARED_LIB}.a'
			;;
		openbsd* | mirbsd*)
			AC_MSG_RESULT(OpenBSD)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i'
			INSTALL_PLUGIN='${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
			UNINSTALL_PLUGIN='rm -f ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB=''
			;;
		solaris*)
			AC_MSG_RESULT(Solaris)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
			INSTALL_PLUGIN='${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
			UNINSTALL_PLUGIN='rm -f ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB=''
			;;
		*-android*)
			AC_MSG_RESULT(Android)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH=''
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			INSTALL_PLUGIN='${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
			UNINSTALL_PLUGIN='rm -f ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB=''
			;;
		*)
			AC_MSG_RESULT(ELF)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			INSTALL_PLUGIN='${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
			UNINSTALL_PLUGIN='rm -f ${DESTDIR}${plugindir}/$$i'
			CLEAN_LIB=''
			;;
	esac

	AC_SUBST(LIB_CFLAGS)
	AC_SUBST(LIB_LDFLAGS)
	AC_SUBST(LIB_LDFLAGS_INSTALL_NAME)
	AC_SUBST(LIB_PREFIX)
	AC_SUBST(LIB_SUFFIX)
	AC_SUBST(LDFLAGS_RPATH)
	AC_SUBST(PLUGIN_CFLAGS)
	AC_SUBST(PLUGIN_LDFLAGS)
	AC_SUBST(PLUGIN_SUFFIX)
	AC_SUBST(LINK_PLUGIN)
	AC_SUBST(INSTALL_LIB)
	AC_SUBST(UNINSTALL_LIB)
	AC_SUBST(INSTALL_PLUGIN)
	AC_SUBST(UNINSTALL_PLUGIN)
	AC_SUBST(CLEAN_LIB)
])

AC_DEFUN([BUILDSYS_FRAMEWORK], [
	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_REQUIRE([BUILDSYS_CHECK_IOS])
	AC_REQUIRE([BUILDSYS_SHARED_LIB])

	AC_CHECK_TOOL(CODESIGN, codesign)

	case "$host_os" in
		darwin*)
			AC_MSG_CHECKING(whether host is iOS)
			AC_EGREP_CPP(yes, [
				#include <TargetConditionals.h>

			AS_IF([test x"$host_is_ios" = x"yes"], [
				#if (defined(TARGET_OS_IPHONE) && \
				    TARGET_OS_IPHONE) || \
				    (defined(TARGET_OS_SIMULATOR) && \
				    TARGET_OS_SIMULATOR)
				yes
				#endif
			], [
				AC_MSG_RESULT(yes)
				FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
				FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/Frameworks/$$out/$${out%.framework}'
			], [
				AC_MSG_RESULT(no)
				FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
				FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework}'
			])

			AC_SUBST(FRAMEWORK_LDFLAGS)
			AC_SUBST(FRAMEWORK_LDFLAGS_INSTALL_NAME)

			$1
			;;
	esac
])

Modified buildsys.mk.in from [92feb15db4] to [658b38c94d].

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
59
60
61
62
63
64
65


66
67
68
69
70
71
72







-
-







PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
FRAMEWORK_LDFLAGS = @FRAMEWORK_LDFLAGS@
FRAMEWORK_LDFLAGS_INSTALL_NAME = @FRAMEWORK_LDFLAGS_INSTALL_NAME@
CODESIGN = @CODESIGN@
CODESIGN_IDENTITY ?= -
INSTALL_LIB = @INSTALL_LIB@
UNINSTALL_LIB = @UNINSTALL_LIB@
CLEAN_LIB = @CLEAN_LIB@
AS_DEPENDS = @AS_DEPENDS@
CC_DEPENDS = @CC_DEPENDS@
CXX_DEPENDS = @CXX_DEPENDS@
OBJC_DEPENDS = @OBJC_DEPENDS@
OBJCXX_DEPENDS = @OBJCXX_DEPENDS@
LN_S = @LN_S@
291
292
293
294
295
296
297
298

299
300
301
302
303
304
305
289
290
291
292
293
294
295

296
297
298
299
300
301
302
303







-
+







	else \
		${LINK_FAILED}; \
	fi

${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
	${LINK_STATUS}
	out="$@"; \
	if ${LD} -o $@ ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
	if @LINK_PLUGIN@; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
	fi

${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
	${LINK_STATUS}
685
686
687
688
689
690
691
692

693
694
695
696
697
698
699
683
684
685
686
687
688
689

690
691
692
693
694
695
696
697







-
+







		${MAKE} install || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in "" ${SHARED_LIB}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${libdir} ${INSTALL_LIB}; then \
		if ${MKDIR_P} ${DESTDIR}${libdir} && @INSTALL_LIB@; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in "" ${FRAMEWORK}; do \
716
717
718
719
720
721
722
723

724
725
726
727
728
729
730
714
715
716
717
718
719
720

721
722
723
724
725
726
727
728







-
+







			${INSTALL_FAILED}; \
		fi \
	done

	for i in "" ${PLUGIN}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \
		if ${MKDIR_P} ${DESTDIR}${plugindir} && @INSTALL_PLUGIN@; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in "" ${DATA}; do \
814
815
816
817
818
819
820
821

822
823
824
825
826
827
828
812
813
814
815
816
817
818

819
820
821
822
823
824
825
826







-
+







		${MAKE} uninstall || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in "" ${SHARED_LIB}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${libdir}/$$i; then \
			if : ${UNINSTALL_LIB}; then \
			if @UNINSTALL_LIB@; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi; \
	done

848
849
850
851
852
853
854
855
856


857
858
859
860
861
862
863
846
847
848
849
850
851
852


853
854
855
856
857
858
859
860
861







-
-
+
+







				${DELETE_FAILED}; \
			fi \
		fi \
	done

	for i in "" ${PLUGIN}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${plugindir}/$$i; then \
			if rm -f ${DESTDIR}${plugindir}/$$i; then \
		if test -e ${DESTDIR}${plugindir}/$$i; then \
			if @UNINSTALL_PLUGIN@; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done
	-rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1

Modified configure.ac from [e96d7e8c11] to [438a9335f1].

70
71
72
73
74
75
76


77
78
79
80
81
82
83
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85







+
+







AC_LANG([Objective C])
AC_PROG_OBJC([clang egcc gcc])
AC_PROG_OBJCPP
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_EGREP

BUILDSYS_CHECK_IOS

case "$host" in
	dnl OpenBSD 6.2 switched to clang for i386 and AMD64, and clang does no
	dnl longer link in libgcc. Unwinding is unfortunately in libc++abi, so
	dnl we need that. We add -pthread as libc++abi requires threads.
	i386-*-openbsd6.[[23456789]] | i386-*-openbsd[[789]].* | \
	x86_64-*-openbsd6.[[23456789]] | x86_64-*-openbsd[[789]].*)
		case "$OBJC" in
484
485
486
487
488
489
490
491
492
493
494

495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
486
487
488
489
490
491
492




493







494
495


496
497
498
499
500
501
502







-
-
-
-
+
-
-
-
-
-
-
-


-
-







			AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK,
				["-Wl,-reexport_framework,ObjFW_RT"])
		])

		AC_CHECK_HEADERS(sysdir.h)
		AC_CHECK_FUNCS(sysdir_start_search_path_enumeration)

		AC_MSG_CHECKING(whether host is iOS)
		AC_EGREP_CPP(yes, [
			#include <TargetConditionals.h>

		AS_IF([test x"$host_is_ios" = x"yes"], [
			#if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || \
			    (defined(TARGET_OS_SIMULATOR) && \
			    TARGET_OS_SIMULATOR)
			yes
			#endif
		], [
			AC_MSG_RESULT(yes)
			AC_SUBST(TESTS_STATIC_LIB, tests.a)
			TESTS_LIBS="$TESTS_LIBS -framework CoreFoundation"
		], [
			AC_MSG_RESULT(no)
		])
		;;
esac

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