]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Detect and configure C compiler to compile umfpack.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 20 Aug 2004 20:36:55 +0000 (20:36 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 20 Aug 2004 20:36:55 +0000 (20:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@9564 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/common/Make.global_options.in
deal.II/configure
deal.II/configure.in
deal.II/doc/development/Makefile
deal.II/doc/development/makefiles.1.html

index 9b9522d0c9348e7e245faaf6f3d694175d416930..7726efa547f154febfecacb5031052f17cb268b2 100644 (file)
@@ -708,6 +708,318 @@ AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl
 
 
 
+dnl -------------------------------------------------------------
+dnl Determine the C compiler in use. Return the name and possibly
+dnl version of this compiler in CC_VERSION. This function is almost
+dnl identifical to DEAL_II_DETERMINE_CXX_BRAND and tehrefore lacks
+dnl a lot of the comments found there to keep it short
+dnl
+dnl Usage: DEAL_II_DETERMINE_CC_BRAND
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl
+[
+  if test "$GCC" = "yes" ; then
+    CC_VERSION_STRING=`($CC -v 2>&1) | grep "gcc version"`
+    if test "x$CC_VERSION_STRING" = "x" ; then
+      GC=no
+    fi
+  fi
+
+  if test "$GCC" = yes ; then
+    dnl find out the right version
+    CC_VERSION_STRING=`($CC -v 2>&1) | grep "gcc version"`
+    case "$CC_VERSION_STRING" in
+      *"egcs-1.1"*)
+       AC_MSG_RESULT(C compiler is egcs-1.1)
+       CC_VERSION=egcs1.1
+       ;;
+      *2.95*)
+       AC_MSG_RESULT(C compiler is gcc-2.95)
+       CC_VERSION=gcc2.95
+       ;;
+      *2.96*)
+       AC_MSG_ERROR(C compiler reports faulty gcc 2.96. Please install a new compiler)
+       CC_VERSION=gcc2.96
+       ;;
+      *2.97*)
+       AC_MSG_RESULT(C compiler is gcc-2.97)
+       CC_VERSION=gcc2.97
+       ;;
+      *version\ 3.0*)
+       AC_MSG_RESULT(C compiler is gcc-3.0)
+       CC_VERSION=gcc3.0
+       ;;
+      *version\ 3.1*)
+       AC_MSG_RESULT(C compiler is gcc-3.1)
+       CC_VERSION=gcc3.1
+       ;;
+      *version\ 3.2*)
+       AC_MSG_RESULT(C compiler is gcc-3.2)
+       CC_VERSION=gcc3.2
+       ;;
+      *version\ 3.3*)
+       AC_MSG_RESULT(C compiler is gcc-3.3)
+       CC_VERSION=gcc3.3
+       ;;
+      *version\ 3.4*)
+       AC_MSG_RESULT(C compiler is gcc-3.4)
+       CC_VERSION=gcc3.4
+       ;;
+      *version\ 3.5*)
+       AC_MSG_RESULT(C compiler is gcc-3.5)
+       CC_VERSION=gcc3.5
+       ;;
+      *2.4* | *2.5* | *2.6* | *2.7* | *2.8*)
+       AC_MSG_RESULT(C compiler is $CC_VERSION_STRING)
+       AC_MSG_ERROR(C compiler is not supported)
+       ;;
+      *)
+       AC_MSG_RESULT(C compiler is unknown but accepted gcc version)
+       CC_VERSION=gcc-other
+       ;;
+    esac
+  else
+    dnl Check other (non-gcc) compilers
+  
+    dnl Check for IBM xlC. For some reasons, depending on some environment
+    dnl variables, moon position, and other reasons unknown to me, the
+    dnl compiler displays different names in the first line of output, so
+    dnl check various possibilities
+    is_ibm_xlc="`($CC 2>&1) | egrep 'VisualAge C|C Set ++|C for AIX Compiler'`"
+    if test "x$is_ibm_xlc" != "x"  ; then
+      dnl Ah, this is IBM's C compiler. Unfortunately, we don't presently
+      dnl know how to check the version number, so assume that is sufficiently
+      dnl high...
+      AC_MSG_RESULT(C compiler is IBM xlC)
+      CC_VERSION=ibm_xlc
+    else
+  
+      dnl Check whether we are dealing with the MIPSpro C compiler
+      mips_pro="`($CC -version 2>&1) | grep MIPSpro`"
+      if test "x$mips_pro" != "x" ; then
+        case "$mips_pro" in
+          *7.0* | *7.1* | *7.2* | *7.3*)
+            dnl MIPSpro 7.3 does not support standard C++, therefore it is not
+            dnl able to compile deal.II. Previous compiler versions neither.
+            AC_MSG_RESULT(C compiler is $mips_pro)
+            AC_MSG_ERROR(This compiler is not supported)
+            CC_VERSION=MIPSpro7.3
+            ;;
+          *7.4)
+            AC_MSG_RESULT(C compiler is MIPSpro compiler 7.4)
+            AC_MSG_ERROR(This compiler is not supported. Use MIPSPro compiler 7.4x)
+            CC_VERSION=MIPSpro7.4
+            ;;
+          *7.41* | *7.42* | *7.43* | *7.44*)
+            AC_MSG_RESULT(C compiler is MIPSpro compiler 7.4x)
+            CC_VERSION=MIPSpro7.4x
+            ;;
+          *"7.5"*)
+            AC_MSG_RESULT(C compiler is MIPSpro compiler 7.5)
+            CC_VERSION=MIPSpro7.5
+            ;;
+          *)
+            AC_MSG_RESULT(C compiler is unknown version but accepted MIPSpro compiler version)
+            CC_VERSION=MIPSpro-other
+            ;;
+        esac
+      else
+  
+        dnl Intel's ICC C compiler? On Linux, it uses -V, on Windows
+       dnl it is -help
+       dnl
+       dnl Annoyingly, ecc6.0 prints its version number on a separate
+       dnl line (the previous one ends with the string "applications"),
+       dnl so join this one to the previous one with a little bit of
+       dnl perl.
+        is_intel_icc1="`($CC -V 2>&1) | grep 'Intel(R) C++ Compiler'`"
+        is_intel_icc2="`($CC -help 2>&1) | grep 'Intel(R) C++ Compiler'`"
+        is_intel_ecc="`($CC -V 2>&1) | perl -pi -e 's/applications\n/\1/g;' | grep 'Intel(R) C++ Itanium(TM) Compiler'`"
+       is_intel_icc="$is_intel_icc1$is_intel_icc2$is_intel_ecc"
+        if test "x$is_intel_icc" != "x" ; then
+         version5="`echo $is_intel_icc | grep 'Version 5'`"
+         version6="`echo $is_intel_icc | grep 'Version 6'`"
+         version7="`echo $is_intel_icc | grep 'Version 7'`"
+         version8="`echo $is_intel_icc | grep 'Version 8'`"
+          if test "x$version5" != "x" ; then
+            AC_MSG_RESULT(C compiler is Intel ICC 5)
+            CC_VERSION=intel_icc5
+          else if test "x$version6" != "x" ; then
+            AC_MSG_RESULT(C compiler is Intel ICC 6)
+            CC_VERSION=intel_icc6
+          else if test "x$version7" != "x" ; then
+            AC_MSG_RESULT(C compiler is Intel ICC 7)
+            CC_VERSION=intel_icc7
+          else if test "x$version8" != "x" ; then
+            AC_MSG_RESULT(C compiler is Intel ICC 8)
+            CC_VERSION=intel_icc8
+          else
+            AC_MSG_RESULT(C compiler is Intel ICC)
+            CC_VERSION=intel_icc
+          fi fi fi fi
+        else
+  
+          dnl Or DEC's cxx compiler?
+          is_dec_cxx="`($CC -V 2>&1) | grep 'Compaq C'`"
+          if test "x$is_dec_cxx" != "x" ; then
+            AC_MSG_RESULT(C compiler is Compaq cxx)
+            CC_VERSION=compaq_cxx
+          else
+  
+           dnl Sun Workshop?
+            is_sun_cc="`($CC -V 2>&1) | grep 'Sun WorkShop'`"
+            if test "x$is_sun_cc" != "x" ; then
+              AC_MSG_RESULT(C compiler is Sun Workshop compiler)
+              CC_VERSION=sun_workshop
+            else
+  
+             dnl Sun Forte?
+              is_sun_forte_cc="`($CC -V 2>&1) | grep 'Forte'`"
+              if test "x$is_sun_forte_cc" != "x" ; then
+                AC_MSG_RESULT(C compiler is Sun Forte compiler)
+                CC_VERSION=sun_forte
+              else
+  
+               dnl Portland Group C?
+               is_pgcc="`($CC -V 2>&1) | grep 'Portland Group'`"
+               if test "x$is_pgcc" != "x" ; then
+                 AC_MSG_RESULT(C compiler is Portland Group C)
+                 CC_VERSION=portland_group
+               else
+  
+                 dnl HP aCC?
+                 is_aCC="`($CC -V 2>&1) | grep 'aCC'`"
+                 if test "x$is_aCC" != "x" ; then
+                   AC_MSG_RESULT(C compiler is HP aCC)
+                   CC_VERSION=hp_aCC
+                 else
+  
+                   dnl Borland C
+                   is_bcc="`($CC -h 2>&1) | grep 'Borland'`"
+                   if test "x$is_bcc" != "x" ; then
+                     AC_MSG_RESULT(C compiler is Borland C)
+                     CC_VERSION=borland_bcc
+                   else
+  
+                     dnl KAI C? It seems as if the documented options
+                     dnl -V and --version are not always supported, so give
+                     dnl the whole thing a second try by looking for /KCC/
+                     dnl somewhere in the paths that are output by -v. This
+                     dnl is risky business, since this combination of
+                     dnl characters might appear on other installations
+                      dnl of other compilers as well, so put this test to
+                      dnl the very end of the detection chain for the
+                      dnl various compilers
+                     is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
+                     is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
+                     if test "x$is_kai_cc" != "x" ; then
+                       AC_MSG_RESULT(C compiler is KAI C)
+                       CC_VERSION=kai_cc
+                     else
+  
+                        dnl  Aw, nothing suitable found...
+                        AC_MSG_ERROR([Unrecognized compiler -- sorry])
+                        exit 1
+                      fi
+                    fi
+                  fi
+                fi
+              fi
+           fi
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+
+
+
+
+dnl -------------------------------------------------------------
+dnl Set C compiler flags to their default values. They will be 
+dnl modified according to other options in later steps of
+dnl configuration
+dnl
+dnl CFLAGS  : flags for optimized mode
+dnl
+dnl Usage: DEAL_II_SET_CC_FLAGS
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl
+[
+  dnl First the flags for gcc compilers
+  if test "$GCC" = yes ; then
+    CFLAGS="$CFLAGS -O3 -funroll-loops -funroll-all-loops -fstrict-aliasing"
+    dnl Set PIC flags. On some systems, -fpic/PIC is implied, so don't set
+    dnl anything to avoid a warning. on AIX make sure we always pass -lpthread
+    dnl because this seems to be somehow required to make things work. Likewise
+    dnl DEC OSF.
+    case "$target" in
+      *aix* )
+       CFLAGSPIC=
+       ;;
+
+      *dec-osf* )
+       CFLAGSPIC="-fPIC"
+       ;;
+
+      *)
+       CFLAGSPIC="-fPIC"
+       ;;
+    esac
+
+  else
+    dnl Non-gcc compilers. By default, use the C compiler also for linking
+    dnl shared libraries. If some compiler cannot do that and needs something
+    dnl different, then this must be specified in the respective section
+    dnl below, overriding this define:
+    SHLIBLD="$CC"
+  
+    case "$CC_VERSION" in
+      ibm_xlc)
+          CFLAGS="$CFLAGS -O2"
+          CFLAGSPIC="-fPIC"
+          ;;
+  
+      MIPSpro*)
+          CFLAGSO="$CFLAGS -O2"
+          CFLAGSPIC="-KPIC"
+          ;;
+  
+      intel_icc*)
+          CFLAGS="$CFLAGS -O2 -unroll"
+          CFLAGSPIC="-KPIC"
+
+          dnl To reduce output, use -opt_report_levelmin where possible,
+          dnl i.e. post icc5
+          if test "x$CC_VERSION" != "xintel_icc5" ; then
+            CFLAGS="$CFLAGS -opt_report_levelmin"
+          fi
+
+          CFLAGS="$CFLAGS -ansi_alias -vec_report0"
+       
+         dnl If we are on an x86 platform, add -tpp6 to optimization
+         dnl flags
+         case "$target" in
+           *86*)
+               CFLAGSO="$CFLAGS -tpp6"
+               ;;
+         esac
+          ;;
+
+      *)
+          AC_MSG_ERROR(No compiler options for this C compiler
+                       specified at present)
+          ;;
+    esac
+  fi
+])
+
+
+
 dnl -------------------------------------------------------------
 dnl Determine the F77 compiler in use. Return the name and possibly
 dnl version of this compiler in F77_VERSION.
