1 dnl -*- shell-script -*-
3 dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4 dnl University Research and Technology
5 dnl Corporation. All rights reserved.
6 dnl Copyright (c) 2004-2005 The University of Tennessee and The University
7 dnl of Tennessee Research Foundation. All rights
9 dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 dnl University of Stuttgart. All rights reserved.
11 dnl Copyright (c) 2004-2005 The Regents of the University of California.
12 dnl All rights reserved.
15 dnl Additional copyrights may follow
20 AC_DEFUN([OMPI_CHECK_ICC_VARARGS],[
22 dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since
23 dnl va_start was miscompiled...
25 AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
31 void func (int c, char * f, ...)
34 va_start (arglist, f);
35 /* vprintf (f, arglist); */
39 int main (int argc, char * argv[])
42 func (4711, "Help %d [%s]\n", 10, "ten");
43 f=fopen ("conftestval", "w");
48 ],[ompi_ac_icc_varargs=`test -f conftestval`],[ompi_ac_icc_varargs=1],[ompi_ac_icc_varargs=1])
50 if test "$ompi_ac_icc_varargs" = "1"; then
51 AC_MSG_WARN([*** Problem running configure test!])
52 AC_MSG_WARN([*** Your icc-8.1 compiler seems to miscompile va_start!])
53 AC_MSG_WARN([*** Please upgrade compiler to at least version 8.1.027])
54 AC_MSG_ERROR([*** Cannot continue.])
59 /bin/rm -f conftest*])dnl