︙ | | |
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
|
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
79
80
81
82
83
84
|
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
|
])
LDFLAGS="$LDFLAGS -noixemul"
enable_shared="no"
enable_threads="no"
enable_sockets="no"
enable_files="yes" # Required for reading ENV:
supports_amiga_lib="yes"
ac_cv_snprintf_useful_ret="yes"
AC_SUBST(NOIXEMUL, -noixemul)
AC_SUBST(OBJFW_RT_AMIGA_LIB, objfw_rt.library)
AC_SUBST(SFDC_TARGET, m68k-amigaos)
dnl For 68000, GCC emits calls to helper functions that
dnl do not work properly in a library.
AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel")
AC_SUBST(AMIGA_LIB_LDFLAGS,
"-mcpu=68020 -fbaserel -resident -nostartfiles")
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(SFDC_TARGET, m68k-amigaos)
dnl For 68000, GCC emits calls to helper functions that
dnl do not work properly in a library.
AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel")
AC_SUBST(AMIGA_LIB_LDFLAGS,
"-mcpu=68020 -fbaserel -resident -nostartfiles")
AC_SUBST(LINKLIB, linklib)
])
;;
powerpc-*-amigaos*)
enable_shared="no"
enable_threads="no"
;;
*-morphos*)
AS_IF([test x"$with_ixemul" != x"yes"], [
AS_IF([test x"$OBJCFLAGS" != x""], [
OBJCFLAGS="$OBJCFLAGS -noixemul"
], [
OBJCFLAGS="-O2 -g -noixemul"
])
LDFLAGS="$LDFLAGS -noixemul"
enable_files="yes" # Required for reading ENV:
supports_amiga_lib="yes"
AC_SUBST(NOIXEMUL, -noixemul)
AC_SUBST(OBJFW_RT_AMIGA_LIB, objfw_rt.library)
AC_SUBST(SFDC_TARGET, ppc-morphos)
AC_SUBST(AMIGA_LIB_CFLAGS, "-mresident32 -fno-builtin")
AC_SUBST(AMIGA_LIB_LDFLAGS,
"-mresident32 -nostartfiles -nodefaultlibs -lc")
AC_SUBST(LINKLIB, linklib)
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(SFDC_TARGET, ppc-morphos)
tmp="-mresident32 -fno-builtin"
AC_SUBST(AMIGA_LIB_CFLAGS, $tmp)
tmp="-mresident32 -nostartfiles -nodefaultlibs"
tmp="$tmp -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $tmp)
])
])
enable_shared="no"
enable_threads="no"
;;
*-msdosdjgpp*)
enable_shared="no"
|
︙ | | |
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
+
|
], [
AC_MSG_RESULT(no)
AC_MSG_ERROR(Compiler does not support properties!)
])
AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB
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
AC_SUBST(OBJFW_SHARED_LIB, "${LIB_PREFIX}objfw${LIB_SUFFIX}")
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
AC_SUBST(EXCEPTIONS_EXCEPTIONS_LIB_A, "exceptions/exceptions.lib.a")
|
︙ | | |
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
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
|
AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework")
build_framework="yes"
])
], [
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 -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_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
enable_static="yes"
])
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
AC_SUBST(FORWARDING_A, "forwarding.a")
AC_SUBST(FORWARDING_FORWARDING_A, "forwarding/forwarding.a")
AC_SUBST(INVOCATION_A, "invocation.a")
AC_SUBST(INVOCATION_INVOCATION_A, "invocation/invocation.a")
AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_A, "lookup-asm/lookup-asm.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="-lobjfw \${RUNTIME_LIBS} $TESTS_LIBS"
TESTS_LIBS="-L../src -L../src/runtime $TESTS_LIBS"
])
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$enable_files" != x"no" -a x"$PLUGIN_SUFFIX" != x""], [
AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}')
AC_SUBST(TESTPLUGIN, "plugin")
AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support])
AS_IF([test x"$build_framework" = x"yes"], [
|
︙ | | |
443
444
445
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
|
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
|
+
-
+
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
+
+
-
-
|
AC_SUBST(RUNTIME, "runtime")
AC_SUBST(RUNTIME_FLAGS)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFW_RT_SHARED_LIB,
"${LIB_PREFIX}objfw_rt${LIB_SUFFIX}")
])
AS_IF([test x"$enable_static" = x"yes" \
AS_IF([test x"$enable_static" = x"yes"], [
-o x"$enable_shared" = x"no"], [
AC_SUBST(OBJFW_RT_STATIC_LIB, "libobjfw_rt.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFW_RT_FRAMEWORK, "ObjFW_RT.framework")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFW_RT")
])
AS_IF([test x"$enable_shared" = x"no"], [
AC_SUBST(LIBOBJFW_RT_DEP,
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_RT_AMIGA_LIB, objfw_rt.library)
AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt.library")
AC_SUBST(LINKLIB, linklib)
tmp="../src/runtime/linklib/libobjfw_rt.library.a"
AC_SUBST(LIBOBJFW_RT_DEP, "$tmp")
"../src/runtime/libobjfw_rt.a")
AC_SUBST(LIBOBJFW_RT_DEP_LVL2,
"../../src/runtime/libobjfw_rt.a")
AC_SUBST(LIBOBJFW_RT_DEP_LVL2, "../$tmp")
], [
AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFW_RT_FRAMEWORK, "ObjFW_RT.framework")
AS_IF([test x"$enable_shared" = x"no" \
-a x"$enable_amiga_lib" = x"no"], [
tmp="../src/runtime/libobjfw_rt.a"
AC_SUBST(LIBOBJFW_RT_DEP, "$tmp")
AC_SUBST(LIBOBJFW_RT_DEP_LVL2, "../$tmp")
])
AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFW_RT")
AS_IF([test x"$enable_seluid24" = x"yes"], [
AC_DEFINE(OF_SELUID24, 1,
[Whether to use 24 bit selector UIDs])
])
AC_MSG_CHECKING(for exception type)
|
︙ | | |