index 3f1b1953d45ec04cd10dc336122e99c3c12f1e0c..d673c784064daa0d03b5abad1e48daa14c7f359c 100644 (file)
@@ -25,6 +25,8 @@ D                    = @DEAL2_DIR@
 CC                   = @CC@
 CXX                  = @CXX@
 GXX-VERSION          = @GXX_VERSION@
+CC                   = @CC@
+CC-VERSION           = @CC_VERSION@
 SHLIBLD              = @SHLIBLD@
 AR                   = @AR@
 RANLIB               = @RANLIB@
@@ -203,3 +205,7 @@ ifeq ($(USE_CONTRIB_PETSC),yes)
   CXXFLAGS.g += $(GCXX_PETSCFLAGS)
   CXXFLAGS.o += $(OCXX_PETSCFLAGS)
 endif
+
+
+# compile flags for C compiler
+CFLAGS = @CFLAGS@
index 0f12578f0aca9ce6eb01cd59b8451cafea210545..555b090219a0b86b999c88366e86fe4f8e072b32 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.169 .
+# From configure.in Revision: 1.171 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57.
 #
@@ -273,7 +273,7 @@ PACKAGE_BUGREPORT=
 
 ac_unique_file="deal.II"
 ac_subdirs_all="$ac_subdirs_all contrib tests"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_VERSION DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD LDFLAGSPIC enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared lib_suffix AR RANLIB ac_ct_RANLIB enablemultigrid TECPLOT_LIBRARY_PATH TECPLOT_INCLUDE_PATH USE_CONTRIB_HSL USE_CONTRIB_PETSC DEAL_II_PETSC_DIR DEAL_II_PETSC_ARCH DEAL_II_PETSC_VERSION_MAJOR DEAL_II_PETSC_VERSION_MINOR DEAL_II_PETSC_VERSION_SUBMINOR DEAL_II_DEFINE_DEAL_II_USE_PETSC USE_CONTRIB_METIS DEAL_II_METIS_DIR kdocdir kdocversion DOXYGEN DOT DEAL_II_HAVE_DOT PERL subdirs LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_VERSION DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD LDFLAGSPIC CC_VERSION enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared lib_suffix AR RANLIB ac_ct_RANLIB enablemultigrid TECPLOT_LIBRARY_PATH TECPLOT_INCLUDE_PATH USE_CONTRIB_HSL USE_CONTRIB_PETSC DEAL_II_PETSC_DIR DEAL_II_PETSC_ARCH DEAL_II_PETSC_VERSION_MAJOR DEAL_II_PETSC_VERSION_MINOR DEAL_II_PETSC_VERSION_SUBMINOR DEAL_II_DEFINE_DEAL_II_USE_PETSC USE_CONTRIB_METIS DEAL_II_METIS_DIR kdocdir kdocversion DOXYGEN DOT DEAL_II_HAVE_DOT PERL subdirs LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -1413,6 +1413,7 @@ echo "${ECHO_T}" >&6
 echo "$as_me:$LINENO: result: ---------------- configuring C/C++ compilers ----------------" >&5
 echo "${ECHO_T}---------------- configuring C/C++ compilers ----------------" >&6
 
