ObjFW  Diff

Differences From Artifact [86aa9a8c41]:

To Artifact [a5d93e137e]:


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
87
88
89
90
91
92
93


94
95
96
97
98
99
100







-
-







		enable_threads="no"
		enable_sockets="no"
		;;
	*-*-mingw*)
		LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
		LIBS="$LIBS -lversion"

		AC_SUBST(ALLOW_MULTIPLE_DEFINITION,
			[-Wl,--allow-multiple-definition])
		AC_SUBST(USE_SRCS_WINDOWS, '${SRCS_WINDOWS}')
		;;
	*-psp-*)
		AS_IF([test x"$DEVKITPSP" = x""], [
			AC_MSG_ERROR(
				[DEVKITPSP is not set! Please set DEVKITPSP.])
		])
141
142
143
144
145
146
147



148
149
150
151
152
153
154
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155







+
+
+







	CPPFLAGS="$CPPFLAGS -DGEKKO -I$DEVKITPRO/libogc/include"
	LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -meabi -mhard-float"
	LIBS="$LIBS -L$DEVKITPRO/libogc/lib/wii -lfat -logc"
	TESTS_LIBS="$TESTS_LIBS -lwiiuse -lbte"
	enable_shared="no"
	enable_threads="no"	# TODO

	AC_DEFINE(OF_WII, 1, [Whether we are compiling for Wii])
	AC_SUBST(DEFINES, "-DGEKKO")
	AC_SUBST(INCLUDES, '-I$DEVKITPRO/libogc/include')
	AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])

AC_ARG_WITH(nds,
	AS_HELP_STRING([--with-nds], [build for Nintendo DS]))
AS_IF([test x"$with_nds" = x"yes"], [
	AS_IF([test x"$DEVKITPRO" = x""], [
162
163
164
165
166
167
168
169
170



171
172
173
174
175
176
177
163
164
165
166
167
168
169


170
171
172
173
174
175
176
177
178
179







-
-
+
+
+







	LDFLAGS="$LDFLAGS -specs=ds_arm9.specs"
	LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9"
	enable_shared="no"
	enable_threads="no"	# TODO
	enable_sockets="no"	# TODO
	check_pedantic="no"

	AC_DEFINE(OF_NINTENDO_DS, 1,
		[Whether we are compiling for the Nintendo DS])
	AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for Nintendo DS])
	AC_SUBST(DEFINES, "-DARM9")
	AC_SUBST(INCLUDES, '-I$DEVKITPRO/libnds/include')
	AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])

AC_ARG_WITH(3ds,
	AS_HELP_STRING([--with-3ds], [build for Nintendo 3DS]))
AS_IF([test x"$with_3ds" = x"yes"], [
	AS_IF([test x"$DEVKITPRO" = x""], [
186
187
188
189
190
191
192
193



194
195
196
197
198
199
200
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204







-
+
+
+







	LDFLAGS="$LDFLAGS -mfloat-abi=hard -mtp=soft -mword-relocations"
	LIBS="$LIBS -L$DEVKITPRO/libctru/lib -lctru"
	enable_shared="no"
	enable_threads="no"	# TODO
	check_pedantic="no"

	AC_DEFINE(OF_NINTENDO_3DS, 1,
		[Whether we are compiling for the Nintendo 3DS])
		[Whether we are compiling for Nintendo 3DS])
	AC_SUBST(DEFINES, "-DARM11")
	AC_SUBST(INCLUDES, '-I$DEVKITPRO/libctru/include')
	AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])

CPP="$OBJCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS -DOF_COMPILING_OBJFW"
OBJCFLAGS="$OBJCFLAGS -Wall -fexceptions -fobjc-exceptions -funwind-tables"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString"
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
593
594
595
596
597
598
599


600
601
602
603
604
605
606







-
-







case "$host_os" in
	darwin*)
		AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"])
		AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
			AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"])
			AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK,
				["-Wl,-reexport-lobjc"])
			AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER,
				["-Wl,-U,_NSFoundationVersionNumber"])
			LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber"
		])

		AS_IF([test x"$objc_runtime" = x"ObjFW runtime"], [
			AS_IF([test x"$exception_type" = x"DWARF"], [
				LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_v0"
			])
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1770
1771
1772
1773
1774
1775
1776

1777
1778
1779
1780
1781
1782
1783







-







	AS_IF([test x"$with_wii" = x"yes"], [
		dnl Keep this lowercase, as WIILOAD is a variable used by
		dnl wiiload and thus likely already set by the user to something
		dnl that is not the path of the wiiload binary.
		AC_CHECK_PROG(wiiload, wiiload, wiiload)

		AS_IF([test x"$wiiload" != x""], [
			AC_SUBST(RUN_TESTS, "run")
			AC_SUBST(WRAPPER, "$wiiload")
		])
	])
], [
	AC_SUBST(RUN_TESTS, "run")
])