summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac68
1 files changed, 65 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 72a8e753..d98a37c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,58 @@ 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"
@@ -212,6 +264,14 @@ AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror],
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
@@ -598,8 +658,11 @@ AC_EGREP_CPP(egrep_cpp_yes, [
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 <sys/types.h>])])
+ [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])])
@@ -1304,11 +1367,10 @@ AC_DEFUN([CHECK_BUILTIN_BSWAP], [
AC_TRY_LINK([
#include <stdint.h>
#include <stdio.h>
- #include <inttypes.h>
#include <errno.h>
], [
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,