+OLDCFLAGS=$CFLAGS
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2281,6 +2282,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
+CFLAGS=$OLDCFLAGS
 # Extract the first word of "$CC", so it can be a program name with args.
 set dummy $CC; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3345,6 +3347,285 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 
 
+  if test "$GCC" = "yes" ; then
+    CC_VERSION_STRING=`($CC -v 2>&1) | grep "gcc version"`
+    if test "x$CC_VERSION_STRING" = "x" ; then
+      GC=no
+    fi
+  fi
+
+  if test "$GCC" = yes ; then
+        CC_VERSION_STRING=`($CC -v 2>&1) | grep "gcc version"`
+    case "$CC_VERSION_STRING" in
+      *"egcs-1.1"*)
+       echo "$as_me:$LINENO: result: C compiler is egcs-1.1" >&5
+echo "${ECHO_T}C compiler is egcs-1.1" >&6
+       CC_VERSION=egcs1.1
+       ;;
+      *2.95*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-2.95" >&5
+echo "${ECHO_T}C compiler is gcc-2.95" >&6
+       CC_VERSION=gcc2.95
+       ;;
+      *2.96*)
+       { { echo "$as_me:$LINENO: error: C compiler reports faulty gcc 2.96. Please install a new compiler" >&5
+echo "$as_me: error: C compiler reports faulty gcc 2.96. Please install a new compiler" >&2;}
+   { (exit 1); exit 1; }; }
+       CC_VERSION=gcc2.96
+       ;;
+      *2.97*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-2.97" >&5
+echo "${ECHO_T}C compiler is gcc-2.97" >&6
+       CC_VERSION=gcc2.97
+       ;;
+      *version\ 3.0*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.0" >&5
+echo "${ECHO_T}C compiler is gcc-3.0" >&6
+       CC_VERSION=gcc3.0
+       ;;
+      *version\ 3.1*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.1" >&5
+echo "${ECHO_T}C compiler is gcc-3.1" >&6
+       CC_VERSION=gcc3.1
+       ;;
+      *version\ 3.2*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.2" >&5
+echo "${ECHO_T}C compiler is gcc-3.2" >&6
+       CC_VERSION=gcc3.2
+       ;;
+      *version\ 3.3*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.3" >&5
+echo "${ECHO_T}C compiler is gcc-3.3" >&6
+       CC_VERSION=gcc3.3
+       ;;
+      *version\ 3.4*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.4" >&5
+echo "${ECHO_T}C compiler is gcc-3.4" >&6
+       CC_VERSION=gcc3.4
+       ;;
+      *version\ 3.5*)
+       echo "$as_me:$LINENO: result: C compiler is gcc-3.5" >&5
+echo "${ECHO_T}C compiler is gcc-3.5" >&6
+       CC_VERSION=gcc3.5
+       ;;
+      *2.4* | *2.5* | *2.6* | *2.7* | *2.8*)
+       echo "$as_me:$LINENO: result: C compiler is $CC_VERSION_STRING" >&5
+echo "${ECHO_T}C compiler is $CC_VERSION_STRING" >&6
+       { { echo "$as_me:$LINENO: error: C compiler is not supported" >&5
+echo "$as_me: error: C compiler is not supported" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+      *)
+       echo "$as_me:$LINENO: result: C compiler is unknown but accepted gcc version" >&5
+echo "${ECHO_T}C compiler is unknown but accepted gcc version" >&6
+       CC_VERSION=gcc-other
+       ;;
+    esac
+  else
+
+                    is_ibm_xlc="`($CC 2>&1) | egrep 'VisualAge C|C Set ++|C for AIX Compiler'`"
+    if test "x$is_ibm_xlc" != "x"  ; then
+                        echo "$as_me:$LINENO: result: C compiler is IBM xlC" >&5
+echo "${ECHO_T}C compiler is IBM xlC" >&6
+      CC_VERSION=ibm_xlc
+    else
+
+            mips_pro="`($CC -version 2>&1) | grep MIPSpro`"
+      if test "x$mips_pro" != "x" ; then
+        case "$mips_pro" in
+          *7.0* | *7.1* | *7.2* | *7.3*)
+                                    echo "$as_me:$LINENO: result: C compiler is $mips_pro" >&5
+echo "${ECHO_T}C compiler is $mips_pro" >&6
+            { { echo "$as_me:$LINENO: error: This compiler is not supported" >&5
+echo "$as_me: error: This compiler is not supported" >&2;}
+   { (exit 1); exit 1; }; }
+            CC_VERSION=MIPSpro7.3
+            ;;
+          *7.4)
+            echo "$as_me:$LINENO: result: C compiler is MIPSpro compiler 7.4" >&5
+echo "${ECHO_T}C compiler is MIPSpro compiler 7.4" >&6
+            { { echo "$as_me:$LINENO: error: This compiler is not supported. Use MIPSPro compiler 7.4x" >&5
+echo "$as_me: error: This compiler is not supported. Use MIPSPro compiler 7.4x" >&2;}
+   { (exit 1); exit 1; }; }
+            CC_VERSION=MIPSpro7.4
+            ;;
+          *7.41* | *7.42* | *7.43* | *7.44*)
+            echo "$as_me:$LINENO: result: C compiler is MIPSpro compiler 7.4x" >&5
+echo "${ECHO_T}C compiler is MIPSpro compiler 7.4x" >&6
+            CC_VERSION=MIPSpro7.4x
+            ;;
+          *"7.5"*)
+            echo "$as_me:$LINENO: result: C compiler is MIPSpro compiler 7.5" >&5
+echo "${ECHO_T}C compiler is MIPSpro compiler 7.5" >&6
+            CC_VERSION=MIPSpro7.5
+            ;;
+          *)
+            echo "$as_me:$LINENO: result: C compiler is unknown version but accepted MIPSpro compiler version" >&5
+echo "${ECHO_T}C compiler is unknown version but accepted MIPSpro compiler version" >&6
+            CC_VERSION=MIPSpro-other
+            ;;
+        esac
+      else
+
+                                                               is_intel_icc1="`($CC -V 2>&1) | grep 'Intel(R) C++ Compiler'`"
+        is_intel_icc2="`($CC -help 2>&1) | grep 'Intel(R) C++ Compiler'`"
+        is_intel_ecc="`($CC -V 2>&1) | perl -pi -e 's/applications\n/\1/g;' | grep 'Intel(R) C++ Itanium(TM) Compiler'`"
+       is_intel_icc="$is_intel_icc1$is_intel_icc2$is_intel_ecc"
+        if test "x$is_intel_icc" != "x" ; then
+         version5="`echo $is_intel_icc | grep 'Version 5'`"
+         version6="`echo $is_intel_icc | grep 'Version 6'`"
+         version7="`echo $is_intel_icc | grep 'Version 7'`"
+         version8="`echo $is_intel_icc | grep 'Version 8'`"
+          if test "x$version5" != "x" ; then
+            echo "$as_me:$LINENO: result: C compiler is Intel ICC 5" >&5
+echo "${ECHO_T}C compiler is Intel ICC 5" >&6
+            CC_VERSION=intel_icc5
+          else if test "x$version6" != "x" ; then
+            echo "$as_me:$LINENO: result: C compiler is Intel ICC 6" >&5
+echo "${ECHO_T}C compiler is Intel ICC 6" >&6
+            CC_VERSION=intel_icc6
+          else if test "x$version7" != "x" ; then
+            echo "$as_me:$LINENO: result: C compiler is Intel ICC 7" >&5
+echo "${ECHO_T}C compiler is Intel ICC 7" >&6
+            CC_VERSION=intel_icc7
+          else if test "x$version8" != "x" ; then
+            echo "$as_me:$LINENO: result: C compiler is Intel ICC 8" >&5
+echo "${ECHO_T}C compiler is Intel ICC 8" >&6
+            CC_VERSION=intel_icc8
+          else
+            echo "$as_me:$LINENO: result: C compiler is Intel ICC" >&5
+echo "${ECHO_T}C compiler is Intel ICC" >&6
+            CC_VERSION=intel_icc
+          fi fi fi fi
+        else
+
+                    is_dec_cxx="`($CC -V 2>&1) | grep 'Compaq C'`"
+          if test "x$is_dec_cxx" != "x" ; then
+            echo "$as_me:$LINENO: result: C compiler is Compaq cxx" >&5
+echo "${ECHO_T}C compiler is Compaq cxx" >&6
+            CC_VERSION=compaq_cxx
+          else
+
+                       is_sun_cc="`($CC -V 2>&1) | grep 'Sun WorkShop'`"
+            if test "x$is_sun_cc" != "x" ; then
+              echo "$as_me:$LINENO: result: C compiler is Sun Workshop compiler" >&5
+echo "${ECHO_T}C compiler is Sun Workshop compiler" >&6
+              CC_VERSION=sun_workshop
+            else
+
+                           is_sun_forte_cc="`($CC -V 2>&1) | grep 'Forte'`"
+              if test "x$is_sun_forte_cc" != "x" ; then
+                echo "$as_me:$LINENO: result: C compiler is Sun Forte compiler" >&5
+echo "${ECHO_T}C compiler is Sun Forte compiler" >&6
+                CC_VERSION=sun_forte
+              else
+
+                               is_pgcc="`($CC -V 2>&1) | grep 'Portland Group'`"
+               if test "x$is_pgcc" != "x" ; then
+                 echo "$as_me:$LINENO: result: C compiler is Portland Group C" >&5
+echo "${ECHO_T}C compiler is Portland Group C" >&6
+                 CC_VERSION=portland_group
+               else
+
+                                 is_aCC="`($CC -V 2>&1) | grep 'aCC'`"
+                 if test "x$is_aCC" != "x" ; then
+                   echo "$as_me:$LINENO: result: C compiler is HP aCC" >&5
+echo "${ECHO_T}C compiler is HP aCC" >&6
+                   CC_VERSION=hp_aCC
+                 else
+
+                                   is_bcc="`($CC -h 2>&1) | grep 'Borland'`"
+                   if test "x$is_bcc" != "x" ; then
+                     echo "$as_me:$LINENO: result: C compiler is Borland C" >&5
+echo "${ECHO_T}C compiler is Borland C" >&6
+                     CC_VERSION=borland_bcc
+                   else
+
+                                                                                                                                                                                             is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
+                     is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
+                     if test "x$is_kai_cc" != "x" ; then
+                       echo "$as_me:$LINENO: result: C compiler is KAI C" >&5
+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
+                      fi
+                    fi
+                  fi
+                fi
+              fi
+           fi
+          fi
+        fi
+      fi
+    fi
+  fi
+
+
+    if test "$GCC" = yes ; then
+    CFLAGS="$CFLAGS -O3 -funroll-loops -funroll-all-loops -fstrict-aliasing"
+                    case "$target" in
+      *aix* )
+       CFLAGSPIC=
+       ;;
+
+      *dec-osf* )
+       CFLAGSPIC="-fPIC"
+       ;;
+
+      *)
+       CFLAGSPIC="-fPIC"
+       ;;
+    esac
+
+  else
+                    SHLIBLD="$CC"
+
+    case "$CC_VERSION" in
+      ibm_xlc)
+          CFLAGS="$CFLAGS -O2"
+          CFLAGSPIC="-fPIC"
+          ;;
+
+      MIPSpro*)
+          CFLAGSO="$CFLAGS -O2"
+          CFLAGSPIC="-KPIC"
+          ;;
+
+      intel_icc*)
+          CFLAGS="$CFLAGS -O2 -unroll"
+          CFLAGSPIC="-KPIC"
+
+                              if test "x$CC_VERSION" != "xintel_icc5" ; then
+            CFLAGS="$CFLAGS -opt_report_levelmin"
+          fi
+
+          CFLAGS="$CFLAGS -ansi_alias -vec_report0"
+
+                         case "$target" in
+           *86*)
+               CFLAGSO="$CFLAGS -tpp6"
+               ;;
+         esac
+          ;;
+
+      *)
+          { { 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; }; }
+          ;;
+    esac
+  fi
+
+
+
+
 
 
 
