~ubuntu-branches/ubuntu/hardy/openmpi/hardy-updates

« back to all changes in this revision

Viewing changes to config/ompi_check_icc.m4

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-10-15 00:46:11 UTC
  • Revision ID: james.westby@ubuntu.com-20061015004611-uuhxnaxyjmuxfd5h
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl -*- shell-script -*-
 
2
dnl
 
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
 
8
dnl                         reserved.
 
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.
 
13
dnl $COPYRIGHT$
 
14
dnl 
 
15
dnl Additional copyrights may follow
 
16
dnl 
 
17
dnl $HEADER$
 
18
dnl
 
19
 
 
20
AC_DEFUN([OMPI_CHECK_ICC_VARARGS],[
 
21
dnl
 
22
dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since 
 
23
dnl va_start was miscompiled...
 
24
dnl
 
25
AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
 
26
AC_TRY_RUN([
 
27
#include <stdarg.h>
 
28
#include <stdio.h>
 
29
#include <stdlib.h>
 
30
 
 
31
void func (int c, char * f, ...)
 
32
{
 
33
  va_list arglist;
 
34
  va_start (arglist, f);
 
35
  /* vprintf (f, arglist); */
 
36
  va_end (arglist);
 
37
}
 
38
 
 
39
int main (int argc, char * argv[])
 
40
{
 
41
  FILE *f;
 
42
  func (4711, "Help %d [%s]\n", 10, "ten");
 
43
  f=fopen ("conftestval", "w");
 
44
  if (!f) exit (1);
 
45
  return 0;
 
46
}
 
47
 
 
48
],[ompi_ac_icc_varargs=`test -f conftestval`],[ompi_ac_icc_varargs=1],[ompi_ac_icc_varargs=1])
 
49
 
 
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.])
 
55
fi
 
56
 
 
57
AC_MSG_RESULT([yes])
 
58
 
 
59
/bin/rm -f conftest*])dnl