/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1447 by jpye, Sat May 26 09:00:53 2007 UTC revision 1448 by jpye, Sun May 27 02:36:49 2007 UTC
# Line 775  print "INSTALL_PREFIX =",env['INSTALL_PR Line 775  print "INSTALL_PREFIX =",env['INSTALL_PR
775  need_fortran = False  need_fortran = False
776    
777  #----------------  #----------------
778    # CC
779    
780    cc_test_text = """
781    int main(void){
782        return 0;
783    }
784    """;
785    
786    def CheckCC(context):
787        context.Message("Checking C compiler ('%s')... " % context.env.get('CC'))
788        is_ok = context.TryCompile(cc_test_text,".c")
789        context.Result(is_ok)
790        return is_ok
791    
792    #----------------
793    # CXX
794    
795    cxx_test_text = """
796    template<class X>
797    class pair{
798    public:
799        X a;
800        X b;
801    };
802    
803    int main(void){
804        pair<double> P;
805        P.a = 0;
806        return 0;
807    }
808    """;
809    
810    def CheckCXX(context):
811        context.Message("Checking C++ compiler ('%s')... " % context.env.get('CXX'))
812        is_ok = context.TryCompile(cc_test_text,".cpp")
813        context.Result(is_ok)
814        return is_ok
815    
816        
817    
818    #----------------
819  # SWIG  # SWIG
820    
821  import os,re  import os,re
# Line 1589  gcc_version4 = False Line 1630  gcc_version4 = False
1630    
1631  conf = Configure(env  conf = Configure(env
1632      , custom_tests = {      , custom_tests = {
1633          'CheckMath' : CheckMath          'CheckCC' : CheckCC
1634            , 'CheckCXX' : CheckCXX
1635            , 'CheckMath' : CheckMath
1636          , 'CheckSwigVersion' : CheckSwigVersion          , 'CheckSwigVersion' : CheckSwigVersion
1637          , 'CheckPythonLib' : CheckPythonLib          , 'CheckPythonLib' : CheckPythonLib
1638          , 'CheckCUnit' : CheckCUnit          , 'CheckCUnit' : CheckCUnit
# Line 1646  if not sconsversioncheck(): Line 1689  if not sconsversioncheck():
1689      print "want to *force* SCons to continue."      print "want to *force* SCons to continue."
1690      Exit(1)      Exit(1)
1691    
1692    # check C compiler
1693    
1694    if not conf.CheckCC():
1695        print "Failed to build simple test file with your C compiler."
1696        print "Check your compiler is installed and running correctly."
1697        Exit(1)
1698    
1699    if not conf.CheckCXX():
1700        print "Failed to build simple test file with your C++ compiler."
1701        print "Check your compiler is installed and running correctly."
1702        Exit(1)
1703    
1704  # stdio -- just to check that compiler is behaving  # stdio -- just to check that compiler is behaving
1705    
1706  if not conf.CheckHeader('stdio.h'):  if not conf.CheckHeader('stdio.h'):

Legend:
Removed from v.1447  
changed lines
  Added in v.1448

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22