@@ -22,10 +22,62 @@ dnl Used to disable checking for -pedantic on some platforms where it's broken check_pedantic="yes" case "$host" in + m68k-*-amigaos*) + OBJCFLAGS="$OBJCFLAGS -noixemul" + LDFLAGS="$LDFLAGS -noixemul" + + enable_shared="no" + enable_threads="no" + enable_sockets="no" + enable_files="yes" # Required for reading ENV: + ac_cv_snprintf_useful_ret="yes" + + AC_DEFINE(ULLONG_MAX, 0xFFFFFFFFFFFFFFFFULL, + [Maximum value for unsigned long long]) + AC_DEFINE(LLONG_MAX, 0x7FFFFFFFFFFFFFFFLL, + [Maximum value for long long]) + AC_DEFINE(LLONG_MIN, [(-0x7FFFFFFFFFFFFFFFLL - 1)], + [Minimum value for long long]) + + AC_DEFINE(PRId8, "hhd", [Format string for 8-bit as decimal]) + AC_DEFINE(PRId16, "hd", [Format string for 16-bit as decimal]) + AC_DEFINE(PRId32, "d", [Format string for 32-bit as decimal]) + AC_DEFINE(PRId64, "lld", [Format string for 64-bit as decimal]) + AC_DEFINE(PRIi8, "hhi", [Format string for 8-bit as integer]) + AC_DEFINE(PRIi16, "hi", [Format string for 16-bit as integer]) + AC_DEFINE(PRIi32, "i", [Format string for 32-bit as integer]) + AC_DEFINE(PRIi64, "lli", [Format string for 64-bit as integer]) + AC_DEFINE(PRIo8, "hho", [Format string for 8-bit as octal]) + AC_DEFINE(PRIo16, "ho", [Format string for 16-bit as octal]) + AC_DEFINE(PRIo32, "o", [Format string for 32-bit as octal]) + AC_DEFINE(PRIo64, "llo", [Format string for 64-bit as octal]) + AC_DEFINE(PRIu8, "hhu", [Format string for 8-bit as unsigned]) + AC_DEFINE(PRIu16, "hu", [Format string for 16-bit as unsigned]) + AC_DEFINE(PRIu32, "u", [Format string for 32-bit as unsigned]) + AC_DEFINE(PRIu64, "llu", [Format string for 64-bit as unsigned]) + AC_DEFINE(PRIx8, "hhx", + [Format string for 8-bit as lowercase hex]) + AC_DEFINE(PRIx16, "hx", + [Format string for 16-bit as lowercase hex]) + AC_DEFINE(PRIx32, "x", + [Format string for 32-bit as lowercase hex]) + AC_DEFINE(PRIx64, "llx", + [Format string for 64-bit as lowercase hex]) + AC_DEFINE(PRIX8, "hhX", + [Format string for 8-bit as uppercase hex]) + AC_DEFINE(PRIX16, "hX", + [Format string for 16-bit as uppercase hex]) + AC_DEFINE(PRIX32, "X", + [Format string for 32-bit as uppercase hex]) + AC_DEFINE(PRIX64, "llX", + [Format string for 64-bit as uppercase hex]) + + AC_SUBST(NOIXEMUL, -noixemul) + ;; powerpc-*-amigaos*) enable_shared="no" enable_threads="no" ;; *-morphos*) @@ -209,10 +261,18 @@ [OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"]) AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror], [OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"]) AX_CHECK_COMPILER_FLAGS([-Wmissing-method-return-type -Werror], [OBJCFLAGS="$OBJCFLAGS -Wmissing-method-return-type"]) + +case "$host" in + m68k-*-amigaos*) + dnl The inline headers generate code that triggers + dnl -Wpointer-sign. + OBJCFLAGS="$OBJCFLAGS -Wno-pointer-sign" + ;; +esac AC_MSG_CHECKING(whether Objective C compiler supports properties) AC_TRY_COMPILE([ #ifdef __has_attribute # if __has_attribute(objc_root_class) @@ -596,12 +656,15 @@ ], [ AC_MSG_RESULT(no) AC_DEFINE(UINTPTR_MAX, [(~(uintptr_t)0)], [Maximum value for uintptr_t]) ]) +AC_CHECK_HEADER(inttypes.h, + [AC_DEFINE(OF_HAVE_INTTYPES_H, 1, [Whether we have inttypes.h])]) + AC_CHECK_HEADER(sys/types.h, - [AC_DEFINE(OF_HAVE_SYS_TYPES_H, 1, [Whether we have ])]) + [AC_DEFINE(OF_HAVE_SYS_TYPES_H, 1, [Whether we have sys/types.h])]) AC_CHECK_TYPE(max_align_t, [AC_DEFINE(OF_HAVE_MAX_ALIGN_T, 1, [Whether we have max_align_t])]) AC_CHECK_HEADER(stdnoreturn.h, @@ -1302,15 +1365,14 @@ AC_DEFUN([CHECK_BUILTIN_BSWAP], [ AC_MSG_CHECKING(for __builtin_bswap$1) AC_TRY_LINK([ #include #include - #include #include ], [ uint$1_t i = errno; - printf("%" PRIu$1, __builtin_bswap$1(i)); + printf("%d", (int)__builtin_bswap$1(i)); ], [ AC_MSG_RESULT(yes) AC_DEFINE(OF_HAVE_BUILTIN_BSWAP$1, 1, [Whether we have __builtin_bswap$1]) ], [