1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
|
Legend:
* Changes of existing features or bugfixes
+ New features
This file only contains the most significant changes.
ObjFW 1.0.4 -> ObjFW 1.0.5, 2023-11-05
* Fixes the calculation of the extra alignment in OFAllocObject()
* Fixes +[OFSystemInfo networkInterfaces] on OpenBSD and Windows 98
* Fixes OFSocketAddressString() for AppleTalk addresses
* Uses GetModuleHandle() instead of LoadLibrary() where possible on Windows
* Disables tests for global blocks on Win64 due to broken compilers
* Adds PGP keys to verify tarballs and commits in the code repository
ObjFW 1.0.3 -> ObjFW 1.0.4, 2023-10-08
* Fixes OFFile closing fd 0 when initialization fails
* Fixes -[stringByAppendingPathComponent:] on empty strings
* Fixes +[OFSystemInfo operatingSystemName] and
+[OFSystemInfo operatingSystemVersion] returning nil on some systems
* Adds a license for localizations
ObjFW 1.0.2 -> ObjFW 1.0.3, 2023-09-14
* Fixes -[OFConcreteData initWithItemSize:] not setting freeWhenDone to true,
which resulted in a memory leak
* Fixes -[OFData initWithContentsOfIRI:] freeing the buffer in @catch instead
of @finally, which resulted in a memory leak
ObjFW 1.0.1 -> ObjFW 1.0.2, 2023-09-11
* The build system has been updated to fix building .frameworks and to build
them differently for macOS and iOS
ObjFW 1.0 -> ObjFW 1.0.1, 2023-09-10
* Hanging connections with OFTLSStream have been fixed when using OpenSSL
* The same fix as for OpenSSL has been applied to GnuTLS and SecureTransport
out of caution, even though there have been no hangs in practice
* The build system has been updated to fix building .frameworks among other
minor changes
* Some headers have been changed to fix compatibility with ObjC++
* Warnings about empty .o files on x86_64 Darwin have been fixed
* The OFDate documentation has been improved to list supported formats
ObjFW 0.90.2 -> ObjFW 1.0, 2023-08-29
+ First stable release with stable API and ABI
* Too many changes to list, as it has been almost 6 years since the last
release. See commits in the repository for details.
ObjFW 0.90.1 -> ObjFW 0.90.2, 23.10.2017
ObjFW 0.90.1 -> ObjFW 0.90.2, 2017-10-23
* Fix shadowed variables which caused many bugs (e.g. using the wrong object)
* Many, many nullability fixes
* OFTCPSocket: Fix exception not being retained for async connect
* OFThread: Fix setting the name on the wrong thread
* OFMutableSet: Fix missing override for -[copy]
* configure: Fix posix_spawnp check
* Xcode project: Set the correct version for the bridge
* Better check for iOS
* tests: Fix testing the wrong OFKernelEventObserver
ObjFW 0.90 -> ObjFW 0.90.1, 20.08.2017
ObjFW 0.90 -> ObjFW 0.90.1, 2017-08-20
* OFData: Fix -[description]
* OFFileManager: Set errno to 0 before readdir()
* OFDate: Add -[localMinute]
* OFTarArchiveEntry: Fix prefix handling for ustar
* OFZIPArchive: Fix uncompressed + data descriptor
* OFArray: Fix MessagePack encoding
* of_asprintf: Don't require set up OFLocalization
* OFGZIPStream: Add missing documentation
* Fix a linker warning on OpenBSD/SPARC64
* Remove the OFFile b modes from MorphOS
(they were already removed for all other OSes)
ObjFW 0.8.1 -> ObjFW 0.90, 01.08.2017
ObjFW 0.8.1 -> ObjFW 0.90, 2017-08-01
+ New classes: OFFileManager, OFGZIPStream, OFTarArchive, OFTarArchiveEntry
OFHMAC, OFSandbox, OFHTTPCookie, OFHTTPCookieManager,
OFLocalization
+ New platforms: Nintendo 3DS, MorphOS
+ New lookup assembly for platforms: SPARC64/ELF, ARM64/ELF
+ New forwarding for: ARM64/ELF
+ New tools: objfw-new (to create boilerplate code)
|
︙ | | |
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
-
+
-
+
|
* OFHash was renamed to OFCryptoHash
+ PBKDF2
+ scrypt
+ Xcode project to build for iOS
+ String decomposition to NFD
* OFFile modes simplified ('b' removed)
ObjFW 0.8 -> ObjFW 0.8.1, 04.10.2015
ObjFW 0.8 -> ObjFW 0.8.1, 2015-10-04
* Adjust to __nullable / __nonnull being changed to _Nullable / _Nonnull in
Clang 3.7 (this fixes compilation with Clang 3.7)
* Blocks: Proper handling when called from a byref handler
* Fix compilation on Solaris
* Fix compilation for Wii, PSP and Nintendo DS
* OFProcess: Send SIGTERM on close instead of SIGKILL
* OFZIPArchive: Throw invalid format exception on failed seeks
* Make sure of_hash_seed is never initialized to 0
* Special cases for the Wii's weird network stack (fixes the tests)
* Better length checks for write / send calls
* Don't use -pedantic on platforms where it's broken by the system headers
* Documentation fixes
ObjFW 0.7.1 -> ObjFW 0.8, 14.08.2015
ObjFW 0.7.1 -> ObjFW 0.8, 2015-08-14
+ An insanely huge amount of new APIs
+ New classes: OFHTTPServer, OFINICategory, OFINIFile, OFInflate64Stream,
OFInflateStream, OFMapTable, OFRIPEMD160Hash, OFSHA224Hash, OFSHA256Hash,
OFSHA384Hash, OFSHA512Hash, OFSettings, OFStdIOStream, OFSystemInfo,
OFUDPSocket, OFZIPArchive, OFZIPArchiveEntry
+ New utils: ofzip, ofhash, ofhttp
|
︙ | | |
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
-
+
-
+
|
* OFProcess improvements for Win32
+ epoll support for OFKernelEventObserver
* Rewritten OFMD5Hash and OFSHA1Hash
* Reworked OFTLSSocket API (easier verification)
* Unicode support updated to Unicode 8.0
* OFURL: Proper escaping and unescaping
ObjFW 0.7 -> ObjFW 0.7.1, 12.11.2012
ObjFW 0.7 -> ObjFW 0.7.1, 2012-11-12
+ Support for Haiku
* Autorelease pools now work properly without __thread
* Incorrect framework version in Xcode project fixed
* Documentation fixes and improvements
* Blocks now only use 16 bits for the reference count in order to avoid
problems with newer Clang versions
* More use of OF_SENTINEL
ObjFW 0.6 -> ObjFW 0.7, 27.10.2012
ObjFW 0.6 -> ObjFW 0.7, 2012-10-27
Again, the differences are more than in any release before, thus listing them
all would be too much. The major differences are:
+ ObjFW now comes with its own runtime, which greatly increases performance
compared to the GNU runtime and is even faster than the Apple runtime
(using Clang >= 3.2 is recommended, but not necessary)
* Support for the GNU runtime has been dropped
+ New, much faster autorelease pool implementation (now inside the runtime)
|
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
* Strings are allocated faster now
+ Support for JSON5
* All private methods use the prefix OF_ now instead of _, making it possible
to use the _ prefix in applications
* Most ObjC compiler feature checks are not part of configure anymore, making
it possible to use the same installation with different compilers
ObjFW 0.5.4 -> ObjFW 0.6, 27.02.2012
ObjFW 0.5.4 -> ObjFW 0.6, 2012-02-27
The differences between 0.5.4 and 0.6 are too big to list them all. However,
the major new features are:
* OFString, OFArray, OFDictionary, OFSet and OFCountedSet are now class
clusters
+ Serialization and deserialization of objects into/from XML and JSON
+ New class OFIntrospection for introspecting classes
+ New class OFProcess for working with and controlling child processes
* Lots of OFXMLParser and OFXMLElement improvements
+ OFHTTPRequests can have a delegate now for status updates and processing
data as soon as it arrives
+ There are several backends for OFStreamObserver now, including kqueue, poll
and select
+ SOCKS5 support for OFTCPSockets (client only)
* Several API changes
ObjFW 0.5.3 -> ObjFW 0.5.4, 30.08.2011
ObjFW 0.5.3 -> ObjFW 0.5.4, 2011-08-30
* The blocks runtime is now working correctly
* Documentation fixes
* -framework works with objfw-compile now
+ Support for QNX
* Various small fixes
ObjFW 0.5.2 -> ObjFW 0.5.3, 01.07.2011
ObjFW 0.5.2 -> ObjFW 0.5.3, 2011-07-01
* Lots of bugfixes, see Git log for details
ObjFW 0.5.1 -> ObjFW 0.5.2, 25.04.2011
ObjFW 0.5.1 -> ObjFW 0.5.2, 2011-04-25
* Fix double-retain in OFList
* Don't ignore the timeout in OFStreamObserver when using select()
* Do -[OFURL copy] in a try block to prevent a leak when an exception occurs
* Fix too big buffer in -[OFMutableString _applyTable:withSize:]
* Call madvise() on the correct length variable so it covers the whole string
* Fix a warning when sizeof(size_t) < sizeof(long long)
* Skip possible BOMs when appending strings
ObjFW 0.5 -> ObjFW 0.5.1, 21.04.2011
ObjFW 0.5 -> ObjFW 0.5.1, 2011-04-21
* Work around a wrong warning produced by Apple GCC 4.0.1 which would cause
the build to fail due to -Werror
* Call objc_thread_{add,remove} when using the GNU runtime to make sure the
runtime knows about our thread
* Detach a thread before restarting if it was never joined
* Release the old return value when restarting a thread
ObjFW 0.4-alpha1 -> 0.5, 09.04.2011
ObjFW 0.4-alpha1 -> 0.5, 2011-04-09
+ %@ is now allowed in format strings
+ Added of_log for easy logging
* Exceptions have one header per exception now
* Lots of exception improvements
* Huge improvements in XML handling
* Improvements in socket handling, including improved API
* OFStreamObserver is now thread-safe and stops the current observe call when
the set of streams to observe is modified
+ New class OFURL
+ New class OFHTTPRequest
+ New class OFCondition
* Improvements in objfw-compile
+ Blocks can be used together with Cocoa now
+ When linking ObjFW and Cocoa, OFAutoreleasePools are used by both now
+ Support for Base64
+ Use a real Xcode project instead of just calling make
+ Add Haiku to the list of supported platforms
* Lots of small bugfixes and countless small changes. Read the commits!
ObjFW 0.3.1 -> 0.4-alpha1, 03.01.2011
ObjFW 0.3.1 -> 0.4-alpha1, 2011-01-03
* ObjFW is now available under the terms of the QPL, GPLv2 and GPLv3
+ Support for blocks was added, including a blocks runtime
+ Added support for the new GNU runtime, introduced in GCC 4.6
* Objects returned from collections are no longer retained and autoreleased
+ Added new classes OFXMLParser, OFXMLElement, OFXMLAttribute and
OFXMLElementBuilder
+ Added new class OFStreamObserver to observe streams
+ Added new class OFDate for storing dates
+ Many new methods in almost all classes
* OFAutoreleasePool was optimized
* Handling of ASCII strings was optimized
* OFSocket was renamed to OFStreamSocket
* OFConstString was renamed to OFConstantString
* objfw-compile now has a new syntax
+ objfw-compile can now compile libraries and plugins
* Many small changes and new features that would be too much to list here
The diff between 0.3.1 and 0.4-alpha1 has almost 24000 lines!
ObjFW 0.3 -> 0.3.1, 19.06.2010
ObjFW 0.3 -> 0.3.1, 2010-06-19
* Fix a typo in OFMutableDictionary that prevented termination in case
the last bucket is already used when the dictionary is resized
* The mutations pointer is now correctly initialized in enumerators for
immutable collections
* The objc_sync test was still using the old threads API and was
updated to use the new one now
* PLATFORMS has been updated to be more specific
ObjFW 0.2.1 -> 0.3, 09.05.2010
ObjFW 0.2.1 -> 0.3, 2010-05-09
+ Many new methods were added to different classes
+ A huge amount of methods was added to OFStream, allowing easy binary
stream handling and even mixing string-based and binary operations
+ An optional write buffer was added to OFStream
+ OFSeekableStream was added for streams that allow seeking, for example
OFFiles
* OFNumber was completely reworked and got many new features now
|
︙ | | |
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
-
+
-
+
|
* The instance variable naming convention was changed so that properties work
+ Properties were added to the interfaces and are used if they are supported
by the compiler
+ The library version is now included in the resulting dylib and libobjc is
reexported now. Additionally, objfw-config offers --reexport now to produce
libraries that link against ObjFW and reexport it
ObjFW 0.2 -> 0.2.1, 14.03.2010
ObjFW 0.2 -> 0.2.1, 2010-03-14
* Fix for OFNumbers not doing calculations
* Improved -[hash] for OFNumbers with floats and doubles
+ Tests for OFNumber
* Small optimization for OFArray's -[componentsJoinedByString:]
* Documentation improvements
* Updated copyright
ObjFW 0.1.2 -> 0.2, 01.02.2010
ObjFW 0.1.2 -> 0.2, 2010-02-01
+ Support for ObjC 2 Fast Enumerations on every platform which has
compiler support for fast enumerations
+ Support for ObjC 2 properties on every platform with compiler support
+ Fast Enumeration through arrays and dictionaries
* OFIterator has been removed
+ OFEnumerator was added to replace OFIterator, which is more general
and works with arrays and dictionaries
|
︙ | | |
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
-
+
-
+
-
+
|
* The interfaces of OFSocket and OFStream were cleaned up and some
methods were moved to OFTCPSocket, as they make sense only there
* File methods unavailable on Windows don't throw an exception at
runtime anymore, but instead are not even in the interface on
Windows. This way, it is a compile time error instead of a runtime
error
ObjFW 0.1.1 -> 0.1.2, 15.01.2010
ObjFW 0.1.1 -> 0.1.2, 2010-01-15
* Fix a bug in OFMutableArray's -[removeObject:] and
-[removeObjectIdenticalTo:] that could lead to not removing all
occurrences of the object from the array and to out of bounds reads
* Change the URL in the framework plist to the homepage
ObjFW 0.1 -> 0.1.1, 04.01.2010
ObjFW 0.1 -> 0.1.1, 2010-01-04
* Fix a missing out of range check for -[removeNItems:atIndex:] that
allowed the programmer to specify too big ranges so it would crash
instead of throwing an exception
* Fix missing calls to -[retain] and -[autorelease] when getting
objects from an OFArray or OFDictionary
* Safer and more fault-tolerant way to remove objects from an
OFMutableArray
* Calling +[dealloc] throws an exception now. If someone really calls
[SomeClass dealloc], this should be punished and not ignored, as
this is a serious programmer error
* -[readLineWithEncoding:] is more fault-tolerant now and does not
lose data when it stumbles upon invalid encoding. Instead, it allows
recalling with the correct encoding now
ObjFW 0.1, 24.12.2009
ObjFW 0.1, 2009-12-24
+ Initial release
|
︙ | | |
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
+
|
* Runtimes: ObjFW
DragonFlyBSD
------------
* OS Versions: 3.0, 3.3-DEVELOPMENT
* Architectures: x86, x86_64
* Architectures: AMD64, x86
* Compilers: GCC 4.4.7
* Runtimes: ObjFW
FreeBSD
-------
* OS Versions: 9.1-rc3, 10.0
* Architectures: x86_64
* Architectures: AMD64
* Compilers: Clang 3.1, Clang 3.3
* Runtimes: ObjFW
GNU/Hurd
--------
* OS Versions: 0.9
* Architectures: i686
* Compilers: Clang 14.0.6
* Runtimes: ObjFW
Haiku
-----
* OS version: r1-alpha4
* Architectures: x86
* Compilers: Clang 3.2, GCC 4.6.3
* Runtimes: ObjFW
HP-UX
-----
* OS versions: 11i v1 (PA-RISC 2.0), 11i v3 (Itanium)
* OS versions: 11i v1, 11i v3
* Architectures: Itanium, PA-RISC 2.0
* Compilers: GCC 4.7.2, GCC 7.5.0
* Runtimes: ObjFW
* Notes: Exception handling on Itanium in 32 bit mode is broken, you need to
use 64 bit mode by passing `OBJC="gcc -mlp64"` to `configure`.
iOS
---
* Architectures: ARMv7, ARM64
* Compilers: Clang
* Runtimes: Apple
Linux
-----
* Architectures: Alpha, ARMv6, ARMv7, ARM64, Itanium, m68k, MIPS (O32),
MIPS64 (N64), RISC-V 64, PowerPC, S390x, SuperH-4, x86,
* Architectures: Alpha, AMD64, ARMv6, ARMv7, ARM64, Itanium, m68k, MIPS (O32),
MIPS64 (N64), RISC-V 64, PowerPC, S390x, SuperH-4, x86
x86_64
* Compilers: Clang 3.0-10.0, GCC 4.6-10.0
* C libraries: glibc, musl
* Runtimes: ObjFW
macOS
-----
* OS Versions: 10.5, 10.7-10.15, Darling
* Architectures: PowerPC, PowerPC64, x86, x86_64
* Architectures: AMD64, PowerPC, PowerPC64, x86
* Compilers: Clang 3.1-10.0, Apple GCC 4.0.1 & 4.2.1
* Runtimes: Apple, ObjFW
MiNT
----
|
︙ | | |
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
-
-
+
+
|
* Runtimes: ObjFW
NetBSD
------
* OS Versions: 5.1-9.0
* Architectures: ARM, ARM (big endian, BE8 mode), MIPS (O32), PowerPC, SPARC,
SPARC64, x86, x86_64
* Architectures: AMD64, ARM, ARM (big endian, BE8 mode), MIPS (O32), PowerPC,
SPARC, SPARC64, x86
* Compilers: Clang 3.0-3.2, GCC 4.1.3 & 4.5.3 & 7.4.0
* Runtimes: ObjFW
Nintendo 3DS
------------
|
︙ | | |
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
-
+
|
* Limitations: No sockets, no shared libraries, not tested on real hardware
OpenBSD
-------
* OS Versions: 5.2-6.7
* Architectures: MIPS64, PA-RISC, PowerPC, SPARC64, x86_64
* Architectures: AMD64, MIPS64, PA-RISC, PowerPC, SPARC64
* Compilers: GCC 6.3.0, Clang 4.0
* Runtimes: ObjFW
PlayStation Portable
--------------------
|
︙ | | |
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
-
-
+
+
+
|
* Compilers: GCC 4.6.1
* Runtimes: ObjFW
Solaris
-------
* OS Versions: OpenIndiana 2015.03
* Architectures: x86, x86_64
* Compilers: Clang 3.4.2, GCC 4.8.3
* OS Versions: OpenIndiana 2015.03, OpenIndiana 2023.04, Oracle Solaris 11.4
* Architectures: AMD64, x86
* Compilers: Clang 3.4.2, Clang 11.0.0, Clang 13.0.1, GCC 4.8.3, GCC 10.4.0
* Runtimes: ObjFW
Wii
---
* OS Versions: 4.3E / Homebrew Channel 1.1.0
|
︙ | | |
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
-
+
-
-
-
+
+
-
+
|
* Limitations: No files, no threads, no sockets, no shared libraries, not
tested on real hardware
Windows
-------
* OS Versions: 98 SE, NT 4.0, XP (x86), 7 (x64), 8 (x64), 8.1 (x64), 10, 11,
* OS Versions: 98 SE, NT 4.0, XP, 7, 8, 8.1, 10, 11, Wine
Wine (x86 & x64)
* Architectures: x86, x86_64, AArch64
* Compilers: GCC 5.3.0 & 6.2.0 from msys2 (x86 & x64),
* Architectures: AArch64, AMD64, x86
* Compilers: GCC 5.3.0 & 6.2.0 from msys2 (AMD64 & x86),
Clang 3.9.0 from msys2 (x86),
Clang 10.0 from msys2 (x86 & x86_64),
Clang 10.0 from msys2 (AMD64 & x86),
Clang 14.0.4 from msys2 (AArch64)
* Runtimes: ObjFW
Others
------
|
︙ | | |
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
+
-
|
==========
As forwarding needs hand-written assembly for each combination of CPU
architecture, executable format and calling convention, it is only available
for the following platforms (except resolveClassMethod: and
resolveInstanceMethod:, which are always available):
* AMD64 (SysV/ELF, Apple/Mach-O, Mach-O, Win64/PE)
* ARM (EABI/ELF, Apple/Mach-O)
* ARM64 (ARM64/ELF, Apple/Mach-O)
* MIPS (O32/ELF, EABI/ELF)
* PowerPC (SysV/ELF, EABI/ELF, Apple/Mach-O)
* SPARC (SysV/ELF)
* SPARC64 (SysV/ELF)
* x86 (SysV/ELF, Apple/Mach-O, Win32/PE)
* x86_64 (SysV/ELF, Apple/Mach-O, Mach-O, Win64/PE)
Apple/Mach-O means both, the Apple ABI and runtime, while Mach-O means the
ObjFW runtime on Mach-O.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
+
-
+
|
There are three ways you are probably reading this right now:
* On [ObjFW](https://objfw.nil.im/)'s homepage, via Fossil's web interface
* On [GitHub](https://github.com/ObjFW/ObjFW)
* Via an editor or pager, by opening `README.md` from a clone or tarball
ObjFW is developed using Fossil, so if you are reading this on GitHub or any
other place, you are most likely using a mirror.
<h1 id="table-of-contents">Table of Contents</h1>
* [What is ObjFW?](#what)
* [Installation](#installation)
* [License](#license)
* [Releases](#releases)
* [Cloning the repository](#cloning)
* [Installation](#installation)
* [Building from source](#building-from-source)
* [macOS and iOS](#macos-and-ios)
* [Building as a framework](#building-framework)
* [Using the macOS or iOS framework in Xcode](#framework-in-xcode)
* [Broken Xcode versions](#broken-xcode-versions)
* [Windows](#windows)
* [Getting MSYS2](#getting-msys2)
* [Setting up MSYS2](#setting-up-msys2)
|
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
ObjFW is intentionally incompatible with Foundation. This has two reasons:
* GNUstep already provides a reimplementation of Foundation, which is only
compatible to a certain degree. This means that a developer still needs to
care about differences between frameworks if they want to be portable. The
idea behind ObjFW is that a developer does not need to concern themselves
with portablility and making sure their code works with multiple
with portability and making sure their code works with multiple
frameworks: Instead, if it works it ObjFW on one platform, they can
reasonably expect it to also work with ObjFW on another platform. ObjFW
behaving differently on different operating systems (unless inevitable
because it is a platform-specific part, like the Windows Registry) is
considered a bug and will be fixed.
* Foundation predates a lot of modern Objective-C concepts. The most
prominent one is exceptions, which are only used in Foundation as a
replacement for `abort()`. This results in cumbersome error handling,
especially in initializers, which in Foundation only return `nil` on error
with no indication of what went wrong. It also means that the return of
every `init` call needs to be checked against `nil`. But in the wild,
nobody actually checks *each and every* return from `init` against `nil`,
leading to bugs. ObjFW fixes this by making exceptions a first class
citizen.
ObjFW also comes with its own lightweight and extremely fast Objective-C
runtime, which in real world use cases was found to be significantly faster
than both GNU's and Apple's runtime.
<h1 id="installation">Installation</h1>
ObjFW packages are available for various operating systems and can be
installed as following:
Operating System | Command
---------------------------|---------------------------------------------
Alpine Linux | `doas apk add objfw`
CRUX | `sudo prt-get depinst objfw`
Fedora | `sudo dnf install objfw`
FreeBSD | `sudo pkg install objfw`
Haiku | `pkgman install objfw`
Haiku (gcc2h) | `pkgman install objfw_x86`
macOS (Homebrew) | `brew install objfw`
macOS (pkgsrc) | `cd $PKGSRCDIR/devel/objfw && make install`
NetBSD | `cd /usr/pkgsrc/devel/objfw && make install`
OpenBSD | `doas pkg_add objfw`
OpenIndiana | `sudo pkg install developer/objfw`
Windows (MSYS2/MINGW32) | `pacman -S mingw-w64-i686-objfw`
Windows (MSYS2/CLANG64) | `pacman -S mingw-w64-clang-x86_64-objfw`
Windows (MSYS2/CLANGARM64) | `pacman -S mingw-w64-clang-aarch64-objfw`
If your operating system is not listed, you can
<a href="#building-from-source">build ObjFW from source</a>.
<h1 id="license">License</h1>
ObjFW is released under three licenses:
* [QPL](LICENSE.QPL)
* [GPLv2](LICENSE.GPLv2)
* [GPLv3](LICENSE.GPLv3)
The QPL allows you to use ObjFW in any open source project. Because the GPL
does not allow using code under any other license, ObjFW is also available
under the GPLv2 and GPLv3 to allow GPL-licensed projects to use ObjFW.
You can pick under which of those three licenses you want to use ObjFW. If
none of them work for you, contact me and we can find a solution.
<h1 id="releases">Releases</h1>
Releases of ObjFW, as well as changelogs and the accompanying documentation
Releases of ObjFW, as well as change logs and the accompanying documentation,
can be found [here](https://objfw.nil.im/wiki?name=Releases).
<h1 id="cloning">Cloning the repository</h1>
ObjFW is developed in a [Fossil](https://fossil-scm.org) repository, with
automatic incremental exports to Git. This means you can either clone the
|
︙ | | |
113
114
115
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
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
|
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
|
-
-
-
-
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
+
+
|
You can then use Fossil's web interface to browse the timeline, tickets,
wiki pages, etc.:
$ cd objfw
$ fossil ui
It's also possible to open the same local repository multiple times, so that
you have multiple working directories all backed by the same local
repository.
In order to verify the signature of the currently checked out checkin, you
can use:
$ fossil artifact current | gpg --verify
Please note that not all checkins are signed, as the signing key only resides
on trusted systems. This means that checkins I perform on e.g. Windows are
unsigned. However, usually it should not take long until there is another
signed checkin. Alternatively, you can go back until the last signed checkin
and review changes from there on.
<h2 id="cloning-git">Git</h2>
To clone the Git repository, use the following:
$ git clone https://github.com/ObjFW/ObjFW
Git commits are not signed, so if you want to check the signature of an
individual commit, branch head or tag, please use Fossil.
<h1 id="installation">Installation</h1>
<h1 id="building-from-source">Building from source</h1>
To install ObjFW, just run the following commands:
To build ObjFW from source and install it, just run the following commands:
$ ./configure
$ make
$ make check
$ sudo make install
In case you checked out ObjFW from the Fossil or Git repository, you need to
run the following command first:
$ ./autogen.sh
<h2 id="macos-and-ios">macOS and iOS</h2>
<h3 id="building-framework">Building as a framework</h3>
When building for macOS or iOS, everything is built as a `.framework` by
default if `--disable-shared` has not been specified to `./configure`. The
frameworks will end up in `$PREFIX/Library/Frameworks`.
To build for macOS, just follow the
<a href="#installation">regular instructions</a> above.
<a href="#building-from-source">regular instructions</a> above.
To build for iOS, follow the regular instructions, but instead of
`./configure` do something like this:
$ clang="clang -isysroot $(xcrun --sdk iphoneos --show-sdk-path)"
$ export OBJC="$clang -arch armv7 -arch arm64"
$ export OBJCPP="$clang -arch armv7 -E"
$ export IPHONEOS_DEPLOYMENT_TARGET="9.0"
$ clang="xcrun --sdk iphoneos clang"
$ export OBJC="$clang -arch arm64e -arch arm64"
$ export OBJCPP="$clang -arch arm64e -E"
$ export IPHONEOS_DEPLOYMENT_TARGET="10.0"
$ ./configure --prefix=/usr/local/ios --host=arm64-apple-darwin
To build for the iOS simulator, follow the regular instructions, but instead
of `./configure` use something like this:
$ clang="clang -isysroot $(xcrun --sdk iphonesimulator --show-sdk-path)"
$ export OBJC="$clang -arch arm64 -arch x86_64"
$ clang="xcrun --sdk iphonesimulator clang"
$ export OBJC="$clang -arch $(uname -m)"
$ export OBJCPP="$clang -arch arm64 -E"
$ export IPHONEOS_DEPLOYMENT_TARGET="9.0"
$ ./configure --prefix=/usr/local/iossim --host=arm64-apple-darwin
$ export IPHONEOS_DEPLOYMENT_TARGET="10.0"
$ ./configure --prefix=/usr/local/iossim --host=$(uname -m)-apple-darwin
<h3 id="framework-in-xcode">Using the macOS or iOS framework in Xcode</h3>
To use the macOS framework in Xcode, you need to add the `.framework`s to
your project and add the following flags to `Other C Flags`:
-fconstant-string-class=OFConstantString -fno-constant-cfstrings
|
︙ | | |
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
-
+
|
<h1 id="first-app">Writing your first application with ObjFW</h1>
To create your first, empty application, you can use `objfw-new`:
$ objfw-new --app MyFirstApp
This creates a file `MyFirstApp.m`. The `-[applicationDidFinishLaunching]`
This creates a file `MyFirstApp.m`. The `-[applicationDidFinishLaunching:]`
method is called as soon as ObjFW finished all initialization. Use this as
the entry point to your own code. For example, you could add the following
line there to create a "Hello World":
[OFStdOut writeLine: @"Hello World!"];
You can compile your new app using `objfw-compile`:
|
︙ | | |
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
|
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
|
+
+
+
+
+
-
-
-
-
-
-
-
-
+
|
<h1 id="support">Support and community</h1>
If you have any questions about ObjFW or would like to talk to other ObjFW
users, the following venues are available:
* The [forum](https://objfw.nil.im/forum)
* A [Matrix room](https://matrix.to/#/%23objfw:nil.im)
* A [Discord room](https://objfw.nil.im/discord), bridged to the Matrix
room above
* A [Telegram room](https://t.me/objfw), bridged to the Matrix room above
* A [Slack room](https://objfw.nil.im/slack), bridged to the Matrix room
above
* An IRC channel named `#objfw` on `irc.oftc.net`
([Web chat](https://webchat.oftc.net/?channels=%23objfw)), bridged to the
Matrix room above
* A [Slack channel](https://objfw.nil.im/slack), bridged to the Matrix room
above
* A [Discord channel](https://objfw.nil.im/discord), bridged to the Matrix
room above
* A [Telegram room](https://t.me/objfw), bridged to the Matrix room above
* A [Gitter room](https://gitter.im/ObjFW/ObjFW), bridged to the Matrix room
above
Please don't hesitate to join any or all of those!
<h1 id="donating">Donating</h1>
If you want to donate to ObjFW, you can read about possible ways to do so
[here](https://objfw.nil.im/wiki?name=Donating).
<h1 id="thanks">Thanks</h1>
* Thank you to [Jonathan Neuschäfer](https://github.com/neuschaefer) for
reviewing the *entirety* (all 84k LoC at the time) of ObjFW's codebase in
2017!
* Thank you to [Hill Ma](https://github.com/mahiuchun) for donating an M1 Mac
Mini to the project!
Mini to the project in 2022!
<h1 id="commercial-use">Commercial use</h1>
If for whatever reason neither the terms of the QPL nor those of the GPL work
for you, a proprietary license for ObjFW including support is available upon
request. Just write a mail to js@nil.im and we can find a reasonable solution
for both parties.
|
1
2
3
4
5
6
7
8
9
10
|
1
2
3
4
5
6
7
8
9
10
|
-
+
|
dnl
dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017,
dnl 2018, 2020, 2021
dnl 2018, 2020, 2021, 2022, 2023
dnl Jonathan Schleifer <js@nil.im>
dnl
dnl https://fossil.nil.im/buildsys
dnl
dnl Permission to use, copy, modify, and/or distribute this software for any
dnl purpose with or without fee is hereby granted, provided that the above
dnl copyright notice and this permission notice is present in all copies.
|
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
+
+
+
+
|
AC_DEFUN([BUILDSYS_INIT], [
AC_REQUIRE([AC_CANONICAL_BUILD])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_ENABLE(rpath,
AS_HELP_STRING([--disable-rpath], [do not use rpath]))
AC_ARG_ENABLE(silent-rules,
AS_HELP_STRING([--disable-silent-rules],
[print executed commands during build]))
case "$build_os" in
darwin*)
case "$host_os" in
darwin*)
AC_SUBST(BUILD_AND_HOST_ARE_DARWIN, yes)
;;
esac
|
︙ | | |
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
153
154
155
156
157
|
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
+
+
+
+
+
+
+
|
"$($TPUT AF 3 2>/dev/null)")
AC_SUBST(TERM_SETAF4,
"$($TPUT AF 4 2>/dev/null)")
AC_SUBST(TERM_SETAF6,
"$($TPUT AF 6 2>/dev/null)")
fi
])
AS_IF([test x"$enable_silent_rules" != x"no"], [
AC_SUBST(SILENT, '.SILENT:')
AC_SUBST(MAKEFLAGS_SILENT, '-s')
])
])
])
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"
AC_SUBST(HOST_IS_IOS, yes)
], [
host_is_ios="no"
])
AC_MSG_RESULT($host_is_ios)
AC_CHECK_TOOL(CODESIGN, codesign)
;;
esac
])
AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_MSG_CHECKING(whether we need an implib)
|
︙ | | |
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
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)
AC_MSG_CHECKING(for shared library type)
case "$host" 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'
AS_IF([test x"$enable_rpath" != x"no"], [
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
])
PLUGIN_CFLAGS='-fPIC -DPIC'
PLUGIN_LDFLAGS='-bundle ${PLUGIN_LDFLAGS_BUNDLE_LOADER}'
PLUGIN_SUFFIX='.bundle'
AS_IF([test x"$host_is_ios" = x"yes"], [
LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && ${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 && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Contents/Info.plist; fi && ${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_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'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX=''
LIB_SUFFIX='${LIB_MAJOR}.dll'
LINK_LIB='&& rm -f lib$${out%${LIB_SUFFIX}}.dll.a && ${LN_S} $$out lib$${out%${LIB_SUFFIX}}.dll.a'
PLUGIN_CFLAGS=''
PLUGIN_LDFLAGS='-shared -Wl,--export-all-symbols'
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 lib$${i%${LIB_SUFFIX}}.dll.a ${DESTDIR}${libdir}/lib$${i%${LIB_SUFFIX}}.dll.a'
UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/lib$${i%${LIB_SUFFIX}}.dll.a'
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
CLEAN_LIB='${SHARED_LIB}.a ${SHARED_LIB_NOINST}.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}'
AS_IF([test x"$enable_rpath" != x"no"], [
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_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=$$out.${LIB_MAJOR}.${LIB_MINOR}'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX='lib'
LIB_SUFFIX='.so'
AS_IF([test x"$enable_rpath" != x"no"], [
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_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=$$out.${LIB_MAJOR}'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX='lib'
LIB_SUFFIX='.so'
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}.${LIB_PATCH} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH} ${DESTDIR}${libdir}/$$i'
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH}'
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
CLEAN_LIB=''
;;
hppa*-*-hpux*)
AC_MSG_RESULT([HP-UX (PA-RISC)])
LIB_CFLAGS='-fPIC -DPIC'
LIB_LDFLAGS='-shared -Wl,+h,$$out'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX='lib'
LIB_SUFFIX='.${LIB_MAJOR}'
LINK_LIB='&& rm -f $${out%%.*}.sl && ${LN_S} $$out $${out%%.*}.sl'
AS_IF([test x"$enable_rpath" != x"no"], [
LDFLAGS_RPATH='-Wl,+b,${libdir}'
])
PLUGIN_CFLAGS='-fPIC -DPIC'
PLUGIN_LDFLAGS='-shared'
PLUGIN_SUFFIX='.sl'
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i && ${LN_S} -f $$i ${DESTDIR}${libdir}/$${i%%.*}.sl'
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%%.*}.sl'
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
CLEAN_LIB=''
;;
ia64*-*-hpux*)
AC_MSG_RESULT([HP-UX (Itanium)])
LIB_CFLAGS='-fPIC -DPIC'
LIB_LDFLAGS='-shared -Wl,+h,$$out'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX='lib'
LIB_SUFFIX='.${LIB_MAJOR}'
LINK_LIB='&& rm -f $${out%%.*}.so && ${LN_S} $$out $${out%%.*}.so'
AS_IF([test x"$enable_rpath" != x"no"], [
LDFLAGS_RPATH='-Wl,+b,${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 && ${LN_S} -f $$i ${DESTDIR}${libdir}/$${i%%.*}.so'
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%%.*}.so'
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=$$out.${LIB_MAJOR}'
LIB_LDFLAGS_INSTALL_NAME=''
LIB_PREFIX='lib'
LIB_SUFFIX='.so'
AS_IF([test x"$enable_rpath" != x"no"], [
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}.${LIB_PATCH} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH} ${DESTDIR}${libdir}/$$i'
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.${LIB_PATCH}'
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(LINK_LIB)
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*)
AS_IF([test x"$host_is_ios" = x"yes"], [
FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
AS_IF([test x"$host_is_ios" = x"yes"], [
FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/Frameworks/$$out/$${out%.framework}'
], [
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)
AC_SUBST(FRAMEWORK_LIBS)
$1
;;
esac
])
AC_DEFUN([BUILDSYS_PLUGIN], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([BUILDSYS_CHECK_IOS])
AC_MSG_CHECKING(for plugin type)
case "$host" in
*-*-darwin*)
AC_MSG_RESULT(Darwin)
PLUGIN_CFLAGS='-fPIC -DPIC'
PLUGIN_LDFLAGS='-bundle ${PLUGIN_LDFLAGS_BUNDLE_LOADER}'
PLUGIN_SUFFIX='.bundle'
AS_IF([test x"$host_is_ios" = x"yes"], [
LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && ${LD} -o $$out/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} $$out'
], [
LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out/Contents/MacOS && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Contents/Info.plist; fi && ${LD} -o $$out/Contents/MacOS/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} $$out'
])
INSTALL_PLUGIN='&& rm -fr ${DESTDIR}${plugindir}/$$i && cp -R $$i ${DESTDIR}${plugindir}/'
UNINSTALL_PLUGIN='&& rm -fr ${DESTDIR}${plugindir}/$$i'
;;
*-*-mingw* | *-*-cygwin*)
AC_MSG_RESULT(MinGW / Cygwin)
PLUGIN_CFLAGS=''
PLUGIN_LDFLAGS='-shared -Wl,--export-all-symbols'
PLUGIN_SUFFIX='.dll'
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
;;
hppa*-*-hpux*)
AC_MSG_RESULT([HP-UX (PA-RISC)])
PLUGIN_CFLAGS='-fPIC -DPIC'
PLUGIN_LDFLAGS='-shared'
PLUGIN_SUFFIX='.sl'
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
;;
*)
AC_MSG_RESULT(ELF)
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_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
;;
esac
AC_SUBST(PLUGIN_CFLAGS)
AC_SUBST(PLUGIN_LDFLAGS)
AC_SUBST(PLUGIN_SUFFIX)
AC_SUBST(LINK_PLUGIN)
AC_SUBST(INSTALL_PLUGIN)
AC_SUBST(UNINSTALL_PLUGIN)
])
|
1
2
3
4
5
6
7
8
9
10
|
1
2
3
4
5
6
7
8
9
10
|
-
+
|
#
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017, 2018, 2020, 2021
# 2017, 2018, 2020, 2021, 2022, 2023
# Jonathan Schleifer <js@nil.im>
#
# https://fossil.nil.im/buildsys
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice is present in all copies.
|
︙ | | |
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
153
154
|
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
-
+
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
DEPS = ${OBJS:.o=.dep} \
${LIB_OBJS:.o=.dep} \
${AMIGA_LIB_OBJS:.o=.dep} \
${PLUGIN_OBJS:.o=.dep}
MO_FILES = ${LOCALES:.po=.mo}
.SILENT:
@SILENT@
.SUFFIXES:
.SUFFIXES: .amigalib.o .beam .c .cc .class .cxx .d .erl .lib.o .java .mo .m .mm .o .plugin.o .po .py .pyc .rc .S .xpm
.PHONY: all subdirs subdirs-after pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales copy-headers-into-framework ${SUBDIRS} ${SUBDIRS_AFTER}
.SUFFIXES: .amigalib.o .beam .c .cc .class .cxx .d .erl .lib.o .java \
.mo .m .mm .o .plugin.o .po .py .pyc .rc .S .xpm
.PHONY: all subdirs subdirs-after pre-depend depend install \
install-extra uninstall uninstall-extra clean distclean locales \
copy-headers-into-framework ${SUBDIRS} ${SUBDIRS_AFTER}
all:
${MAKE} -s pre-all
${MAKE} -s subdirs
${MAKE} -s depend
${MAKE} -s ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${FRAMEWORK} ${FRAMEWORK_NOINST} ${AMIGA_LIB} ${AMIGA_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
${MAKE} -s subdirs-after
${MAKE} -s post-all
${MAKE} @MAKEFLAGS_SILENT@ pre-all
${MAKE} @MAKEFLAGS_SILENT@ subdirs
${MAKE} @MAKEFLAGS_SILENT@ depend
${MAKE} @MAKEFLAGS_SILENT@ \
${STATIC_LIB} ${STATIC_LIB_NOINST} \
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} \
${STATIC_AMIGA_LIB}${STATIC_AMIGA_LIB_NOINST} \
${SHARED_LIB} ${SHARED_LIB_NOINST} \
${FRAMEWORK} ${FRAMEWORK_NOINST} \
${AMIGA_LIB} ${AMIGA_LIB_NOINST} \
${PLUGIN} ${PLUGIN_NOINST} \
${PROG} ${PROG_NOINST} \
${JARFILE} locales
${MAKE} @MAKEFLAGS_SILENT@ subdirs-after
${MAKE} @MAKEFLAGS_SILENT@ post-all
pre-all post-all:
subdirs: ${SUBDIRS}
subdirs-after: ${SUBDIRS_AFTER}
${SUBDIRS} ${SUBDIRS_AFTER}:
for i in $@; do \
${DIR_ENTER}; \
${MAKE} -s || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ || exit $$?; \
${DIR_LEAVE}; \
done
depend: pre-depend
: >.deps
for i in "" ${DEPS}; do \
test x"$$i" = x"" && continue; \
|
︙ | | |
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
|
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
|
-
+
+
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
+
+
-
+
+
-
+
+
+
|
else \
${LINK_FAILED}; \
fi
${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
if test x"${JAR_MANIFEST}" != x""; then \
if ${JAR} cfm ${JARFILE} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}; then \
if ${JAR} cfm ${JARFILE} ${JAR_MANIFEST} ${OBJS} \
${OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi \
else \
if ${JAR} cf ${JARFILE} ${OBJS} ${OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi \
fi
${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
out="$@"; \
if ${LD} -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LIB_LDFLAGS} ${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS} ${LINK_LIB}; then \
if ${LD} -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LIB_LDFLAGS} \
${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS} ${LINK_LIB}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi
${FRAMEWORK} ${FRAMEWORK_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
out="$@"; \
if test x"@HOST_IS_IOS@" = x"yes"; then \
if rm -fr $@ && \
${MAKE} @MAKEFLAGS_SILENT@ \
COPY_HEADERS_IF_SUBDIR=${includesubdir} \
if rm -fr $$out && ${MKDIR_P} $$out && ${MAKE} -s COPY_HEADERS_IF_SUBDIR=${includesubdir} COPY_HEADERS_DESTINATION=$$PWD/$@/Headers copy-headers-into-framework && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && if test -f module.modulemap; then ${MKDIR_P} $$out/Modules && ${INSTALL} -m 644 module.modulemap $$out/Modules/module.modulemap; fi && ${LD} -o $$out/$${out%.framework} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${FRAMEWORK_LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} $$out; then \
${LINK_OK}; \
else \
rm -fr $$out; false; \
${LINK_FAILED}; \
COPY_HEADERS_DESTINATION=$$PWD/$@/Headers \
copy-headers-into-framework && \
if test -f Info.plist; then \
${INSTALL} -m 644 Info.plist $@/Info.plist; \
fi && \
if test -f module.modulemap; then \
${MKDIR_P} $@/Modules && \
${INSTALL} -m 644 module.modulemap \
$@/Modules/module.modulemap; \
fi && \
${LD} -o $@/$${out%.framework} \
${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} \
${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} \
${FRAMEWORK_LIBS} && \
${CODESIGN} -fs ${CODESIGN_IDENTITY} $@; then \
${LINK_OK}; \
else \
rm -fr $$out; false; \
${LINK_FAILED}; \
fi; \
else \
versiondir="$@/Versions/${LIB_MAJOR}"; \
if rm -fr $@ && \
${MKDIR_P} $$versiondir && \
${LN_S} ${LIB_MAJOR} $@/Versions/Current && \
${MAKE} @MAKEFLAGS_SILENT@ \
COPY_HEADERS_IF_SUBDIR=${includesubdir} \
COPY_HEADERS_DESTINATION=$$PWD/$$versiondir/Headers \
copy-headers-into-framework && \
${LN_S} Versions/Current/Headers $@/Headers && \
if test -f Info.plist; then \
${MKDIR_P} $$versiondir/Resources && \
${INSTALL} -m 644 Info.plist \
$$versiondir/Resources/Info.plist && \
${LN_S} Versions/Current/Resources $@/Resources; \
fi && \
if test -f module.modulemap; then \
${MKDIR_P} $$versiondir/Modules && \
${INSTALL} -m 644 module.modulemap \
$$versiondir/Modules/module.modulemap && \
${LN_S} Versions/Current/Modules $@/Modules; \
fi && \
${LD} -o $$versiondir/$${out%.framework} \
${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} \
${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} \
${FRAMEWORK_LIBS} && \
${LN_S} Versions/Current/$${out%.framework} \
$@/$${out%.framework} && \
${CODESIGN} -fs ${CODESIGN_IDENTITY} $@; then \
${LINK_OK}; \
else \
rm -fr $$out; false; \
${LINK_FAILED}; \
fi; \
fi
copy-headers-into-framework:
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
cd $$i || exit 1; \
${MAKE} -s copy-headers-into-framework || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ copy-headers-into-framework || \
exit $$?; \
cd .. || exit 1; \
done
if test x"${includesubdir}" = x"${COPY_HEADERS_IF_SUBDIR}"; then \
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${MKDIR_P} \
${MKDIR_P} $$(dirname ${COPY_HEADERS_DESTINATION}/$$i) || exit $$?; \
${INSTALL} -m 644 $$i ${COPY_HEADERS_DESTINATION}/$$i || exit $$?; \
$$(dirname ${COPY_HEADERS_DESTINATION}/$$i) || \
exit $$?; \
${INSTALL} -m 644 $$i \
${COPY_HEADERS_DESTINATION}/$$i || exit $$?; \
done \
fi
${AMIGA_LIB} ${AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}
${AMIGA_LIB} ${AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS_START} \
${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}
${LINK_STATUS}
if ${LD} -o $@ ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA} ${AMIGA_LIB_LDFLAGS} ${AMIGA_LIB_LIBS}; then \
if ${LD} -o $@ ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS} \
${AMIGA_LIB_OBJS_EXTRA} ${AMIGA_LIB_LDFLAGS} \
${AMIGA_LIB_LIBS}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi
${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
${LINK_STATUS}
|
︙ | | |
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
-
+
+
-
+
+
|
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} \
${LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
if /usr/bin/libtool -static -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA}; then \
if /usr/bin/libtool -static -o $@ ${LIB_OBJS} \
${LIB_OBJS_EXTRA}; then \
${LINK_OK}; \
else \
rm -f $@; false; \
${LINK_FAILED}; \
fi; \
else \
out="$@"; \
|
︙ | | |
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
|
-
+
+
|
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}
${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS} \
${AMIGA_LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
out="$@"; \
objs=""; \
ars=""; \
for i in ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}; do \
case $$i in \
|
︙ | | |
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
|
locales: ${MO_FILES}
.c.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} \
-c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.c.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} \
${DEP_CFLAGS} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.c.amigalib.o:
${COMPILE_AMIGA_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} \
${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
${COMPILE_AMIGA_LIB_OK}; \
else \
${COMPILE_AMIGA_LIB_FAILED}; \
fi
.c.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} \
${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
.cc.o .cxx.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
if ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} \
${DEP_CXXFLAGS} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.cc.lib.o .cxx.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} \
${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.cc.amigalib.o .cxx.amigalib.o:
${COMPILE_AMIGA_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CXX} ${AMIGA_LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
if ${CXX} ${AMIGA_LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} \
${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
${COMPILE_AMIGA_LIB_OK}; \
else \
${COMPILE_AMIGA_LIB_FAILED}; \
fi
.cc.plugin.o .cxx.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} \
${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
.d.o:
${COMPILE_STATUS}
|
︙ | | |
481
482
483
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
|
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
-
+
+
-
+
+
-
+
+
+
+
+
-
+
-
+
+
+
+
+
-
+
+
+
-
+
+
+
-
+
+
-
+
-
+
-
+
+
-
+
+
|
${COMPILE_FAILED}; \
fi
.m.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} \
${DEP_OBJCFLAGS} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.m.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} \
${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.m.amigalib.o:
${COMPILE_AMIGA_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${OBJC} ${AMIGA_LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
if ${OBJC} ${AMIGA_LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} \
${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
${COMPILE_AMIGA_LIB_OK}; \
else \
${COMPILE_AMIGA_LIB_FAILED}; \
fi
.m.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} \
${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
.mm.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${OBJCXX} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
if ${OBJCXX} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} \
${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.mm.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} \
${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ \
$<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.mm.amigalib.o:
${COMPILE_AMIGA_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${OBJCXX} ${AMIGA_LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
if ${OBJCXX} ${AMIGA_LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} \
${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ \
$<; then \
${COMPILE_AMIGA_LIB_OK}; \
else \
${COMPILE_AMIGA_LIB_FAILED}; \
fi
.mm.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} \
${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ \
$<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
.po.mo:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${MSGFMT} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.py.pyc:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \
if ${PYTHON} ${PYTHON_FLAGS} -c \
"import py_compile; py_compile.compile('$<')"; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.rc.o .rc.lib.o .rc.plugin.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${RC} ${RCFLAGS} ${CPPFLAGS} -J rc -O coff -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.S.o .S.amigalib.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${AS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
if ${AS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} \
${DEP_ASFLAGS} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.S.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} \
${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.S.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} \
${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
.xpm.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ \
$<; then \
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
fi
.xpm.lib.o:
${COMPILE_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} \
-x c -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
${COMPILE_LIB_FAILED}; \
fi
.xpm.amigalib.o:
${COMPILE_AMIGA_LIB_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} \
${CFLAGS_$@} -x c -c -o $@ $<; then \
${COMPILE_AMIGA_LIB_OK}; \
else \
${COMPILE_AMIGA_LIB_FAILED}; \
fi
.xpm.plugin.o:
${COMPILE_PLUGIN_STATUS}
in="$<"; \
out="$@"; \
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} \
${CFLAGS_$@} -x c -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
fi
install: all install-extra
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
${DIR_ENTER}; \
${MAKE} -s install || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ 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 \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; \
if ${MKDIR_P} ${DESTDIR}${prefix}/Library/Frameworks && cp -R $$i ${DESTDIR}${prefix}/Library/Frameworks/; then \
if ${MKDIR_P} ${DESTDIR}${prefix}/Library/Frameworks && \
cp -R $$i ${DESTDIR}${prefix}/Library/Frameworks/; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${AMIGA_LIB}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${amigalibdir} && ${INSTALL} -m 755 $$i ${DESTDIR}${amigalibdir}/$$i; then \
if ${MKDIR_P} ${DESTDIR}${amigalibdir} && \
${INSTALL} -m 755 $$i ${DESTDIR}${amigalibdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB} ${STATIC_AMIGA_LIB}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
if ${MKDIR_P} ${DESTDIR}${libdir} && \
${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${PLUGIN}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${plugindir} @INSTALL_PLUGIN@; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${DATA}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} $$(dirname \
${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i) && \
${INSTALL} -m 644 $$i \
if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${PROG}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
if ${MKDIR_P} ${DESTDIR}${bindir} && \
${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
if test x"${INSTALL_INCLUDES}" = x"yes"; then \
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} $$(dirname \
${DESTDIR}${includedir}/${includesubdir}/$$i) && \
${INSTALL} -m 644 $$i \
if ${MKDIR_P} $$(dirname ${DESTDIR}${includedir}/${includesubdir}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done \
fi
for i in "" ${MO_FILES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
dest="${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo"; \
dest="${DESTDIR}$$dest"; \
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && \
${INSTALL} -m 644 $$i $$dest; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${MAN}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
dest="${DESTDIR}${mandir}/${mansubdir}/$$i"; \
if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && \
${INSTALL} -m 644 $$i $$dest; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
install-extra:
uninstall: uninstall-extra
uninstall:
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
${DIR_ENTER}; \
${MAKE} -s uninstall || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ uninstall || exit $$?; \
${DIR_LEAVE}; \
done
for i in "" ${SHARED_LIB}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${libdir}/$$i -o -f ${DESTDIR}${bindir}/$$i; then \
if test -f ${DESTDIR}${libdir}/$$i \
-o -f ${DESTDIR}${bindir}/$$i; then \
if : @UNINSTALL_LIB@; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi; \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
if test -d ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
if rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
if rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; \
then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
rmdir ${DESTDIR}${prefix}/Library/Frameworks >/dev/null 2>&1 || true
|
︙ | | |
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
|
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
|
-
+
+
-
+
+
-
+
+
-
-
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
-
+
+
-
+
|
fi \
done
rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1 || true
for i in "" ${DATA}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
if rm -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
if rm -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; \
then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi; \
rmdir "$$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i)" >/dev/null 2>&1 || true; \
rmdir "$$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i)" \
>/dev/null 2>&1 || true; \
done
rmdir ${DESTDIR}${datadir}/${PACKAGE_NAME} >/dev/null 2>&1 || true
for i in "" ${PROG}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${bindir}/$$i; then \
if rm -f ${DESTDIR}${bindir}/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; \
then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1 || true
for i in "" ${MO_FILES}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
if rm -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
mo="${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo"; \
mo="${DESTDIR}$$mo"; \
if test -f $$mo; then \
if rm -f $$mo; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
for i in "" ${MAN}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
${MAKE} @MAKEFLAGS_SILENT@ uninstall-extra
uninstall-extra:
clean:
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
${DIR_ENTER}; \
${MAKE} -s clean || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ clean || exit $$?; \
${DIR_LEAVE}; \
done
: >.deps
for i in "" ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${AMIGA_LIB} ${AMIGA_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST} ${FRAMEWORK} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
for i in "" ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} \
${LIB_OBJS_EXTRA} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_START} \
${AMIGA_LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} \
${SHARED_LIB} ${SHARED_LIB_NOINST} ${AMIGA_LIB} \
${AMIGA_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} \
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${STATIC_AMIGA_LIB} \
${STATIC_AMIGA_LIB_NOINST} ${FRAMEWORK} ${PLUGIN} ${PLUGIN_NOINST} \
${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
test x"$$i" = x"" && continue; \
if test -f $$i -o -d $$i; then \
if rm -fr $$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
distclean: clean
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
${DIR_ENTER}; \
${MAKE} -s distclean || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ distclean || exit $$?; \
${DIR_LEAVE}; \
done
for i in "" ${DISTCLEAN} .deps *~; do \
test x"$$i" = x"" && continue; \
if test -f $$i -o -d $$i; then \
if rm -fr $$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
print-hierarchy:
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
test x"$$i" = x"" && continue; \
echo ${PRINT_HIERARCHY_PREFIX}$$i; \
cd $$i || exit $$?; \
${MAKE} @MAKEFLAGS_SILENT@ PRINT_HIERARCHY_PREFIX=$$i/ \
${MAKE} -s PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \
print-hierarchy || exit $$?; \
cd .. || exit $$?; \
done
print-var:
printf '%s\n' '${${VAR}}'
DIR_ENTER = printf "@TERM_EL@@TERM_SETAF6@Entering directory @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF6@.@TERM_SGR0@\n" "$$i"; cd $$i || exit $$?
|
︙ | | |
1
2
3
4
5
6
7
8
|
1
2
3
4
5
6
7
8
|
-
+
|
AC_INIT(ObjFW, 1.1dev, js@nil.im)
AC_INIT(ObjFW, 1.1dev, js@nil.im, objfw, https://objfw.nil.im/)
AC_CONFIG_SRCDIR(src)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(build-aux/m4)
AC_DEFINE(OBJFW_VERSION_MAJOR, 1, [The major version of ObjFW])
AC_DEFINE(OBJFW_VERSION_MINOR, 1, [The minor version of ObjFW])
dnl This may only be set to 1.1 once 1.1 is released
|
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
-
-
-
-
-
-
-
-
-
-
-
-
|
enable_shared="no"
enable_threads="no"
enable_sockets="no"
enable_files="no"
;;
m68k-*-amigaos*)
AS_IF([test x"$OBJCFLAGS" = x""], [OBJCFLAGS="-O0"])
AS_IF([test x"$OBJCFLAGS" = x""], [OBJCFLAGS="-O0 -g"])
OBJCFLAGS="$OBJCFLAGS -noixemul"
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul"
CPPFLAGS="$CPPFLAGS -D__NO_NET_API"
LDFLAGS="$LDFLAGS -noixemul"
LIBS="$LIBS -ldebug"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
with_tls="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}.library'])
dnl For 68000, GCC emits calls to helper functions that
dnl do not work properly in a library.
t="-mcpu=68020 -fbaserel -noixemul -ffreestanding"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="$t -resident -nostartfiles -nodefaultlibs -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
])
AC_SUBST(LIBBASES_M, libbases.m)
;;
powerpc-*-amigaos*)
CPPFLAGS="$CPPFLAGS -D__USE_INLINE__"
enable_files="yes" # Required for reading ENV:
|
︙ | | |
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
-
-
-
-
-
-
-
-
-
-
+
|
OBJCFLAGS="$OBJCFLAGS -noixemul"
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul"
LDFLAGS="$LDFLAGS -noixemul"
LIBS="$LIBS -ldebug"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFW_LIB_MAJOR}ppc.library'])
t="-mresident32 -ffreestanding -noixemul"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="-mresident32 -nostartfiles -nodefaultlibs -noixemul -ldebug"
AC_SUBST(AMIGA_LIB_LDFLAGS, "$t -lc")
])
AC_SUBST(LIBBASES_M, libbases.m)
;;
*-msdosdjgpp*)
enable_shared="no"
enable_threads="no"
enable_sockets="no"
;;
*-*-mingw*)
LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition -static-libgcc"
LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
LIBS="$LIBS -lversion"
AC_SUBST(USE_SRCS_WINDOWS, '${SRCS_WINDOWS}')
;;
*-psp-*)
AS_IF([test x"$DEVKITPSP" = x""], [
AC_MSG_ERROR([DEVKITPSP is not set! Please set DEVKITPSP.])
|
︙ | | |
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
+
+
+
+
+
+
+
+
|
LIBS="$LIBS -latomic"
;;
*-*-mint*)
enable_shared="no"
enable_threads="no" # TODO
with_tls="no"
;;
*-apple-macos*)
enable_shared="no"
enable_threads="no" # TODO
enable_sockets="no" # TODO
AC_DEFINE(OF_CLASSIC_MACOS, 1,
[Whether we are compiling for classic macOS])
;;
esac
AS_IF([test x"$host_os" = x"msdosdjgpp" -a x"$build_os" = x"msdosdjgpp"], [
dnl Hack to make configure find these on DOS.
: ${AR:=ar.exe}
: ${GREP:=grep.exe}
: ${RANLIB:=ranlib.exe}
|
︙ | | |
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
-
-
+
+
|
;;
*)
potential_compilers="clang egcc gcc"
;;
esac
AC_PROG_OBJC($potential_compilers)
AC_PROG_OBJCPP
AC_PROG_LN_S
AC_PROG_EGREP
AC_PROG_EGREP
AC_PROG_LN_S
BUILDSYS_CHECK_IOS
AC_ARG_WITH(wii,
AS_HELP_STRING([--with-wii], [build for Wii]))
AS_IF([test x"$with_wii" = x"yes"], [
AS_IF([test x"$DEVKITPRO" = x""], [
|
︙ | | |
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
+
|
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-Xclang -fno-constant-cfstrings, [
flag="-Xclang -fno-constant-cfstrings"
OBJCFLAGS="$OBJCFLAGS $flag"
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag"
])
AX_CHECK_COMPILER_FLAGS([-Wsign-compare -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wsign-compare"])
AS_IF([test x"$with_nds" != x"yes"], [
AX_CHECK_COMPILER_FLAGS([-Wshadow -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wshadow"])
])
AX_CHECK_COMPILER_FLAGS([-Wshorten-64-to-32 -Werror],
|
︙ | | |
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
|
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
|
;;
esac
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [
BUILDSYS_SHARED_LIB
BUILDSYS_PLUGIN
AC_SUBST(OBJFW_SHARED_LIB, "${LIB_PREFIX}objfw${LIB_SUFFIX}")
AC_SUBST(OBJFW_SHARED_LIB, '${LIB_PREFIX}objfw${LIB_SUFFIX}')
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
AC_SUBST(FORWARDING_LIB_A, "forwarding.lib.a")
AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a")
BUILDSYS_FRAMEWORK([
AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework")
build_framework="yes"
])
], [
AC_DEFINE(OF_NO_SHARED, 1, [Whether no shared library was built])
AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a")
AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
TESTS_LIBS="-framework ObjFW \${RUNTIME_FRAMEWORK_LIBS} $TESTS_LIBS"
TESTS_LIBS="-F../src -F../src/runtime $TESTS_LIBS"
], [
TESTS_LIBS="\${RUNTIME_LIBS} $TESTS_LIBS"
TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
TESTS_LIBS="-L../src/runtime $TESTS_LIBS"
TESTS_LIBS="-L../src -lobjfw $TESTS_LIBS"
])
AC_ARG_ENABLE(amiga-lib,
AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(FORWARDING_A, "forwarding.a")
AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
])
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
AS_IF([test x"$enable_shared" = x"no"], [
enable_static="yes"
])
AS_IF([test x"$enable_static" = x"yes"], [
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(FORWARDING_A, "forwarding.a")
AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
|
︙ | | |
523
524
525
526
527
528
529
530
531
532
533
534
535
536
|
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
|
+
|
])
])
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(USE_SRCS_TAGGED_POINTERS, '${SRCS_TAGGED_POINTERS}')
AC_MSG_CHECKING([whether -fobjc-runtime=objfw is supported])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Xclang -fobjc-runtime=objfw"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
|
︙ | | |
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
-
+
-
-
-
-
-
-
-
-
+
-
-
+
-
|
])
AC_SUBST(RUNTIME, "runtime")
AC_CONFIG_FILES(src/runtime/Info.plist)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWRT_SHARED_LIB,
"${LIB_PREFIX}objfwrt${LIB_SUFFIX}")
'${LIB_PREFIX}objfwrt${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes"], [
AC_SUBST(OBJFWRT_STATIC_LIB, "libobjfwrt.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWRT_FRAMEWORK, "ObjFWRT.framework")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFWRT")
])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt.library")
AC_SUBST(LINKLIB, linklib)
tmp="../src/runtime/linklib/libobjfwrt.library.a"
AC_SUBST(LIBOBJFWRT_DEP, "$tmp")
AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../$tmp")
], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
])
AS_IF([test x"$enable_shared" = x"no" \
AS_IF([test x"$enable_shared" = x"no"], [
-a x"$enable_amiga_lib" = x"no"], [
AC_SUBST(LIBOBJFWRT_DEP, "../src/runtime/libobjfwrt.a")
AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../../src/runtime/libobjfwrt.a")
])
AS_IF([test x"$enable_seluid24" = x"yes"], [
AC_DEFINE(OF_SELUID24, 1, [Whether to use 24 bit selector UIDs])
])
|
︙ | | |
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
|
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
|
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
|
AC_CHECK_FUNC(sched_yield, [
AC_DEFINE(OF_HAVE_SCHED_YIELD, 1,
[Whether we have sched_yield()])
])
AC_CHECK_FUNCS(pthread_attr_getschedpolicy)
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(for pthread_attr_setinheritsched)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <pthread.h>
], [
AC_CHECK_FUNCS(pthread_attr_setinheritsched)
pthread_attr_setinheritsched(
(pthread_attr_t *)-1, 0);
])
], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_ATTR_SETINHERITSCHED, 1,
[Whether we have pthread_attr_setinheritsched])
], [
AC_MSG_RESULT(no)
])
OBJCFLAGS="$old_OBJCFLAGS"
AC_CHECK_HEADERS(pthread_np.h, [], [], [#include <pthread.h>])
AC_CHECK_FUNCS(pthread_set_name_np pthread_setname_np, break)
;;
esac
AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads])
|
︙ | | |
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
|
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
|
-
+
|
*)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_FUNCS([fcntl nanosleep])
;;
esac
AC_CHECK_HEADERS(xlocale.h)
AC_CHECK_FUNCS([strtod_l strtof_l asprintf_l])
AC_CHECK_FUNCS([strtod_l strtof_l asprintf_l uselocale])
AS_IF([test x"$gnu_source" != x"yes" -a \( \
x"$ac_cv_func_strtod_l" = x"yes" -o x"$ac_cv_func_strtof_l" = x"yes" -o \
x"$ac_cv_func_asprintf_l" = x"yes" \)], [
AC_MSG_CHECKING(whether *_l functions need _GNU_SOURCE)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <stdlib.h>
|
︙ | | |
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
|
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
;;
esac
AC_CHECK_HEADER(sys/socket.h, [
AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,
[Whether we have sys/socket.h])
])
AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [
#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef _WIN32
# include <winsock2.h>
#endif
])
AC_CHECK_TYPE([struct sockaddr_storage], [
AC_DEFINE(OF_HAVE_SOCKADDR_STORAGE, 1,
[Whether we have struct sockaddr_storage])
], [], [
#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef _WIN32
# include <winsock2.h>
#endif
])
AC_CHECK_HEADER(netinet/in.h, [
AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,
[Whether we have netinet/in.h])
])
AC_CHECK_HEADER(netinet/tcp.h, [
AC_DEFINE(OF_HAVE_NETINET_TCP_H, 1,
[Whether we have netinet/tcp.h])
])
AC_CHECK_HEADERS([arpa/inet.h netdb.h net/if.h])
AC_CHECK_FUNCS([if_indextoname if_nametoindex])
AC_CHECK_HEADERS([arpa/inet.h netdb.h sys/sockio.h])
AC_CHECK_HEADERS([net/if.h], [], [], [
#ifdef OF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
AC_CHECK_HEADERS([net/if_arp.h net/if_dl.h net/if_types.h])
AC_CHECK_FUNCS([if_indextoname if_nametoindex if_nameindex])
AC_CHECK_TYPES([struct sockaddr_dl], [], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NET_IF_DL_H
# include <net/if_dl.h>
#endif
])
AC_CHECK_TYPES([struct lifconf], [], [], [
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#endif
])
AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr], [], [], [
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#endif
])
AC_CHECK_HEADER(sys/un.h, [
AC_DEFINE(OF_HAVE_SYS_UN_H, 1, [Whether we have sys/un.h])
])
AC_CHECK_MEMBER([struct sockaddr_in6.sin6_addr], [
AC_EGREP_CPP(egrep_cpp_yes, [
#ifdef _WIN32
typedef int BOOL;
|
︙ | | |
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
|
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# include <winsock2.h>
#endif
])
AC_CHECK_MEMBER(struct sockaddr_un.sun_path, [
AC_DEFINE(OF_HAVE_UNIX_SOCKETS, 1,
[Whether we have UNIX sockets])
AC_SUBST(USE_SRCS_UNIX_SOCKETS, '${SRCS_UNIX_SOCKETS}')
AC_CHECK_MEMBERS(struct sockaddr_un.sun_len, [], [], [
#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_SYS_UN_H
# include <sys/un.h>
#endif
#ifdef _WIN32
# include <winsock2.h>
#endif
#ifdef HAVE_AFUNIX_H
# include <afunix.h>
#endif
])
], [], [
#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_SYS_UN_H
# include <sys/un.h>
#endif
|
︙ | | |
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
|
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
|
])
AC_CHECK_HEADER(netipx/ipx.h, [
AC_DEFINE(OF_HAVE_NETIPX_IPX_H, 1,
[Whether we have netipx/ipx.h])
])
AC_CHECK_MEMBER(struct sockaddr_ipx.sipx_network, [], [
AC_CHECK_MEMBER(struct sockaddr_ipx.sa_netnum, [], [], [
AC_CHECK_MEMBER(struct sockaddr_ipx.sa_netnum, [], [
AC_CHECK_MEMBER(struct sockaddr_ipx.sipx_addr.x_port,
[], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_NETIPX_IPX_H
# include <netipx/ipx.h>
#endif
])
], [
#ifdef _WIN32
typedef int BOOL;
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_NETIPX_IPX_H
# include <netipx/ipx.h>
#endif
#ifdef _WIN32
# ifdef __MINGW32__
# include <_mingw.h>
# ifdef __MINGW64_VERSION_MAJOR
# include <winsock2.h>
# endif
# endif
# include <windows.h>
# include <wsipx.h>
#endif
])
], [
#ifdef _WIN32
typedef int BOOL;
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef OF_HAVE_NETIPX_IPX_H
# include <netipx/ipx.h>
#endif
#ifdef _WIN32
# ifdef __MINGW32__
# include <_mingw.h>
# ifdef __MINGW64_VERSION_MAJOR
# include <winsock2.h>
# endif
# endif
# include <windows.h>
# include <wsipx.h>
#endif
])
AS_IF([test x"$ac_cv_member_struct_sockaddr_ipx_sipx_network" = x"yes" \
-o x"$ac_cv_member_struct_sockaddr_ipx_sa_netnum" = x"yes"], [
-o x"$ac_cv_member_struct_sockaddr_ipx_sa_netnum" = x"yes" -o \
x"$ac_cv_member_struct_sockaddr_ipx_sipx_addr_x_port" = x"yes"], [
AC_EGREP_CPP(egrep_cpp_yes, [
#ifdef _WIN32
typedef int BOOL;
#endif
#ifdef OF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
|
︙ | | |
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
|
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
|
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
])
;;
esac
AC_ARG_WITH(tls,
AS_HELP_STRING([--with-tls], [
enable TLS support using the specified library
(yes, openssl, gnutls, securetransport or no)]))
(yes, openssl, gnutls, securetransport, mbedtls or
no)]))
AS_IF([test x"$with_tls" = x""], [with_tls="yes"])
tls_support="no"
AS_IF([test x"$with_tls" = x"securetransport" \
-o x"$with_tls" = x"yes"], [
-o x"$with_tls" = x"yes"], [
AC_CHECK_HEADERS(Security/SecureTransport.h, [
old_LIBS="$LIBS"
LIBS="-framework Security -framework Foundation $LIBS"
AC_CHECK_FUNC(SSLHandshake, [
AC_DEFINE(HAVE_SECURE_TRANSPORT, 1,
[Whether we have Secure Transport])
tls_support="Secure Transport"
TLS_LIBS="-framework Foundation $TLS_LIBS"
TLS_LIBS="-framework Security $TLS_LIBS"
AC_SUBST(OF_SECURE_TRANSPORT_TLS_STREAM_M,
"OFSecureTransportTLSStream.m")
AC_CHECK_FUNCS(SSLCreateContext)
], [])
LIBS="$old_LIBS"
])
])
AS_IF([test x"$with_tls" = x"gnutls" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
PKG_CHECK_MODULES(gnutls, [gnutls >= 3.5.0], [
AC_DEFINE(HAVE_GNUTLS, 1, [Whether we have GnuTLS])
tls_support="GnuTLS"
TLS_CPPFLAGS="$gnutls_CFLAGS $TLS_CPPFLAGS"
TLS_LIBS="$gnutls_LIBS $TLS_LIBS"
AC_SUBST(OF_GNUTLS_TLS_STREAM_M, "OFGnuTLSTLSStream.m")
], [
dnl Disable default action-if-not-found, which exits
dnl configure with an error.
:
])
])
AS_IF([test x"$with_tls" = x"openssl" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
case "$host_os" in
morphos*)
ssl="ssl_shared"
crypto="crypto_shared"
;;
*)
ssl="ssl"
crypto="crypto"
;;
esac
AC_CHECK_LIB($ssl, SSL_set1_host, [
AC_CHECK_HEADER(openssl/ssl.h, [
AC_DEFINE(HAVE_OPENSSL, 1,
[Whether we have OpenSSL])
tls_support="OpenSSL"
TLS_LIBS="-l$ssl -l$crypto $TLS_LIBS"
AC_SUBST(OF_OPENSSL_TLS_STREAM_M,
"OFOpenSSLTLSStream.m")
old_LIBS="$LIBS"
LIBS="$TLS_LIBS $LIBS"
AC_CHECK_FUNCS(SSL_has_pending)
LIBS="$old_LIBS"
])
], [], [-l$crypto])
])
AS_IF([test x"$with_tls" = x"gnutls" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
PKG_CHECK_MODULES(gnutls, [gnutls >= 3.5.0], [
tls_support="GnuTLS"
TLS_CPPFLAGS="$gnutls_CFLAGS $TLS_CPPFLAGS"
TLS_LIBS="$gnutls_LIBS $TLS_LIBS"
AC_SUBST(OF_GNUTLS_TLS_STREAM_M, "OFGnuTLSTLSStream.m")
], [
dnl Disable default action-if-not-found, which exits
dnl configure with an error.
:
])
])
AS_IF([test x"$with_tls" = x"mbedtls"], [
AC_ARG_WITH(mbedtls-ca-path,
AS_HELP_STRING([path to CA file for Mbed TLS]))
AS_IF([test x"$with_mbedtls_ca_path" = x""], [
AC_MSG_ERROR([--mbedtls-ca-path needs to be specified!])
])
AC_DEFINE_UNQUOTED(OF_MBEDTLS_CA_PATH, "$with_mbedtls_ca_path",
[Path to CA file for Mbed TLS])
AC_CHECK_LIB(mbedtls, mbedtls_net_init, [
AC_CHECK_HEADER(mbedtls/ssl.h, [
tls_support="Mbed TLS"
TLS_LIBS="-lmbedx509 -lmbedcrypto $TLS_LIBS"
TLS_LIBS="-lmbedtls $TLS_LIBS"
AC_SUBST(OF_MBEDTLS_TLS_STREAM_M,
"OFMbedTLSTLSStream.m")
])
], [], [-lmbedx509 -lmbedcrypto])
])
AS_IF([test x"$tls_support" != x"no"], [
AC_SUBST(TLS, "tls")
AC_SUBST(TLS_CPPFLAGS)
AC_SUBST(TLS_LIBS)
AC_DEFINE(HAVE_TLS_SUPPORT, 1,
[Whether we have an implementation for TLS])
AC_CONFIG_FILES(src/tls/Info.plist)
OFHTTP_LIBS="-lobjfwtls $TLS_LIBS $OFHTTP_LIBS"
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWTLS_SHARED_LIB,
"${LIB_PREFIX}objfwtls${LIB_SUFFIX}")
'${LIB_PREFIX}objfwtls${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes" \
-o x"$enable_shared" = x"no"], [
AC_SUBST(OBJFWTLS_STATIC_LIB, "libobjfwtls.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWTLS_FRAMEWORK, "ObjFWTLS.framework")
|
︙ | | |
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
|
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
|
-
-
-
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
-
+
-
+
|
#if (!defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE) && \
(!defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR)
egrep_cpp_yes
#endif
], [
AC_MSG_RESULT(yes)
have_subprocesses="yes"
AC_CHECK_FUNCS(posix_spawnp)
AC_CHECK_HEADERS(spawn.h)
], [
AC_MSG_RESULT(no)
have_subprocesses="no"
])
;;
mingw*)
have_subprocesses="yes"
;;
msdosdjgpp*)
have_subprocesses="no"
;;
*)
esac
AS_IF([test x"$have_subprocesses" = x""], [
AC_HEADER_SYS_WAIT
AC_CHECK_FUNCS(kill)
AC_CHECK_FUNCS(posix_spawnp, [
AS_IF([test x"$ac_cv_func_kill" = x"yes"], [
have_subprocesses="yes"
AC_CHECK_HEADERS(spawn.h, [have_subprocesses="yes"])
])
AC_CHECK_HEADERS(spawn.h)
])
], [
])
AS_IF([test x"$have_subprocesses" = x""], [
AC_CHECK_FUNCS([vfork dup2 execvp _exit], [
AS_IF([test x"$ac_cv_func_vfork" = x"yes" \
-a x"$ac_cv_func_pipe" = x"yes" \
-a x"$ac_cv_func_dup2" = x"yes" \
-a x"$ac_cv_func_execvp" = x"yes" \
-a x"$ac_cv_func_kill" = x"yes" \
-a x"$ac_cv_func__exit" = x"yes"], [
have_subprocesses="yes"
])
], [
break
])
])
;;
esac
])
AS_IF([test x"$have_subprocesses" = x"yes"], [
AC_SUBST(OF_SUBPROCESS_M, "OFSubprocess.m")
AC_DEFINE(OF_HAVE_SUBPROCESSES, 1, [Whether we have subprocesses])
])
AC_CHECK_HEADERS_ONCE([complex.h sys/ioctl.h sys/ttycom.h])
AC_CHECK_FUNCS(isatty)
AC_CHECK_FUNCS(ioctl isatty)
AC_CHECK_FUNC(pledge, [
AC_DEFINE(OF_HAVE_PLEDGE, 1, [Whether we have pledge()])
])
AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
AC_CHECK_HEADER(Foundation/NSObject.h, [
AC_SUBST(BRIDGE, "bridge")
AC_CONFIG_FILES(src/bridge/Info.plist)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWBRIDGE_SHARED_LIB,
"${LIB_PREFIX}objfwbridge${LIB_SUFFIX}")
'${LIB_PREFIX}objfwbridge${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes" \
-o x"$enable_shared" = x"no"], [
AC_SUBST(OBJFWBRIDGE_STATIC_LIB, "libobjfwbridge.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWBRIDGE_FRAMEWORK,
|
︙ | | |
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
|
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
|
-
+
+
+
+
+
+
+
+
+
|
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
])
AS_IF([test x"$GOBJC" = x"yes"], [
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith"
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--disable-werror], [do not build with -Werror]))
AS_IF([test x"$enable_werror" != x"no"], [
OBJCFLAGS="$OBJCFLAGS -Werror"
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to GCC bugs)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
|
︙ | | |
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
|
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
|
+
-
+
+
+
|
} object;
], [
Foo *test = (Foo *)&object;
(void)test; /* Get rid of unused variable warning */
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$OBJCFLAGS -Wno-strict-aliasing"
OBJCFLAGS="$old_OBJCFLAGS -Wno-strict-aliasing"
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(
whether we need -Wno-unused-property-ivar due to Clang bugs)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
|
︙ | | |
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
|
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
|
+
-
+
-
+
|
{
return (Foo *)0;
}
@end
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$OBJCFLAGS -Wno-unused-property-ivar"
OBJCFLAGS="$old_OBJCFLAGS -Wno-unused-property-ivar"
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wcast-align"
OBJCFLAGS="$OBJCFLAGS -Wcast-align -Werror"
AC_MSG_CHECKING(whether -Wcast-align is buggy)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
|
︙ | | |
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
|
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
|
+
-
+
|
struct objc_class *c = _isa;
(void)c;
}
@end
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS -Wcast-align"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS"
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wunreachable-code"
OBJCFLAGS="$OBJCFLAGS -Wunreachable-code -Werror"
AC_MSG_CHECKING(whether -Wunreachable-code can be used)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
#include <stdlib.h>
struct objc_selector;
typedef const struct objc_selector *SEL;
|
︙ | | |
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
|
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
|
+
-
+
|
{
OF_DEALLOC_UNSUPPORTED
}
@end
]])
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS -Wunreachable-code"
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wdocumentation"
OBJCFLAGS="$OBJCFLAGS -Wdocumentation -Werror"
AC_MSG_CHECKING(whether -Wdocumentation works correctly)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
/**
* @class Test conftest.m conftest.m
*/
#ifdef __has_attribute
|
︙ | | |
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
|
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
|
+
-
+
|
/**
* @struct Foo conftest.m conftest.m
*/
typedef struct {} Foo;
])
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS -Wdocumentation"
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
])
AS_IF([test x"$check_pedantic" = x"yes"], [
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -pedantic"
OBJCFLAGS="$OBJCFLAGS -pedantic -Werror"
AC_MSG_CHECKING(whether -pedantic is buggy)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#include <stdlib.h>
#include <assert.h>
|
︙ | | |
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
|
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
|
*/
assert(1);
}
@end
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS -pedantic"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS"
])
])
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether we need -Wno-strict-prototypes)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <signal.h>
], [
signal(SIGINT, SIG_DFL);
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS -Wno-strict-prototypes"
])
AS_IF([test x"$ac_cv_header_complex_h" = x"yes"], [
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether we need -Wno-gnu-imaginary-constant)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <complex.h>
], [
complex float f = 0.5 + 0.5 * I;
(void)f;
])
], [
AC_MSG_RESULT(no)
OBJCFLAGS="$old_OBJCFLAGS"
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$OBJCFLAGS -Wno-gnu-imaginary-constant"
OBJCFLAGS="$old_OBJCFLAGS -Wno-gnu-imaginary-constant"
])
])
])
AS_IF([test x"$cross_compiling" = x"yes"], [
AC_SUBST(BIN_PREFIX, "${host_alias}-")
case "$host" in
i?86-*-mingw*)
AC_CHECK_PROG(WINE, wine, wine)
;;
x86_64-*-mingw*)
AC_CHECK_PROG(WINE, wine64, wine64)
;;
esac
AS_IF([test x"$WINE" != x""], [
AS_IF([test x"$WINE" != x""], [AC_SUBST(WRAPPER, "$WINE")])
AC_SUBST(WRAPPER, "$WINE")
])
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(WRAPPER, "$wiiload")
])
])
])
AC_ARG_WITH(fish_completions,
AS_HELP_STRING([--with-fish-completions],
[install completions for the fish shell]))
AS_IF([test x"$with_fish_completions" = x""], [
AC_CHECK_PROG(FISH, fish, fish)
AS_IF([test x"$FISH" != x""], [with_fish_completions="yes"])
])
AS_IF([test x"$with_fish_completions" = x"yes"], [
AC_SUBST(FISH_COMPLETIONS, fish)
])
dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself.
AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)
dnl We use the ObjC compiler as our assembler
AC_SUBST(AS, $OBJC)
AC_SUBST(ASFLAGS)
|
︙ | | |