Skip to content

Commit 36a41b5

Browse files
Merge pull request pmodels#371 from carns/carns/128-bit-CAS-autoconf-path
adjust include path for 128-bit CAS autoconf test Approved-by: Shintaro Iwasaki <[email protected]>
2 parents 4dc37e1 + e5f99ad commit 36a41b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,11 @@ AS_IF([test x"$use_huge_page" = x"yes"],
11081108
# check for the availability of int128 CAS. It is hard to get availability of
11091109
# instructions (and compiler support), so we rely on AC_RUN_IFELSE().
11101110
atomic_int128_cas_mode="disabled"
1111+
# Note: temporarily prepend the source directory to the include path so that
1112+
# the following configure test can locate abtd_asm_int128_cas.h regardless
1113+
# of where the configure script is executed.
1114+
SAVE_CFLAGS="$CFLAGS"
1115+
CFLAGS="-I$srcdir $CFLAGS"
11111116
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include "src/include/asm/abtd_asm_int128_cas.h"],[
11121117
__int128 val, old, neu;
11131118
int ret1, ret2;
@@ -1117,6 +1122,7 @@ val = 0, old = 1, neu = 1;
11171122
ret2 = !ABTD_asm_bool_cas_weak_int128(&val, old, neu) && (val == 0);
11181123
return !(ret1 && ret2);
11191124
])], [AC_DEFINE(ABT_CONFIG_HAVE_ATOMIC_INT128, 1, [Define if 128-bit CAS is supported.])])
1125+
CFLAGS="$SAVE_CFLAGS"
11201126

11211127
AM_CONDITIONAL([ABT_USE_INT128_ATOMIC], [test "x$ABT_CONFIG_HAVE_ATOMIC_INT128" != "x"])
11221128

0 commit comments

Comments
 (0)