2008-10-28 20:22:29 +03:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
|
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
dnl University Research and Technology
|
|
|
|
dnl Corporation. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
dnl of Tennessee Research Foundation. All rights
|
|
|
|
dnl reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl University of Stuttgart. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
2014-05-06 23:22:27 +04:00
|
|
|
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
|
2014-05-06 23:22:27 +04:00
|
|
|
AC_DEFUN([OPAL_CHECK_ICC_VARARGS],[
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl va_start was miscompiled...
|
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments])
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
void func (int c, char * f, ...)
|
|
|
|
{
|
|
|
|
va_list arglist;
|
|
|
|
va_start (arglist, f);
|
|
|
|
/* vprintf (f, arglist); */
|
|
|
|
va_end (arglist);
|
|
|
|
}
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
func (4711, "Help %d [%s]\n", 10, "ten");
|
|
|
|
f=fopen ("conftestval", "w");
|
|
|
|
if (!f) exit (1);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-05-06 23:22:27 +04:00
|
|
|
],[opal_ac_icc_varargs=`test -f conftestval`],[opal_ac_icc_varargs=1],[opal_ac_icc_varargs=1])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2014-05-06 23:22:27 +04:00
|
|
|
if test "$opal_ac_icc_varargs" = "1"; then
|
2008-10-28 20:22:29 +03:00
|
|
|
AC_MSG_WARN([*** Problem running configure test!])
|
|
|
|
AC_MSG_WARN([*** Your icc-8.1 compiler seems to miscompile va_start!])
|
|
|
|
AC_MSG_WARN([*** Please upgrade compiler to at least version 8.1.027])
|
|
|
|
AC_MSG_ERROR([*** Cannot continue.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
|
|
|
rm -rf conftest*])dnl
|