3
# Attempt to compile the inline assembly x86copy code. If we fail,
4
# search for a list of compilers known to work and try again.
6
AC_DEFUN([ARMCI_X86COPY], [
7
AC_CACHE_CHECK([whether we can compile x86copy inline assembly],
9
[ga_compile="$CC -c $CFLAGS -I$ARMCI_TOP_SRCDIR/src/include $CPPFLAGS $ARMCI_TOP_SRCDIR/src/common/x86copy.c"
10
AS_ECHO(["$ga_compile"])>&AS_MESSAGE_LOG_FD
11
AS_IF([$ga_compile 1>&AS_MESSAGE_LOG_FD 2>&1],
12
[armci_cv_as_x86copy=yes],
13
[armci_cv_as_x86copy=no])
15
AC_CACHE_CHECK([whether we can compile x86copy inline assembly with help],
16
[armci_cv_as_x86copy_with],
17
[AC_PATH_PROGS_FEATURE_CHECK([ARMCI_X86COPY_AS], [bgxlc xlc gcc],
18
[ga_compile="$ac_path_ARMCI_X86COPY_AS -c $CFLAGS -I$ARMCI_TOP_SRCDIR/src/include $CPPFLAGS $ARMCI_TOP_SRCDIR/src/common/x86copy.c"
19
AS_ECHO(["$ga_compile"])>&AS_MESSAGE_LOG_FD
20
AS_IF([$ga_compile 1>&AS_MESSAGE_LOG_FD 2>&1],
21
[armci_cv_as_x86copy_with=$ac_path_ARMCI_X86COPY_AS
22
ac_cv_path_ARMCI_X86COPY_AS=$ac_path_ARMCI_X86COPY_AS
23
ac_path_ARMCI_X86COPY_AS_found=:])
25
[armci_cv_as_x86copy_with=no])])
26
AC_SUBST([ARMCI_X86COPY_AS], [$ac_cv_path_ARMCI_X86COPY_AS])
27
AS_CASE([$ga_cv_target:$host_cpu],
29
[armci_cv_as_x86copy_need=yes
30
AC_DEFINE([COPY686], [1], [Defined when TARGET=LINUX and cpu is x86])])
31
AM_CONDITIONAL([INLINE_X86COPY_NEEDED],
32
[test "x$armci_cv_as_x86copy_need" = xyes])
33
AM_CONDITIONAL([INLINE_X86COPY_OKAY],
34
[test "x$armci_cv_as_x86copy" = xyes])
35
AM_CONDITIONAL([INLINE_X86COPY_WITH],
36
[test "x$armci_cv_as_x86copy_with" != xno])