@@ -20,10 +20,22 @@ AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ NO_CONST_CFSTRINGS="-fno-constant-cfstrings" OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"]) AC_SUBST(NO_CONST_CFSTRINGS) + +AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration) +AC_TRY_COMPILE([ + #import + ], [ + id n = nil; + for (id i in n); + ], [ + AC_DEFINE(OF_HAVE_FAST_ENUMERATION, 1, [Fast Enumeration support]) + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no)]) AC_MSG_CHECKING(which Objective C runtime we use) dnl TODO: This is ugly. Let's think of a better check. AC_EGREP_CPP(gnu, [ #import @@ -143,11 +155,12 @@ #include #include #else #define _WIN32_WINNT 0x0501 #include - #endif], [ + #endif + ], [ struct addrinfo ai; getaddrinfo(NULL, NULL, NULL, NULL); ], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GETADDRINFO, 1, [Whether we have getaddrinfo])