From f239b92014fc667bf660b17d6e4458c6cbfbf9b4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 25 Jun 2014 19:45:28 +0200 Subject: configure: use AC_CHECK_ALIGNOF() instead of custom DBIND_CHECK_ALIGNOF() DBIND_CHECK_ALIGNOF() is a custom autoconf macro from at-spi2-core that tests the alignment required on the current platform for a given C type. Unfortunately, this macro uses AC_TRY_RUN(), which requires running a test program on the target platform, which is fundamentally incompatible with cross-compilation. Therefore, this patch switches the configure.ac code to use AC_CHECK_ALIGNOF() instead, which is available in the standard set of autoconf macros, and is able to test the required alignment for C types without using AC_TRY_RUN(). Consequently, it adjusts the dbind/dbind-config.h.in definitions to use the definitions created by the AC_CHECK_ALIGNOF() macros, which are not substituted by autoconf, but directly available from config.h. Signed-off-by: Thomas Petazzoni --- dbind/dbind-config.h.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dbind') diff --git a/dbind/dbind-config.h.in b/dbind/dbind-config.h.in index 3da421e1..779c4c6c 100644 --- a/dbind/dbind-config.h.in +++ b/dbind/dbind-config.h.in @@ -1,8 +1,8 @@ -#define DBIND_ALIGNOF_CHAR @DBIND_ALIGNOF_CHAR@ -#define DBIND_ALIGNOF_DBIND_POINTER @DBIND_ALIGNOF_DBIND_POINTER@ -#define DBIND_ALIGNOF_DBIND_STRUCT @DBIND_ALIGNOF_DBIND_STRUCT@ -#define DBIND_ALIGNOF_DBUS_BOOL_T @DBIND_ALIGNOF_DBUS_BOOL_T@ -#define DBIND_ALIGNOF_DBUS_INT16_T @DBIND_ALIGNOF_DBUS_INT16_T@ -#define DBIND_ALIGNOF_DBUS_INT32_T @DBIND_ALIGNOF_DBUS_INT32_T@ -#define DBIND_ALIGNOF_DBUS_INT64_T @DBIND_ALIGNOF_DBUS_INT64_T@ -#define DBIND_ALIGNOF_DOUBLE @DBIND_ALIGNOF_DOUBLE@ +#define DBIND_ALIGNOF_CHAR ALIGNOF_CHAR +#define DBIND_ALIGNOF_DBIND_POINTER ALIGNOF_DBIND_POINTER +#define DBIND_ALIGNOF_DBIND_STRUCT ALIGNOF_DBIND_STRUCT +#define DBIND_ALIGNOF_DBUS_BOOL_T ALIGNOF_DBUS_BOOL_T +#define DBIND_ALIGNOF_DBUS_INT16_T ALIGNOF_DBUS_INT16_T +#define DBIND_ALIGNOF_DBUS_INT32_T ALIGNOF_DBUS_INT32_T +#define DBIND_ALIGNOF_DBUS_INT64_T ALIGNOF_DBUS_INT64_T +#define DBIND_ALIGNOF_DOUBLE ALIGNOF_DOUBLE -- cgit v1.2.1