b29b852281
config/ directory. We split them apart a while ago in the hopes that it would simplify things, but it didn't really (e.g., because there were still some ompi/opal .m4 files in the top-level config/ directory, resulting in developer confusion where any given m4 macro was defined). So this commit consolidates them back into the top-level directory for simplicity. There's still (at least) two changes that would be nice to make: 1. Split any generated .m4 file (e.g., autogen-generated .m4 files) into a separate directory somewhere so that a top-level -Iconfig/ will only get our explicitly defined macros, not the autogen stuff (e.g., with libevent2019 needing to get the visibility macro, but NOT all the autogen-generated inclusion of component configure.m4 files). 1. Change configure to be of the form: {{{ # ...a small amount of preamble/setup... OPAL_SETUP m4_ifdef([project_orte], [ORTE_SETUP]) m4_ifdef([project_ompi], [OMPI_SETUP]) # ...a small amount of finishing stuff... }}} I doubt we'll ever get anything as clean as that, but that would be the goal to shoot for. This commit was SVN r27704.
92 строки
2.5 KiB
Bash
92 строки
2.5 KiB
Bash
dnl -*- shell-script -*-
|
|
dnl
|
|
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
|
dnl
|
|
dnl $COPYRIGHT$
|
|
dnl
|
|
dnl Additional copyrights may follow
|
|
dnl
|
|
dnl $HEADER$
|
|
dnl
|
|
|
|
|
|
# OPAL_CHECK_COMPILER_VERSION_ID()
|
|
# ----------------------------------------------------
|
|
# Try to figure out the compiler's name and version to detect cases,
|
|
# where users compile Open MPI with one version and compile the application
|
|
# with a different compiler.
|
|
#
|
|
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)
|
|
])dnl
|
|
|
|
|
|
AC_DEFUN([OPAL_CHECK_COMPILER], [
|
|
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, "%d", PLATFORM_COMPILER_$1);
|
|
return 0;
|
|
}
|
|
], [
|
|
eval opal_cv_compiler_$1=`cat conftestval`;
|
|
], [
|
|
eval opal_cv_compiler_$1=0
|
|
], [
|
|
eval opal_cv_compiler_$1=0
|
|
])
|
|
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)
|
|
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", _STRINGIFY(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
|