2 dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 dnl University Research and Technology
4 dnl Corporation. All rights reserved.
5 dnl Copyright (c) 2004-2005 The University of Tennessee and The University
6 dnl of Tennessee Research Foundation. All rights
8 dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 dnl University of Stuttgart. All rights reserved.
10 dnl Copyright (c) 2004-2005 The Regents of the University of California.
11 dnl All rights reserved.
14 dnl Additional copyrights may follow
19 dnl OMPI_TRY_ASSEMBLE(asm-code, [action-if-success], [action-if-fail])
21 dnl Attempt to assemble asm-code. If success, run action-if-success.
22 dnl Otherwise, run action-if-fail. Neither action-if-success nor
23 dnl action-if-fail are required.
25 dnl No preprocessing is guaranteed to be done on asm-code. Some
26 dnl compilers do not run the preprocessor on assembly files.
28 dnl On failure, asm-test.s will be included in config.out
29 AC_DEFUN([OMPI_TRY_ASSEMBLE],
30 [cat >conftest.s <<EOF
33 if test "$CC" = "$CCAS" ; then
34 ompi_assemble="$CCAS $CCASFLAGS -c conftest.s >conftest.out 2>&1"
36 ompi_assemble="$CCAS $CCASFLAGS conftest.s >conftest.out 2>&1"
38 if AC_TRY_EVAL(ompi_assemble); then
40 cat conftest.out >&AC_FD_CC
43 # save compiler output and failed program
44 cat conftest.out >&AC_FD_CC
45 echo "configure: failed program was:" >&AC_FD_CC
46 cat conftest.s >&AC_FD_CC