Skip to content
Snippets Groups Projects
Commit eb6c2cf3 authored by Christian Engwer's avatar Christian Engwer
Browse files

improved compiler test.. works with icc 8.0

[[Imported from SVN: r964]]
parent 0b87b055
No related branches found
No related tags found
No related merge requests found
# $Id$
# check for gcc >= 3.4.1
# check for supported compilers
AC_DEFUN([DUNE_CHECK_COMPILER],[
AC_ARG_ENABLE(compilercheck,
AC_HELP_STRING([--enable-compilercheck],
[check for supported compilers \[default=yes\]]),
[compilercheck=$enable],
[compilercheck=yes]
)
SUPPORTED_COMPILER="gcc (>= 3.4.1) or icc (>= 7.0)"
AC_REQUIRE([AC_PROG_CXX])
cat >conftest.cc <<_ACEOF
#ifdef __ICC
#if __ICC >= 700
#define CXX_SUPPORTED
#endif
#endif
#ifdef __GNUC__
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 4 || \
(__GNUC_MINOR__ == 4 && \
__GNUC_PATCHLEVEL__ >= 1)))
#else
#error You need gcc version >= 3.4.1
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 4 || \
(__GNUC_MINOR__ == 4 && \
__GNUC_PATCHLEVEL__ >= 1)))
#define CXX_SUPPORTED
#endif
#endif
#ifndef CXX_SUPPORTED
#error Your compiler is not officially supprted by dune
#endif
int main() { return 0; }
_ACEOF
if $CXX conftest.cc -o conftest.$ac_exeext >&5; then
rm -f conftest.$ac_exeext
if test "x$compilercheck" != "xyes" ; then
AC_MSG_WARN([compilercheck is disabled. DANGEROUS!])
else
AC_MSG_ERROR([When using gcc, you need gcc-version >= 3.4.1])
if $CXX conftest.cc -o conftest.$ac_exeext >&5; then
rm -f conftest.$ac_exeext
else
AC_MSG_ERROR([Your compiler is not officially supported by dune
dune is known to work with $SUPPORTED_COMPILER])
fi
fi
])
\ No newline at end of file
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment