Description: build fixes needed for GNU gcc/gfortran
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2011-12-09
Forwarded: no

--- boxlib-1.0.orig/CCSEApps/mk/Make.defs
+++ boxlib-1.0/CCSEApps/mk/Make.defs
@@ -112,11 +112,11 @@ ifndef DIM
 endif
 
 ifndef COMP
-  COMP	= CC
+  COMP	= cc
 endif
 
 ifndef FCOMP
-  FCOMP  = f77
+  FCOMP  = gfortran
 endif
 
 ifndef USE_THREADS
@@ -134,8 +134,8 @@ endif
 #
 # Set some reasonable defaults.
 #
-CXX = CC
-FC  = f77
+CXX = c++
+FC  = gfortran
 CC  = cc
 #
 # Defaults for BoxLib style programs.
--- boxlib-1.0.orig/CCSEApps/BoxLib/GNUmakefile
+++ boxlib-1.0/CCSEApps/BoxLib/GNUmakefile
@@ -9,10 +9,12 @@ TOP = $(PBOXLIB_HOME)
 PRECISION = DOUBLE
 DEBUG     = TRUE
 DIM       = 3
-COMP      = KCC
-USE_MPI   = TRUE
+COMP      = gcc
+USE_MPI   = FALSE
 #NAMESPACE = TRUE
 NAMESPACE = FALSE
+CC	= gcc
+fC	= gfortran
 
 #
 # The base name of the library we're building.
--- boxlib-1.0.orig/CCSEApps/BoxLib/VisMF.cpp
+++ boxlib-1.0/CCSEApps/BoxLib/VisMF.cpp
@@ -343,7 +343,7 @@ VisMF::BaseName (const std::string& file
 {
     BL_ASSERT(filename[filename.length() - 1] != '/');
 
-    if (char* slash = strrchr(filename.c_str(), '/'))
+    if (const char* slash = strrchr(filename.c_str(), '/'))
     {
         //
         // Got at least one slash -- give'm the following tail.
@@ -368,7 +368,7 @@ VisMF::DirName (const std::string& filen
 
     const char* str = filename.c_str();    
 
-    if (char* slash = strrchr(str, '/'))
+    if (const char* slash = strrchr(str, '/'))
     {
         //
         // Got at least one slash -- give'm the dirname including last slash.
--- boxlib-1.0.orig/CCSEApps/BoxLib/std/limits
+++ boxlib-1.0/CCSEApps/BoxLib/std/limits
@@ -23,7 +23,7 @@
 
 #include <limits.h>
 #include <float.h>
-#include <stl_config.h>
+// #include <stl_config.h>
 
 __STL_BEGIN_NAMESPACE
 
