re-apply r29608 and fix the broken configure test that broke worse with the
patch. See ticket #3885, comment 10 for an explination of why calling _STRINGIFY on something that's not a numerical constant is always a bad idea. This commit was SVN r29613. The following SVN revision numbers were found above: r29608 --> open-mpi/ompi@b71bd51cdd
Этот коммит содержится в:
родитель
36e9987ce6
Коммит
9780043456
@ -21,7 +21,7 @@ AC_DEFUN([OPAL_CHECK_COMPILER_VERSION_ID],
|
||||
OPAL_CHECK_COMPILER(FAMILYID)
|
||||
OPAL_CHECK_COMPILER_STRINGIFY(FAMILYNAME)
|
||||
OPAL_CHECK_COMPILER(VERSION)
|
||||
OPAL_CHECK_COMPILER_STRINGIFY(VERSION_STR)
|
||||
OPAL_CHECK_COMPILER_STRING(VERSION_STR)
|
||||
])dnl
|
||||
|
||||
|
||||
@ -57,6 +57,38 @@ int main (int argc, char * argv[])
|
||||
[The compiler $lower which OMPI was built with])
|
||||
])dnl
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_COMPILER_STRING], [
|
||||
lower=m4_tolower($1)
|
||||
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
|
||||
[
|
||||
CPPFLAGS_orig=$CPPFLAGS
|
||||
CPPFLAGS="-I${top_ompi_srcdir}/ompi/include $CPPFLAGS"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "mpi_portable_platform.h"
|
||||
|
||||
int main (int argc, char * argv[])
|
||||
{
|
||||
FILE * f;
|
||||
f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
fprintf (f, "%s", PLATFORM_COMPILER_$1);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
eval opal_cv_compiler_$1=`cat conftestval`;
|
||||
], [
|
||||
eval opal_cv_compiler_$1=UNKNOWN
|
||||
], [
|
||||
eval opal_cv_compiler_$1=UNKNOWN
|
||||
])
|
||||
CPPFLAGS=$CPPFLAGS_orig
|
||||
])
|
||||
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
|
||||
[The compiler $lower which OMPI was built with])
|
||||
])dnl
|
||||
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_COMPILER_STRINGIFY], [
|
||||
lower=m4_tolower($1)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user