100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
])
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$PLUGIN_SUFFIX" != x""], [
AC_SUBST(OFPLUGIN_M, "OFPlugin.m")
AC_SUBST(OFPLUGINTESTS_M, "OFPluginTests.m")
AC_SUBST(TESTPLUGIN, "plugin")
AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")
])
objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
AS_HELP_STRING([--enable-runtime], [use the included runtime]))
|
|
<
<
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
])
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$PLUGIN_SUFFIX" != x""], [
AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}')
AC_SUBST(TESTPLUGIN, "plugin")
AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
])
objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
AS_HELP_STRING([--enable-runtime], [use the included runtime]))
|
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
|
], [
AC_MSG_ERROR(No supported threads found!)
])
;;
esac
AC_DEFINE(OF_THREADS, 1, [Whether we have threads])
AC_SUBST(THREADING_SOURCES, " \
OFThread.m \
OFThreadPool.m \
OFTLSKey.m \
OFMutex.m \
OFRecursiveMutex.m \
OFCondition.m \
")
AC_SUBST(OFTHREADTESTS_M, "OFThreadTests.m")
AC_SUBST(OFHTTPCLIENTTESTS_M, "OFHTTPClientTests.m")
AC_SUBST(THREADING_H, "threading.h")
AC_MSG_CHECKING(whether __thread works)
AC_TRY_LINK([
/* It seems __thread is buggy with GCC 4.1 */
#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
# error buggy
#endif
|
|
<
<
<
<
<
<
<
<
<
|
|
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
|
], [
AC_MSG_ERROR(No supported threads found!)
])
;;
esac
AC_DEFINE(OF_THREADS, 1, [Whether we have threads])
AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}')
AC_SUBST(USE_INCLUDES_THREADS, '${INCLUDES_THREADS}')
AC_MSG_CHECKING(whether __thread works)
AC_TRY_LINK([
/* It seems __thread is buggy with GCC 4.1 */
#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
# error buggy
#endif
|