/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2036 by ballan, Mon May 18 15:03:16 2009 UTC revision 2037 by jpye, Tue May 19 07:46:53 2009 UTC
# Line 2133  if conf.CheckHeader('stdio.h') is False: Line 2133  if conf.CheckHeader('stdio.h') is False:
2133          print "%-30s%s" % ("%s :" % k, v)          print "%-30s%s" % ("%s :" % k, v)
2134      Exit(1)      Exit(1)
2135    
2136  vpsize = conf.CheckTypeSize('void *')  # sizes of vars used in libascend eg in gl_list etc.
 if vpsize != 0:  
     conf.env.Append(CPPDEFINES=[('SIZEOF_VOID_P',str(vpsize) )])  
 else:  
     print "Didn't find sizeof(void*)";  
     exit(1)  
2137    
2138  isize = conf.CheckTypeSize('int')  _sizes = {
2139  if isize != 0:      "VOID_P" : "void *"
2140      conf.env.Append(CPPDEFINES=[('SIZEOF_INT',str(isize) )])      ,"INT" : "int"
2141  else:      ,"LONG" : "long"
2142      print "Didn't find sizeof(int)";      ,"LONG_LONG" : "long long"
2143      exit(1)  }
2144    
2145  lsize = conf.CheckTypeSize('long')  for _var,_type in _sizes.iteritems():
2146  if lsize != 0:      _size = conf.CheckTypeSize(_type)
2147      conf.env.Append(CPPDEFINES=[('SIZEOF_LONG',str(lsize) )])      if not _size:
2148  else:          print "Couldn't determine 'sizeof(%s)'" % _type
2149      print "Didn't find sizeof(long)";          Exit(1)
2150      exit(1)      conf.env["SIZEOF_%s" % _var] = str(_size)
2151    
2152  llsize = conf.CheckTypeSize('long long')  # check for some string functions
 if llsize != 0:  
     conf.env.Append(CPPDEFINES=[('SIZEOF_LONG_LONG',str(llsize) )])  
 else:  
     print "Didn't find sizeof(long long)";  
     exit(1)  
2153    
2154  if conf.CheckFunc('snprintf') is False:  if conf.CheckFunc('snprintf') is False:
2155      print "Didn't find snprintf";      print "Didn't find snprintf";
2156      exit(1)      Exit(1)
2157    
2158  if conf.CheckFunc('strdup'):  if conf.CheckFunc('strdup'):
2159      conf.env['HAVE_STRDUP'] = True      conf.env['HAVE_STRDUP'] = True
2160    
2161    # attempt to support MSVCRT 7.1 on Windows
2162    
2163  if platform.system()=="Windows" and env.get('WITH_MSVCR71'):  if platform.system()=="Windows" and env.get('WITH_MSVCR71'):
2164      conf.env.Append(LIBS='msvcr71')      conf.env.Append(LIBS='msvcr71')
2165            
# Line 2522  subst_dict = { Line 2514  subst_dict = {
2514      , '@ASC_TK_REL_DIST@' : default_tk_rel_dist      , '@ASC_TK_REL_DIST@' : default_tk_rel_dist
2515      , '@ASC_LIBRARY_REL_DIST@' : default_library_rel_dist      , '@ASC_LIBRARY_REL_DIST@' : default_library_rel_dist
2516      , '@ASC_SOLVERS_REL_DIST@' : default_solvers_rel_dist      , '@ASC_SOLVERS_REL_DIST@' : default_solvers_rel_dist
2517        , '@SIZEOF_VOID_P@' : env['SIZEOF_VOID_P']
2518        , '@SIZEOF_INT@' : env['SIZEOF_INT']
2519        , '@SIZEOF_LONG@' : env['SIZEOF_LONG']
2520        , '@SIZEOF_LONG_LONG@' : env['SIZEOF_LONG_LONG']
2521  }  }
2522    
2523  if env.get('WITH_DOC'):  if env.get('WITH_DOC'):

Legend:
Removed from v.2036  
changed lines
  Added in v.2037

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