@@ -9049,6 +9330,7 @@ s,@CXXFLAGSO@,$CXXFLAGSO,;t t
 s,@CXXFLAGSPIC@,$CXXFLAGSPIC,;t t
 s,@SHLIBLD@,$SHLIBLD,;t t
 s,@LDFLAGSPIC@,$LDFLAGSPIC,;t t
+s,@CC_VERSION@,$CC_VERSION,;t t
 s,@enablemultithreading@,$enablemultithreading,;t t
 s,@withmultithreading@,$withmultithreading,;t t
 s,@F77@,$F77,;t t
index d6c82a2159902cbb7c64ba07240a8c58cc15434e..3e23f000001d7772ae2d12e9a9eedf1c78ae2673 100644 (file)
@@ -98,7 +98,9 @@ dnl
 dnl Note that on MIPS systems, the AC_PROG_CXX call erroneously sets
 dnl -g in CXXFLAGS, which is not exactly what we want, so we store
 dnl the old value temporarily
+OLDCFLAGS=$CFLAGS
 AC_PROG_CC
+CFLAGS=$OLDCFLAGS
 AC_PATH_PROG(CC,$CC)
 
 OLDCXXFLAGS="$CXXFLAGS"
@@ -125,6 +127,14 @@ AC_SUBST(LDFLAGSPIC)
 AC_SUBST(OBJEXT)
 AC_SUBST(EXEEXT)
 
