1
1

- AC_TRY_RUN does not work in case of cross-compilation environments.

Tests based on preprocessor CPP output, won't help either, as they
   don't spit out nice computed numerical values, but rather the
   #define itselve.

This commit was SVN r21364.
Этот коммит содержится в:
Rainer Keller 2009-06-04 13:00:16 +00:00
родитель aadf1add6c
Коммит 1b8d0cf146

Просмотреть файл

@ -29,6 +29,7 @@ AC_DEFUN([OPAL_CHECK_COMPILER], [
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
[
if test "$cross_compiling" != "yes" ; then
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${top_ompi_srcdir}/ompi/include $CPPFLAGS"
AC_TRY_RUN([
@ -50,6 +51,9 @@ int main (int argc, char * argv[])
eval opal_cv_compiler_$1=0
])
CPPFLAGS=$CPPFLAGS_orig
else
opal_cv_compiler_$1=0
fi
])
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
[The compiler $lower which OMPI was built with])
@ -60,6 +64,7 @@ AC_DEFUN([OPAL_CHECK_COMPILER_STRINGIFY], [
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
[
if test "$cross_compiling" != "yes" ; then
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${top_ompi_srcdir}/ompi/include $CPPFLAGS"
AC_TRY_RUN([
@ -81,6 +86,9 @@ int main (int argc, char * argv[])
eval opal_cv_compiler_$1=UNKNOWN
])
CPPFLAGS=$CPPFLAGS_orig
else
opal_cv_compiler_$1=UNKNOWN
fi
])
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
[The compiler $lower which OMPI was built with])