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
14 # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro)
15 -AC_MSG_CHECKING([for unaligned pointers])
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],
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])
31 +if test "$ac_cv_lbl_unaligned_fail" = yes; then
32 + pgm_unaligned_pointers=no
34 + pgm_unaligned_pointers=yes
36 AC_MSG_CHECKING([for intrinsic atomic ops])
37 # AC_PREPROC_IFELSE not always portable