Differences From Artifact [c10c411671]:
- File
configure.ac
— part of check-in
[51343e2dfc]
at
2018-06-17 16:16:34
on branch trunk
— Rename ofzip to ofarc
It supports more than just ZIP now, so the name was no longer
appropriate. (user: js, size: 45919) [annotate] [blame] [check-ins using]
To Artifact [e02fcf3101]:
- File
configure.ac
— part of check-in
[670184b60b]
at
2018-06-17 17:51:30
on branch trunk
— configure: Prefix Clang-only flags with -Xclang
This is required for systems for which Clang does not know how to call
the linker, as Clang then just calls GCC for linking, passing all flags.
However, GCC does not know the Clang-only flags and fails to link. (user: js, size: 46038) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
233 234 235 236 237 238 239 | AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) ]) ]) AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"]) AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) | | | | | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) ]) ]) 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, [ OBJCFLAGS="$OBJCFLAGS -Xclang -fno-constant-cfstrings" AC_SUBST(NO_CONST_CFSTRINGS, "-Xclang -fno-constant-cfstrings") ]) 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"]) ]) |
︙ | ︙ | |||
414 415 416 417 418 419 420 | "ObjFW runtime") AC_DEFINE(OF_OBJFW_RUNTIME, 1, [Whether we use the ObjFW runtime]) AC_MSG_CHECKING([whether -fobjc-runtime=objfw is supported]) old_OBJCFLAGS="$OBJCFLAGS" | | | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | "ObjFW runtime") AC_DEFINE(OF_OBJFW_RUNTIME, 1, [Whether we use the ObjFW runtime]) AC_MSG_CHECKING([whether -fobjc-runtime=objfw is supported]) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Xclang -fobjc-runtime=objfw" AC_TRY_LINK([ #ifdef __has_attribute # if __has_attribute(objc_root_class) __attribute__((__objc_root_class__)) # endif #endif @interface Test |
︙ | ︙ | |||
444 445 446 447 448 449 450 | void __objc_exec_class(void *module) { } ], [ [Test test]; ], [ | | | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | void __objc_exec_class(void *module) { } ], [ [Test test]; ], [ RUNTIME_FLAGS="-Xclang -fobjc-runtime=objfw" AC_MSG_RESULT(yes) ], [ RUNTIME_FLAGS="-fgnu-runtime" OBJCFLAGS="$old_OBJCFLAGS -fgnu-runtime" AC_MSG_RESULT(no) old_compiler="yes" ]) |
︙ | ︙ | |||
898 899 900 901 902 903 904 | case "$host_os" in mingw*) AC_MSG_RESULT(WinAPI) ;; *) AC_MSG_RESULT(POSIX) | > | | | 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 | case "$host_os" in mingw*) AC_MSG_RESULT(WinAPI) ;; *) AC_MSG_RESULT(POSIX) dnl Use -Wp, as we only use it for the preprocessor. AX_CHECK_COMPILER_FLAGS(-Wp,-pthread, [ CPPFLAGS="$CPPFLAGS -Wp,-pthread" ], [ CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_THREAD_SAFE" ]) AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread") AC_TRY_LINK([ |
︙ | ︙ | |||
1477 1478 1479 1480 1481 1482 1483 | ]) 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. AC_MSG_CHECKING(whether Objective C compiler supports blocks) old_OBJCFLAGS="$OBJCFLAGS" | | | | 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 | ]) 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. AC_MSG_CHECKING(whether Objective C compiler supports blocks) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Xclang -fblocks" AC_TRY_COMPILE([], [ int (^foo)(int bar); foo = ^ (int bar) { return 0; } ], [ AC_SUBST(BLOCKS_FLAGS, "-Xclang -fblocks") AC_SUBST(OFBLOCKTESTS_M, "OFBlockTests.m") AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) |
︙ | ︙ |