/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 937 by johnpye, Fri Nov 24 00:37:11 2006 UTC revision 938 by johnpye, Fri Nov 24 06:09:46 2006 UTC
# Line 35  if platform.system()=="Windows": Line 35  if platform.system()=="Windows":
35      default_conopt_lib="conopt3"      default_conopt_lib="conopt3"
36      default_conopt_envvar="CONOPT_PATH"      default_conopt_envvar="CONOPT_PATH"
37    
38      default_cunit_prefix="c:\\MinGW"      default_prefix="c:\\MinGW"
39      default_cunit_libpath="$CUNIT_PREFIX\\lib"      default_libpath="$DEFAULT_PREFIX\\lib"
40      default_cunit_cpppath="$CUNIT_PREFIX\\include"      default_cpppath="$DEFAULT_PREFIX\\include"
41            
42      if not os.path.exists(default_conopt_prefix):      if not os.path.exists(default_conopt_prefix):
43          default_conopt_prefix = None          default_conopt_prefix = None
# Line 61  else: Line 61  else:
61      default_conopt_cpppath="$CONOPT_PREFIX/include"      default_conopt_cpppath="$CONOPT_PREFIX/include"
62      default_conopt_lib="consub3"      default_conopt_lib="consub3"
63      default_conopt_envvar="CONOPT_PATH"      default_conopt_envvar="CONOPT_PATH"
64      default_cunit_prefix="/usr"  
65      default_cunit_libpath="$CUNIT_PREFIX/lib"      default_prefix="/usr"
66      default_cunit_cpppath="$CUNIT_PREFIX/include"      default_libpath="$DEFAULT_PREFIX/lib"
67        default_cpppath="$DEFAULT_PREFIX/include"
68    
69      need_libm = True      need_libm = True
70      if not os.path.isdir(default_tcl):      if not os.path.isdir(default_tcl):
# Line 172  opts.Add(BoolOption( Line 173  opts.Add(BoolOption(
173      ,True      ,True
174  ))  ))
175    
176    #----- default paths -----
177    opts.Add(PackageOption(
178        'DEFAULT_PREFIX'
179        ,"Where are most of the shared libraries located on your system?"
180        ,default_prefix
181    ))
182    
183    #------ cunit --------
184  # Where was CUNIT installed?  # Where was CUNIT installed?
185  opts.Add(PackageOption(  opts.Add(PackageOption(
186      'CUNIT_PREFIX'      'CUNIT_PREFIX'
187      ,"Where are your CUnit files?"      ,"Where are your CUnit files?"
188      ,default_cunit_prefix      ,"$DEFAULT_PREFIX"
189  ))  ))
190    
191  # Where are the CUnit includes?  # Where are the CUnit includes?
192  opts.Add(PackageOption(  opts.Add(PackageOption(
193      'CUNIT_CPPPATH'      'CUNIT_CPPPATH'
194      ,"Where are your CUnit include files?"      ,"Where are your CUnit include files?"
195      ,default_cunit_cpppath      ,"$CUNIT_PREFIX/include"
196  ))  ))
197    
198  # Where are the CUnit libraries?  # Where are the CUnit libraries?
199  opts.Add(PackageOption(  opts.Add(PackageOption(
200      'CUNIT_LIBPATH'      'CUNIT_LIBPATH'
201      ,"Where are your CUnit libraries?"      ,"Where are your CUnit libraries?"
202      ,default_cunit_libpath      ,"$CUNIT_PREFIX/lib"
203  ))  ))
204    
205    #-------- ida -------
206    
207  opts.Add(PackageOption(  opts.Add(PackageOption(
208      "IDA_PREFIX"      "IDA_PREFIX"
209      ,"Prefix for your IDA install (IDA ./configure --prefix)"      ,"Prefix for your IDA install (IDA ./configure --prefix)"
# Line 217  opts.Add( Line 228  opts.Add(
228      ,"$IDA_PREFIX/lib"      ,"$IDA_PREFIX/lib"
229  )  )
230    
231  # conopt  # ----- conopt-----
232    
233  opts.Add(PackageOption(  opts.Add(PackageOption(
234      "CONOPT_PREFIX"      "CONOPT_PREFIX"
# Line 249  opts.Add( Line 260  opts.Add(
260      ,default_conopt_envvar      ,default_conopt_envvar
261  )  )
262    
263    #-------- f2c ------
264    
265  opts.Add(  opts.Add(
266      "F2C_LIB"      "F2C_LIB"
267      ,"F2C library (eg. g2c, gfortran, f2c)"      ,"F2C library (eg. g2c, gfortran, f2c)"
# Line 261  opts.Add(PackageOption( Line 274  opts.Add(PackageOption(
274      ,"off"      ,"off"
275  ))  ))
276    
277    #------- tcl/tk --------
278    
279  opts.Add(  opts.Add(
280      'TCL'      'TCL'
281      ,'Base of Tcl distribution'      ,'Base of Tcl distribution'
# Line 359  opts.Add( Line 374  opts.Add(
374      ,'X11'      ,'X11'
375  )  )
376    
377    #----- installed file locations (for 'scons install') -----
378    
379  opts.Add(  opts.Add(
380      'INSTALL_PREFIX'      'INSTALL_PREFIX'
381      ,'Root location for installed files'      ,'Root location for installed files'
# Line 401  opts.Add( Line 418  opts.Add(
418      ,"$INSTALL_PREFIX/include"      ,"$INSTALL_PREFIX/include"
419  )  )
420    
421    
422    opts.Add(
423        'INSTALL_ROOT'
424        ,'For use by RPM only: location of %{buildroot} during rpmbuild'
425        ,""
426    )
427    
428    #----------------------
429    
430  opts.Add(  opts.Add(
431      'PYGTK_ASSETS'      'PYGTK_ASSETS'
432      ,'Default location for Glade assets (placed in pygtk/config.py)'      ,'Default location for Glade assets (placed in pygtk/config.py)'
# Line 419  opts.Add(BoolOption( Line 445  opts.Add(BoolOption(
445      ,False      ,False
446  ))  ))
447    
448  opts.Add(  #------ dmalloc --------
449      'INSTALL_ROOT'  opts.Add(PackageOption(
450      ,'For use by RPM only: location of %{buildroot} during rpmbuild'      'DMALLOC_PREFIX'
451      ,""      ,"Where are your dmalloc files?"
452  )      ,default_prefix
453    ))
454    
455    opts.Add(PackageOption(
456        'DMALLOC_CPPPATH'
457        ,"Where are your dmalloc include files?"
458        ,default_cpppath
459    ))
460    
461    opts.Add(PackageOption(
462        'DMALLOC_LIBPATH'
463        ,"Where are your dmalloc libraries?"
464        ,default_libpath
465    ))
466    
467    opts.Add(BoolOption(
468        'WITH_DMALLOC'
469        ,"Link to the DMALLOC library (if available) for debugging of memory usage."
470        ,False
471    ))
472    
473    #-----------------------
474    
475  opts.Add(  opts.Add(
476      'DISTTAR_NAME'      'DISTTAR_NAME'
# Line 543  without_extfn_reason = "disabled by opti Line 590  without_extfn_reason = "disabled by opti
590  with_scrollkeeper = env.get('WITH_SCROLLKEEPER')  with_scrollkeeper = env.get('WITH_SCROLLKEEPER')
591  without_scrollkeeper_reason = "disabled by options/config.py"  without_scrollkeeper_reason = "disabled by options/config.py"
592    
593    with_dmalloc = env.get('WITH_DMALLOC')
594    without_dmalloc_reason = "disabled by options/config.py"
595    
596  if platform.system()=="Windows":  if platform.system()=="Windows":
597      with_installer=1      with_installer=1
598  else:  else:
# Line 830  def CheckCUnit(context): Line 880  def CheckCUnit(context):
880      return CheckExtLib(context,'cunit',cunit_test_text)      return CheckExtLib(context,'cunit',cunit_test_text)
881    
882  #----------------  #----------------
883    # dmalloc test
884    
885    dmalloc_test_text = """
886    #include <stdlib.h>
887    #include <dmalloc.h>
888    
889    int main(void){
890        char *c;
891        c = malloc(100*sizeof(char));
892        free(c);
893        return 0;
894    }
895    """
896    
897    def CheckDMalloc(context):
898        return CheckExtLib(context,'dmalloc',dmalloc_test_text)
899    
900    #----------------
901  # MATH test  # MATH test
902    
903  math_test_text = """  math_test_text = """
# Line 1086  conf = Configure(env Line 1154  conf = Configure(env
1154          'CheckMath' : CheckMath          'CheckMath' : CheckMath
1155          , 'CheckSwigVersion' : CheckSwigVersion          , 'CheckSwigVersion' : CheckSwigVersion
1156          , 'CheckCUnit' : CheckCUnit          , 'CheckCUnit' : CheckCUnit
1157            , 'CheckDMalloc' : CheckDMalloc
1158          , 'CheckTcl' : CheckTcl          , 'CheckTcl' : CheckTcl
1159          , 'CheckTclVersion' : CheckTclVersion          , 'CheckTclVersion' : CheckTclVersion
1160          , 'CheckTk' : CheckTk          , 'CheckTk' : CheckTk
# Line 1197  if with_cunit: Line 1266  if with_cunit:
1266          with_cunit = False          with_cunit = False
1267          #print "CUNIT NOT FOUND, LIBS=",conf.env.get('LIBS')          #print "CUNIT NOT FOUND, LIBS=",conf.env.get('LIBS')
1268    
1269    # DMALLOC
1270    
1271    if with_dmalloc:
1272        if not conf.CheckDMalloc():
1273            without_dmalloc_reason = 'dmalloc not found'
1274            with_dmalloc = False
1275    
1276  # IDA  # IDA
1277    
1278  if not with_ida:  if not with_ida:
# Line 1352  for k,v in { Line 1428  for k,v in {
1428  if with_ida:  if with_ida:
1429      subst_dict["/\\* #define ASC_WITH_IDA @ASC_WITH_IDA@ \\*/"]='#define ASC_WITH_IDA '      subst_dict["/\\* #define ASC_WITH_IDA @ASC_WITH_IDA@ \\*/"]='#define ASC_WITH_IDA '
1430    
1431    if with_dmalloc:
1432        subst_dict["/\\* #define ASC_WITH_DMALLOC @ASC_WITH_DMALLOC@ \\*/"]='#define ASC_WITH_DMALLOC '
1433    
1434  if with_conopt:  if with_conopt:
1435      subst_dict["/\\* #define ASC_WITH_CONOPT @ASC_WITH_CONOPT@ \\*/"]='#define ASC_WITH_CONOPT '      subst_dict["/\\* #define ASC_WITH_CONOPT @ASC_WITH_CONOPT@ \\*/"]='#define ASC_WITH_CONOPT '
1436    
# Line 1583  if not with_ida: Line 1662  if not with_ida:
1662  #-------------  #-------------
1663  # LIBASCEND -- all base/generic functionality  # LIBASCEND -- all base/generic functionality
1664    
1665    if with_dmalloc:
1666        libascend_env.Append(LIBS=['dmalloc'])
1667    
1668  libascend = libascend_env.SharedLibrary('ascend',srcs)  libascend = libascend_env.SharedLibrary('ascend',srcs)
1669    
1670  env.Alias('libascend',libascend)  env.Alias('libascend',libascend)

Legend:
Removed from v.937  
changed lines
  Added in v.938

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