ObjFW  Check-in [3155de66ff]

Overview
Comment:configure: Clean up flags for objfw-config
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3155de66fff798b707976814e3c51857e705d08e9d01ee46be4574e43919325d
User & Date: js on 2018-08-26 17:40:52
Other Links: manifest | tags
Context
2018-08-26
18:39
Fix compilation for Wii check-in: bed2db0fd3 user: js tags: trunk
17:40
configure: Clean up flags for objfw-config check-in: 3155de66ff user: js tags: trunk
12:46
Initial support for async connect without threads check-in: 1e79c0a969 user: js tags: trunk
Changes

Modified configure.ac from [86aa9a8c41] to [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")
])

Modified extra.mk.in from [7aaf17249f] to [1f091fa6af].

80
81
82
83
84
85
86
87
88
80
81
82
83
84
85
86

87







-

UNICODE_M = @UNICODE_M@
USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@
USE_SRCS_FILES = @USE_SRCS_FILES@
USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@
USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@
USE_SRCS_THREADS = @USE_SRCS_THREADS@
USE_SRCS_WINDOWS = @USE_SRCS_WINDOWS@
WEAK_NSFOUNDATIONVERSIONNUMBER = @WEAK_NSFOUNDATIONVERSIONNUMBER@
WRAPPER = @WRAPPER@

Modified src/objfw-defs.h.in from [0dc3c9abbb] to [3a0ad24ba7].

36
37
38
39
40
41
42

43
44
45

46
47
48
49
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51







+



+




#undef OF_HAVE_SYNC_BUILTINS
#undef OF_HAVE_SYS_SOCKET_H
#undef OF_HAVE_SYS_TYPES_H
#undef OF_HAVE_THREADS
#undef OF_HAVE_UNICODE_TABLES
#undef OF_HAVE__THREAD_LOCAL
#undef OF_HAVE___THREAD
#undef OF_NINTENDO_3DS
#undef OF_NINTENDO_DS
#undef OF_OBJFW_RUNTIME
#undef OF_UNIVERSAL
#undef OF_WII
#undef SIZE_MAX
#undef UINTPTR_MAX
#undef ULLONG_MAX
#undef __have_longlong64

Modified src/platform.h from [3b74e6b7fa] to [8142b949ff].

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
134
135
136
137
138
139
140


141
142
143
144
145
146
147







-
-







#elif defined(__amigaos__)
# define OF_AMIGAOS_M68K
# define OF_AMIGAOS
#elif defined(__sun__)
# define OF_SOLARIS
#elif defined(__QNX__)
# define OF_QNX
#elif defined(__wii__)
# define OF_WII
#elif defined(_PSP)
# define OF_PSP
#elif defined(__DJGPP__)
# define OF_DJGPP
# define OF_MSDOS
#endif

Modified utils/objfw-config.in from [02c21881a2] to [1760a7df5c].

15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
15
16
17
18
19
20
21

22
23
24
25
26
27
28
29
30
31
32

33

34
35
36
37
38
39
40







-
+










-
+
-







#  file.
#

prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@"
CPPFLAGS="@DEFINES@ @INCLUDES@ -I@includedir@"
CXXFLAGS=""
OBJC="@OBJC@"
OBJCFLAGS="@NOIXEMUL@ @INTEGRATED_AS@ @RUNTIME_FLAGS@"
OBJCFLAGS="$OBJCFLAGS -fexceptions -fobjc-exceptions -funwind-tables"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString"
OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @BLOCKS_FLAGS@"
LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
LIB_PREFIX="@LIB_PREFIX@"
LIB_SUFFIX="@LIB_SUFFIX@"
LDFLAGS="@NOIXEMUL@ -fexceptions @ALLOW_MULTIPLE_DEFINITION@"
LDFLAGS="@LDFLAGS@"
LDFLAGS="$LDFLAGS @WEAK_NSFOUNDATIONVERSIONNUMBER@"
LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @RUNTIME_LIBS@ @LIBS@"
FRAMEWORK_LIBS="-F${prefix}/Library/Frameworks -framework ObjFW"
FRAMEWORK_LIBS="$FRAMEWORK_LIBS @RUNTIME_FRAMEWORK_LIBS@ @LIBS@"
PLUGIN_CFLAGS="@PLUGIN_CFLAGS@"
PLUGIN_LDFLAGS="@PLUGIN_LDFLAGS@"