Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -7,19 +7,43 @@ AC_PROG_CC AC_PROG_OBJC AC_PROG_CPP AC_PROG_LN_S AC_PATH_PROG(AR, ar) +AC_PROG_EGREP CFLAGS="$CFLAGS -Wall" OBJCFLAGS="$OBJCFLAGS -Wall -fobjc-exceptions" -BUILDSYS_SHARED_LIB - AC_DEFINE(OF_CONFIG_H, 1, [Define so that we know we got our config.h]) + +BUILDSYS_SHARED_LIB AC_C_BIGENDIAN([AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])]) +AC_MSG_CHECKING(for SIZE_MAX) +AC_EGREP_CPP(yes, [ + #include + #include + + #ifdef SIZE_MAX + yes + #endif], AC_MSG_RESULT(yes), [ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for SIZE_T_MAX) + AC_EGREP_CPP(yes, [ + #include + #include + + #ifdef SIZE_T_MAX + yes + #endif], [ + AC_MSG_RESULT(yes) + size_max="SIZE_T_MAX"], [ + AC_MSG_RESULT(no) + size_max="((size_t)-1)"]) + AC_DEFINE_UNQUOTED(SIZE_MAX, $size_max, [Maximum value for size_t])]) + AC_CHECK_FUNC(asprintf, [ have_asprintf="yes" AC_DEFINE(HAVE_ASPRINTF, 1, "Whether we have asprintf")], [ have_asprintf="no" AC_SUBST(ASPRINTF, "asprintf.c")]) Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -12,10 +12,11 @@ #import "config.h" #import #import #import +#import #import "OFArray.h" #import "OFExceptions.h" #import "OFMacros.h" Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -11,10 +11,11 @@ #import "config.h" #import #import +#import #import "OFObject.h" #import "OFExceptions.h" #import "OFMacros.h" Index: src/OFXMLFactory.m ================================================================== --- src/OFXMLFactory.m +++ src/OFXMLFactory.m @@ -12,10 +12,11 @@ #import "config.h" #import #import #import +#import #import "OFXMLFactory.h" #import "OFExceptions.h" #import "OFMacros.h" Index: tests/OFArray/OFArray.m ================================================================== --- tests/OFArray/OFArray.m +++ tests/OFArray/OFArray.m @@ -12,10 +12,11 @@ #import "config.h" #import #import #import +#import #import "OFArray.h" #import "OFExceptions.h" #define CATCH_EXCEPTION(code, exception) \ Index: tests/OFObject/OFObject.m ================================================================== --- tests/OFObject/OFObject.m +++ tests/OFObject/OFObject.m @@ -11,10 +11,11 @@ #import "config.h" #import #import +#import #import "OFObject.h" #import "OFExceptions.h" #define CATCH_EXCEPTION(code, exception) \