+dnl Do the same for the C compiler. we only use the C compiler for third-party
+dnl code and only for things we optimize, so no need to determine debug flags
+dnl and similar things
+DEAL_II_DETERMINE_CC_BRAND
+DEAL_II_SET_CC_FLAGS
+
+AC_SUBST(CC_VERSION)
+AC_SUBST(CFLAGS)
 
 
 
index d425616b4b7b8947bbc227dbf82045bfe268a992..55a39865abab9f92dabba1abd192ce62268df3ac 100644 (file)
@@ -13,8 +13,9 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
        @echo '<li><code>D=$D</code>' >> $@
        @echo '<li><code>CXX=$(CXX)</code>' >> $@
        @echo '<li><code>CC=$(CC)</code>' >> $@
-       @echo '<li><code>GXX-VERSION=$(GXX-VERSION)</code>' >> $@
        @echo '<li><code>F77=$(F77)</code>' >> $@
+       @echo '<li><code>GXX-VERSION=$(GXX-VERSION)</code>' >> $@
+       @echo '<li><code>CC-VERSION=$(CC-VERSION)</code>' >> $@
        @echo '<li><code>F77-VERSION=$(F77-VERSION)</code>' >> $@
        @echo '<li><code>SHLIBLD=$(SHLIBLD)</code>' >> $@
        @echo '<li><code>OBJEXT=$(OBJEXT)</code>' >> $@
