From 9dfb3bc7b097c953c9cd5d8e66d9a51ecca908dc Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Fri, 11 Mar 2005 22:42:47 +0000 Subject: [PATCH] Allow for unknown compilers and issue a warning git-svn-id: https://svn.dealii.org/trunk@10101 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 15 ++++++++------- deal.II/configure | 45 ++++++++++++++++++++++++++++---------------- deal.II/configure.in | 17 +++++++++++++++++ 3 files changed, 54 insertions(+), 23 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 51ec321f9e..14783e8792 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -235,7 +235,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl else dnl Aw, nothing suitable found... - AC_MSG_RESULT(Unrecognized compiler --- you will probably run into trouble. Try to go ahead and get help from developers@dealii.org) + AC_MSG_RESULT(Unrecognized C++ compiler -- Try to go ahead and get help from dealii@dealii.org) GXX_VERSION=unknown_cc fi fi @@ -629,8 +629,9 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl ;; *) - AC_MSG_ERROR(No compiler options for this C++ compiler - specified at present) + CXXFLAGSG="$CXXFLAGS -DDEBUG" + CXXFLAGSO="$CXXFLAGS -O2" + AC_MSG_RESULT(Unknown C++ compiler - using generic options) ;; esac fi @@ -945,8 +946,8 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl else dnl Aw, nothing suitable found... - AC_MSG_ERROR([Unrecognized compiler -- sorry]) - exit 1 + AC_MSG_RESULT([Unrecognized compiler -- still trying]) + CC_VERSION=unknown_cc fi fi fi @@ -1041,8 +1042,8 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl ;; *) - AC_MSG_ERROR(No compiler options for this C compiler - specified at present) + AC_MSG_RESULT(Unknown C compiler - using generic options) + CFLAGS="$CFLAGS -O2" ;; esac fi diff --git a/deal.II/configure b/deal.II/configure index e751b880ba..3df8112262 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -3035,8 +3035,8 @@ echo "${ECHO_T}C++ compiler is KAI C++" >&6 GXX_VERSION=kai_cc else - echo "$as_me:$LINENO: result: Unrecognized compiler --- you will probably run into trouble. Try to go ahead and get help from developers@dealii.org" >&5 -echo "${ECHO_T}Unrecognized compiler --- you will probably run into trouble. Try to go ahead and get help from developers@dealii.org" >&6 + echo "$as_me:$LINENO: result: Unrecognized C++ compiler -- Try to go ahead and get help from dealii@dealii.org" >&5 +echo "${ECHO_T}Unrecognized C++ compiler -- Try to go ahead and get help from dealii@dealii.org" >&6 GXX_VERSION=unknown_cc fi fi @@ -3442,11 +3442,10 @@ echo "$as_me: error: Attention! deal.II is not known to work with Borland C++! ;; *) - { { echo "$as_me:$LINENO: error: No compiler options for this C++ compiler - specified at present" >&5 -echo "$as_me: error: No compiler options for this C++ compiler - specified at present" >&2;} - { (exit 1); exit 1; }; } + CXXFLAGSG="$CXXFLAGS -DDEBUG" + CXXFLAGSO="$CXXFLAGS -O2" + echo "$as_me:$LINENO: result: Unknown C++ compiler - using generic options" >&5 +echo "${ECHO_T}Unknown C++ compiler - using generic options" >&6 ;; esac fi @@ -3819,10 +3818,9 @@ echo "${ECHO_T}C compiler is KAI C" >&6 CC_VERSION=kai_cc else - { { echo "$as_me:$LINENO: error: Unrecognized compiler -- sorry" >&5 -echo "$as_me: error: Unrecognized compiler -- sorry" >&2;} - { (exit 1); exit 1; }; } - exit 1 + echo "$as_me:$LINENO: result: Unrecognized compiler -- still trying" >&5 +echo "${ECHO_T}Unrecognized compiler -- still trying" >&6 + CC_VERSION=unknown_cc fi fi fi @@ -3888,11 +3886,9 @@ echo "$as_me: error: Unrecognized compiler -- sorry" >&2;} ;; *) - { { echo "$as_me:$LINENO: error: No compiler options for this C compiler - specified at present" >&5 -echo "$as_me: error: No compiler options for this C compiler - specified at present" >&2;} - { (exit 1); exit 1; }; } + echo "$as_me:$LINENO: result: Unknown C compiler - using generic options" >&5 +echo "${ECHO_T}Unknown C compiler - using generic options" >&6 + CFLAGS="$CFLAGS -O2" ;; esac fi @@ -11442,3 +11438,20 @@ if test "x$doxygen_not_found" = "xyes" ; then echo " WARNING: however." echo fi + +if test "x$CC_VERSION" = "xunknown_cc" ; then + echo ---------------------------------------------------------------------- + echo " WARNING: The C compiler used for configuration is unknown!" + echo " WARNING: configure has used a generic set of parameters." + echo " WARNING: Still, you have to expect trouble during compilation." + echo " WARNING: If so, report to dealii@dealii.org!" +fi + +if test "x$GXX_VERSION" = "xunknown_cc" ; then + echo ---------------------------------------------------------------------- + echo " WARNING: The C++ compiler used for configuration is unknown!" + echo " WARNING: configure has used a generic set of parameters." + echo " WARNING: Still, you have to expect trouble during compilation." + echo " WARNING: If so, report to dealii@dealii.org!" +fi + diff --git a/deal.II/configure.in b/deal.II/configure.in index 77f68333f2..60ea428f50 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -635,3 +635,20 @@ if test "x$doxygen_not_found" = "xyes" ; then echo " WARNING: however." echo fi + +if test "x$CC_VERSION" = "xunknown_cc" ; then + echo ---------------------------------------------------------------------- + echo " WARNING: The C compiler used for configuration is unknown!" + echo " WARNING: configure has used a generic set of parameters." + echo " WARNING: Still, you have to expect trouble during compilation." + echo " WARNING: If so, report to dealii@dealii.org!" +fi + +if test "x$GXX_VERSION" = "xunknown_cc" ; then + echo ---------------------------------------------------------------------- + echo " WARNING: The C++ compiler used for configuration is unknown!" + echo " WARNING: configure has used a generic set of parameters." + echo " WARNING: Still, you have to expect trouble during compilation." + echo " WARNING: If so, report to dealii@dealii.org!" +fi + -- 2.39.5