summaryrefslogtreecommitdiff
path: root/dbind
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-06-25 19:45:28 +0200
committerMike Gorse <mgorse@suse.com>2016-04-01 11:25:37 -0500
commitf239b92014fc667bf660b17d6e4458c6cbfbf9b4 (patch)
tree1ecb479b1b4e56588c9eb9cbb945a147b945e24a /dbind
parentf89b79b454143d38bdb023f53698aef92f9c6fbb (diff)
downloadat-spi2-core-f239b92014fc667bf660b17d6e4458c6cbfbf9b4.tar.gz
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 <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'dbind')
-rw-r--r--dbind/dbind-config.h.in16
1 files changed, 8 insertions, 8 deletions
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