@@ -58,6 +59,7 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
        @echo '<li><code>INCLUDE=$(INCLUDE)</code>' >> $@
        @echo '<li><code>CXXFLAGS.g=$(CXXFLAGS.g)</code>' >> $@
        @echo '<li><code>CXXFLAGS.o=$(CXXFLAGS.o)</code>' >> $@
+       @echo '<li><code>CFLAGS=$(CFLAGS)</code>' >> $@
        @echo '<li><code>F77FLAGS.g=$(F77FLAGS.g)</code>' >> $@
        @echo '<li><code>F77FLAGS.o=$(F77FLAGS.o)</code>' >> $@
        @echo '<li><code>LDFLAGS=$(LDFLAGS)</code>' >> $@
index c85f5cbd29d0558312fe031d3e34e79121f2dbb7..e8d23dac48de6cfebcb8f020cc27e385f50a1d01 100644 (file)
           names presently include <code>egcs1.1</code>,
           <code>gcc2.95</code>, <code>gcc2.96</code>,
            <code>gcc2.97</code>, <code>gcc3.0</code>,
+           <code>gcc3.1</code>, <code>gcc3.2</code>,
+           <code>gcc3.3</code>, <code>gcc3.4</code>,
+           <code>gcc3.5</code>,
            <code>ibm_xlc</code>, <code>MIPSpro</code>,
           <code>sun_workshop</code>, <code>sun_forte</code>,
            <code>intel_icc5</code>, <code>intel_icc6</code>, 
-           <code>intel_icc7</code>, <code>compaq_cxx</code>. Not all of
+           <code>intel_icc7</code>, <code>compaq_cxx</code>, and
+           probably a few more as well. Not all of
            these compilers are actually supported (see the 
            <a href="../readme.html" target="body">ReadMe file</a> for a
            list of supported compilers and platforms), it is only a list of
       </dd>
 
 
+      <dt> <code>CC-VERSION</code> </dt>
+      <dd> <p>
+           Name and version of the CC compiler. Possible names are
+           similar to the ones listed above.
+           </p>
+      </dd>
+
+
       <dt> <code>F77</code> </dt>
       <dd> <p>
            Executable name of the F77 compiler; often, no Fortran
            </p>
       </dd>
 
+      <dt> <code>CCFLAGS</code> </dt>
+      <dd> <p>
+           C compiler flags. Since we only compiler C code for
+           third-party libraries for which we assume that they and our
+           interfaces to them are bug free, these flags are always for
+           optimized mode.
+           </p>
+      </dd>
+
+
       <dt> <code>F77FLAGS.g</code> </dt>
       <dd> <p>
            Fortran 77 compiler flags for debug mode

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.