Differences From Artifact [51b7eeb39e]:
- File configure.ac — part of check-in [5a98cf8a50] at 2018-01-21 19:01:13 on branch trunk — Update buildsys (user: js, size: 40984) [annotate] [blame] [check-ins using]
To Artifact [e96d7e8c11]:
- File
configure.ac
— part of check-in
[0f42b0eafd]
at
2018-01-21 22:16:23
on branch trunk
— Allow building the runtime as a .framework
This also renames ObjFW-RT to ObjFW_RT, as hyphens should not be in
framework names. (user: js, size: 41365) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 | *-morphos*) AS_IF([test x"$with_ixemul" != x"yes"], [ OBJCFLAGS="$OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: AC_SUBST(NOIXEMUL, -noixemul) | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | *-morphos*) AS_IF([test x"$with_ixemul" != x"yes"], [ OBJCFLAGS="$OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: AC_SUBST(NOIXEMUL, -noixemul) AC_SUBST(OBJFW_RT_MORPHOS_LIB, objfw_rt.library) ]) enable_shared="no" enable_threads="no" ;; *-msdosdjgpp*) enable_shared="no" |
︙ | ︙ | |||
247 248 249 250 251 252 253 254 255 256 257 258 259 260 | AC_SUBST(INVOCATION_LIB_A, "invocation.lib.a") AC_SUBST(INVOCATION_INVOCATION_LIB_A, "invocation/invocation.lib.a") AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_LIB_A, "lookup-asm/lookup-asm.lib.a") BUILDSYS_FRAMEWORK([ AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework") ]) ], [ AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a") AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a") ]) 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"], [ | > | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | AC_SUBST(INVOCATION_LIB_A, "invocation.lib.a") AC_SUBST(INVOCATION_INVOCATION_LIB_A, "invocation/invocation.lib.a") AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_LIB_A, "lookup-asm/lookup-asm.lib.a") BUILDSYS_FRAMEWORK([ AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework") build_framework="yes" ]) ], [ AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a") AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a") ]) 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"], [ |
︙ | ︙ | |||
370 371 372 373 374 375 376 | ]) AC_SUBST(RUNTIME, "runtime") AC_SUBST(RUNTIME_FLAGS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_RT_SHARED_LIB, | | | > > > | > | 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 | ]) 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" \ -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_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) |
︙ | ︙ | |||
437 438 439 440 441 442 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 472 473 474 | ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_CHECK_LIB(objc, objc_msgSend, [ AC_SUBST(RUNTIME_LIBS, "-lobjc") ], [ AC_MSG_ERROR([libobjc not found!]) ]) ;; esac AC_CHECK_FUNC(objc_constructInstance, [], [ AC_SUBST(INSTANCE_M, "instance.m") ]) AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [ AC_SUBST(AUTORELEASE_M, "autorelease.m") ]) case "$host_os" in darwin*) AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"]) AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER, ["-Wl,-U,_NSFoundationVersionNumber"]) LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber" ]) AS_IF([test x"$objc_runtime" = x"ObjFW runtime"], [ AS_IF([test x"$exception_type" = x"DWARF"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_v0" ]) AS_IF([test x"$exception_type" = x"SjLj"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_sj0" ]) | > > > | > > | 442 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 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_CHECK_LIB(objc, objc_msgSend, [ AC_SUBST(RUNTIME_LIBS, "-lobjc") AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-lobjc") ], [ AC_MSG_ERROR([libobjc not found!]) ]) ;; esac AC_CHECK_FUNC(objc_constructInstance, [], [ AC_SUBST(INSTANCE_M, "instance.m") ]) AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [ AC_SUBST(AUTORELEASE_M, "autorelease.m") ]) case "$host_os" in darwin*) AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"]) AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK, ["-Wl,-reexport-lobjc"]) AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER, ["-Wl,-U,_NSFoundationVersionNumber"]) LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber" ]) AS_IF([test x"$objc_runtime" = x"ObjFW runtime"], [ AS_IF([test x"$exception_type" = x"DWARF"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_v0" ]) AS_IF([test x"$exception_type" = x"SjLj"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_sj0" ]) AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjfw_rt"]) AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK, ["-Wl,-reexport_framework,ObjFW_RT"]) ]) AC_CHECK_HEADERS(sysdir.h) AC_CHECK_FUNCS(sysdir_start_search_path_enumeration) AC_MSG_CHECKING(whether host is iOS) AC_EGREP_CPP(yes, [ |
︙ | ︙ | |||
1288 1289 1290 1291 1292 1293 1294 | AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m") AC_SUBST(BRIDGE, "bridge") AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_BRIDGE_SHARED_LIB, "${LIB_PREFIX}objfw_bridge${LIB_SUFFIX}") | < < < < < < < > > > > | 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 | AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m") AC_SUBST(BRIDGE, "bridge") AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_BRIDGE_SHARED_LIB, "${LIB_PREFIX}objfw_bridge${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJFW_BRIDGE_STATIC_LIB, "libobjfw_bridge.a") ]) AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFW_BRIDGE_FRAMEWORK, "ObjFW_Bridge.framework") ]) ]) ]) dnl This needs to be after all other header checks, as they include unistd.h, dnl which in old glibc versions uses __block. This is worked around in the code dnl by providing a wrapper for unistd.h which takes care of this. |
︙ | ︙ |