From de37729db32e7d10d7c7e15fcb9ace26e6c98f2c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 16 Oct 2002 08:54:26 +0000 Subject: [PATCH] * ./oldgcc.m4, ./nero/configure.in : - Detection des incompatibilites de version de g++ grace a "oldgcc.m4" (thanks Christophe Alexandre). --- alliance/src/nero/configure.in | 1 + alliance/src/oldgcc.m4 | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 alliance/src/oldgcc.m4 diff --git a/alliance/src/nero/configure.in b/alliance/src/nero/configure.in index 88c519a6..79f44991 100644 --- a/alliance/src/nero/configure.in +++ b/alliance/src/nero/configure.in @@ -21,6 +21,7 @@ AC_PROG_CXX AC_PROG_CC AC_PROG_RANLIB AC_PROG_MAKE_SET +ALC_CXX_PROBLEMATIC_OLD_VERSION AC_CHECK_LIB(m, pow) diff --git a/alliance/src/oldgcc.m4 b/alliance/src/oldgcc.m4 new file mode 100644 index 00000000..cce2c0fc --- /dev/null +++ b/alliance/src/oldgcc.m4 @@ -0,0 +1,30 @@ +AC_DEFUN(ALC_CXX_PROBLEMATIC_OLD_VERSION, +[ +AC_REQUIRE([AC_PROG_CXX]) +AC_MSG_CHECKING(if this is a problematic old ${CXX} version) +AC_CACHE_VAL(alc_cv_cxx_problematic_version, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_TRY_CPP([ +#ifdef __GNUC__ +#if __GNUC__ < 2 +#error ALC works best with GCC version 2.95.2 or higher +#endif /* __GNUC__ < 2 */ +#ifdef __GNUC_MINOR__ +#if __GNUC__ == 2 && __GNUC_MINOR__ < 95 +#error ALC works only with GCC version 2.95.2 or higher +#endif /* __GNUC_MINOR__ < 95.2 */ +#endif /* defined(__GNUC_MINOR__) */ +#endif /* defined(__GNUC__) */ +], +alc_cv_cxx_problematic_version=no, alc_cv_cxx_problematic_version=yes) +AC_LANG_RESTORE +]) +AC_MSG_RESULT($alc_cv_cxx_problematic_version) +if test "$alc_cv_cxx_problematic_version" = yes; then +AC_MSG_ERROR(*** This package works only with ${CXX} version 2.95.2 or higher ... please install gcc 2.95.2 or higher or set the environment variable CC and CXX to the good gcc before running the configure script ***) +fi +])dnl +dnl +dnl