/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1677 by jpye, Thu Nov 29 23:28:51 2007 UTC revision 1678 by jpye, Wed Dec 19 00:29:48 2007 UTC
# Line 633  opts.Add(BoolOption( Line 633  opts.Add(BoolOption(
633    
634  #------ f --------  #------ f --------
635  opts.Add(PackageOption(  opts.Add(PackageOption(
636      'MFGRAPH_PREFIX'      'GRAPHVIZ_PREFIX'
637      ,"Where are your MFGRAPH files?"      ,"Where are your GRAPHVIZ files?"
638      ,default_prefix      ,default_prefix
639  ))  ))
640    
641  opts.Add(PackageOption(  opts.Add(PackageOption(
642      'MFGRAPH_CPPPATH'      'GRAPHVIZ_CPPPATH'
643      ,"Where are your MFGRAPH include files?"      ,"Where are your GRAPHVIZ include files?"
644      ,default_cpppath      ,default_cpppath
645  ))  ))
646    
647  opts.Add(PackageOption(  opts.Add(PackageOption(
648      'MFGRAPH_LIBPATH'      'GRAPHVIZ_LIBPATH'
649      ,"Where are your MFGRAPH libraries?"      ,"Where are your GRAPHVIZ libraries?"
650      ,default_libpath      ,default_libpath
651  ))  ))
652    
653    opts.Add(
654        'GRAPHVIZ_LIBS'
655        ,"What are your GRAPHVIZ libraries named?"
656        ,['gvc','graph','cdt']
657    )
658    
659  opts.Add(BoolOption(  opts.Add(BoolOption(
660      'WITH_MFGRAPH'      'WITH_GRAPHVIZ'
661      ,"Link to the MFGRAPH library (if available, for generating incidence graphs)"      ,"Link to the GRAPHVIZ library (if available, for generating incidence graphs)"
662      ,True      ,True
663  ))  ))
664    
# Line 827  without_scrollkeeper_reason = "disabled Line 833  without_scrollkeeper_reason = "disabled
833  with_dmalloc = env.get('WITH_DMALLOC')  with_dmalloc = env.get('WITH_DMALLOC')
834  without_dmalloc_reason = "disabled by options/config.py"  without_dmalloc_reason = "disabled by options/config.py"
835    
836  with_mfgraph = env.get('WITH_MFGRAPH')  with_graphviz = env.get('WITH_GRAPHVIZ')
837  without_mfgraph_reason = "disabled by options/config.py"  without_graphiviz_reason = "disabled by options/config.py"
838    
839  with_ufsparse = env.get('WITH_UFSPARSE')  with_ufsparse = env.get('WITH_UFSPARSE')
840  without_ufsparse_reason = "disabled by options/config.py"  without_ufsparse_reason = "disabled by options/config.py"
# Line 1099  def CheckExtLib(context,libname,text,ext Line 1105  def CheckExtLib(context,libname,text,ext
1105      #print "LIBS is currently:",context.env.get('LIBS')      #print "LIBS is currently:",context.env.get('LIBS')
1106      keep = KeepContext(context,varprefix,static)      keep = KeepContext(context,varprefix,static)
1107    
1108      if not context.env.has_key(varprefix+'_LIB'):      if not context.env.has_key(varprefix+'_LIB') and not context.env.has_key(varprefix+'_LIBS'):
1109          # if varprefix_LIB were in env, KeepContext would          # if varprefix_LIB were in env, KeepContext would
1110          # have appended it already          # have appended it already
1111          context.env.Append(LIBS=[libname])          context.env.Append(LIBS=[libname])
# Line 1262  def CheckDMalloc(context): Line 1268  def CheckDMalloc(context):
1268      return CheckExtLib(context,'dmalloc',dmalloc_test_text)      return CheckExtLib(context,'dmalloc',dmalloc_test_text)
1269    
1270  #----------------  #----------------
1271  # mfgraph test  # graphviz test
1272    
1273  mfgraph_test_text = """  graphviz_test_text = """
1274  #include <mfgraph/mfg_draw_graph.h>  #include <graphviz/gvc.h>
1275  int main(void){  int main(void){
1276      using namespace mfg;      Agraph_t *g;
1277      DrawGraph g;      GVC_t *gvc;
1278        gvc = gvContext();
1279        g = agopen("g", AGDIGRAPH);
1280      return 0;      return 0;
1281  }  }
1282  """  """
1283    
1284  def CheckMFGraph(context):  def CheckGraphViz(context):
1285      return CheckExtLib(context,'mfgraph',mfgraph_test_text,ext=".cpp")      return CheckExtLib(context,'graphviz',graphviz_test_text,ext=".c")
1286    
1287  #----------------  #----------------
1288  # ufsparse test  # ufsparse test
# Line 1888  conf = Configure(env Line 1896  conf = Configure(env
1896          , 'CheckDMalloc' : CheckDMalloc          , 'CheckDMalloc' : CheckDMalloc
1897          , 'CheckLyx' : CheckLyx          , 'CheckLyx' : CheckLyx
1898          , 'CheckLatex2HTML' : CheckLatex2HTML          , 'CheckLatex2HTML' : CheckLatex2HTML
1899          , 'CheckMFGraph' : CheckMFGraph          , 'CheckGraphViz' : CheckGraphViz
1900          , 'CheckUFSparse' : CheckUFSparse          , 'CheckUFSparse' : CheckUFSparse
1901          , 'CheckTcl' : CheckTcl          , 'CheckTcl' : CheckTcl
1902          , 'CheckTclVersion' : CheckTclVersion          , 'CheckTclVersion' : CheckTclVersion
# Line 1967  if conf.CheckFunc('snprintf') is False: Line 1975  if conf.CheckFunc('snprintf') is False:
1975      print "Didn't find snprintf";      print "Didn't find snprintf";
1976      exit(1)      exit(1)
1977    
1978    if conf.CheckFunc('strdup'):
1979        conf.env['HAVE_STRDUP'] = True
1980    
1981  # Math library  # Math library
1982    
1983  conf.env['HAVE_IEEE']=True  conf.env['HAVE_IEEE']=True
# Line 2094  if with_dmalloc: Line 2105  if with_dmalloc:
2105          without_dmalloc_reason = 'dmalloc not found'          without_dmalloc_reason = 'dmalloc not found'
2106          with_dmalloc = False          with_dmalloc = False
2107    
2108  # MFGRAPH  # GRAPHVIZ
2109    
2110  if with_mfgraph:  if with_graphviz:
2111      if not conf.CheckMFGraph():      if not conf.CheckGraphViz():
2112          without_mfgraph_reason = 'mfgraph not found'          without_graphviz_reason = 'graphviz not found'
2113          with_mfgraph = False          with_graphviz = False
2114          env['WITH_MFGRAPH'] = False          env['WITH_GRAPHVIZ'] = False
2115    
2116  # UFSPARSE  # UFSPARSE
2117    
2118  if with_ufsparse:  if with_ufsparse:
2119      if not conf.CheckUFSparse():      if not conf.CheckUFSparse():
2120          without_ufsparse_reason = 'mfgraph not found'          without_ufsparse_reason = 'ufsparse not found'
2121          with_ufsparse = False          with_ufsparse = False
2122          env['WITH_UFSPARSE'] = False          env['WITH_UFSPARSE'] = False
2123    
# Line 2290  if env.get('WITH_DOC'): Line 2301  if env.get('WITH_DOC'):
2301  for k,v in {  for k,v in {
2302          'ASC_WITH_IDA':with_ida          'ASC_WITH_IDA':with_ida
2303          ,'ASC_WITH_DMALLOC':with_dmalloc          ,'ASC_WITH_DMALLOC':with_dmalloc
2304          ,'ASC_WITH_MFGRAPH':with_mfgraph          ,'ASC_WITH_GRAPHVIZ':with_graphviz
2305          ,'ASC_WITH_UFSPARSE':with_ufsparse          ,'ASC_WITH_UFSPARSE':with_ufsparse
2306          ,'ASC_WITH_CONOPT':with_conopt          ,'ASC_WITH_CONOPT':with_conopt
2307          ,'ASC_LINKED_CONOPT':env.get('CONOPT_LINKED')          ,'ASC_LINKED_CONOPT':env.get('CONOPT_LINKED')

Legend:
Removed from v.1677  
changed lines
  Added in v.1678

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