AC_DEFUN(GST_DOUBLE_ALIGNMENT, [

AC_CACHE_CHECK(for double alignment, gst_cv_double_alignment, [
AC_TRY_RUN([
  main()
  {
    long vec[3];
    double test, *testptr;

    test = *(double *)&vec[1];  /* Should not be double aligned */
    testptr = (double *)&vec[1];
    *testptr = test;
    exit(0);
  }],
  gst_cv_double_alignment=SIZEOF_CHAR_P,
  gst_cv_double_alignment="2 * SIZEOF_CHAR_P",
  gst_cv_double_alignment="2 * SIZEOF_CHAR_P")     dnl Assume the worst
])

AC_DEFINE_UNQUOTED(DOUBLE_ALIGNMENT, $gst_cv_double_alignment, [Define this with the memory alignment required by type "double".])

])dnl
