From: Michael Olbrich Date: Wed, 25 Apr 2012 07:46:35 +0000 (+0200) Subject: make sure configure fails if AC_CHECK_ALIGNOF cannot detect the alignment X-Git-Tag: android-x86-6.0-r1~112 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a7a1a50d6a8eb8387cce1756f3c38abf36f281b4;p=android-x86%2Fexternal-bluetooth-glib.git make sure configure fails if AC_CHECK_ALIGNOF cannot detect the alignment When cross-compiling with gcc >= 4.5 AC_CHECK_ALIGNOF fails to detect the correct alignment. Without a previous AC_CHECK_TYPE for the same type, the alignment is silently set to '0'. This makes sure that configure fails and reports the problem. Signed-off-by: Michael Olbrich https://bugzilla.gnome.org/show_bug.cgi?id=674483 --- diff --git a/configure.ac b/configure.ac index 6a90d233a..2175867d1 100644 --- a/configure.ac +++ b/configure.ac @@ -3443,10 +3443,13 @@ $ac_cv_sizeof___int64) ;; esac +AC_CHECK_TYPE([guint32],,,[typedef unsigned $gint32 guint32;]) AC_CHECK_ALIGNOF([guint32], [AC_INCLUDES_DEFAULT typedef unsigned $gint32 guint32;]) +AC_CHECK_TYPE([guint64],,,[typedef unsigned $gint64 guint64;]) AC_CHECK_ALIGNOF([guint64], [AC_INCLUDES_DEFAULT typedef unsigned $gint64 guint64;]) +AC_CHECK_TYPE([unsigned long]) AC_CHECK_ALIGNOF([unsigned long]) # Check for libdbus1 - Optional - is only used in the GDBus test cases