janus-gateway: make echo test plugin optional
[buildroot-gz.git] / package / openpgm / 0002-cross-compile.patch
blob07a24492e5130ccb4cc0ba940921797a110821b1
1 configure.ac: cross-compilation fix
3 This patch enables to configure the package when cross-compiling in a way
4 recommended by Autoconf manual (see manual for version 2.69, Section 6.6
5 Checking Runtime Behavior).
7 Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
9 --- a/openpgm/pgm/configure.ac 2011-09-27 20:59:08.000000000 +0300
10 +++ b/openpgm/pgm/configure.ac 2013-02-12 10:33:53.000000000 +0200
11 @@ -272,14 +272,19 @@ uint32_t add32_with_carry (uint32_t a, u
13 esac
14 # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro)
15 -AC_MSG_CHECKING([for unaligned pointers])
16 -AC_RUN_IFELSE(
17 - [AC_LANG_PROGRAM([[char* nezumi = "mouse";]],
18 - [[short x = *(short*)(nezumi + 2)]])],
19 - [AC_MSG_RESULT([yes])
20 - pgm_unaligned_pointers=yes],
21 - [AC_MSG_RESULT([no])
22 - pgm_unaligned_pointers=no])
23 +AC_CACHE_CHECK([if unaligned access fails], [ac_cv_lbl_unaligned_fail],
24 + [AC_RUN_IFELSE(
25 + [AC_LANG_PROGRAM([[char* nezumi = "mouse";]],
26 + [[short x = *(short*)(nezumi + 2)]])],
27 + [ac_cv_lbl_unaligned_fail=no],
28 + [ac_cv_lbl_unaligned_fail=yes],
29 + [ac_cv_lbl_unaligned_fail=yes])
30 + ])
31 +if test "$ac_cv_lbl_unaligned_fail" = yes; then
32 + pgm_unaligned_pointers=no
33 +else
34 + pgm_unaligned_pointers=yes
35 +fi
36 AC_MSG_CHECKING([for intrinsic atomic ops])
37 # AC_PREPROC_IFELSE not always portable
38 AC_COMPILE_IFELSE(