/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2072 by jose, Fri Aug 28 02:42:47 2009 UTC revision 2073 by jpye, Thu Sep 3 13:23:46 2009 UTC
# Line 20  pyversion = "%d.%d" % (sys.version_info[ Line 20  pyversion = "%d.%d" % (sys.version_info[
20    
21  #print "PLATFORM = ",platform.system()  #print "PLATFORM = ",platform.system()
22    
23    default_install_prefix = '/usr/local'
24    default_install_bin = "$INSTALL_PREFIX/bin"
25    default_install_lib = "$INSTALL_PREFIX/lib"
26    default_install_models = "$INSTALL_LIB/ascend/models"
27    default_install_solvers = "$INSTALL_LIB/ascend/solvers"
28    default_install_assets = "$INSTALL_ASCDATA/glade/"
29    default_install_ascdata = "$INSTALL_SHARE/ascend"
30    default_install_include = "$INSTALL_PREFIX/include"
31    
32    default_tcl = '/usr'
33    default_tcl_libpath = "$TCL/lib"
34  default_tcl_cpppath = "$TCL/include"  default_tcl_cpppath = "$TCL/include"
35  default_tron_envvar="TRON_PATH"  default_tron_envvar="TRON_PATH"
36  default_conopt_envvar="CONOPT_PATH"  default_conopt_envvar="CONOPT_PATH"
37  default_with_graphviz = True  default_with_graphviz = True
38    default_tcl_lib = "tcl8.5"
39    default_tk_lib = "tk8.5"
40    default_tktable_lib = "Tktable2.9"
41    default_ida_prefix="$DEFAULT_PREFIX"
42    default_conopt_prefix="$DEFAULT_PREFIX"
43    default_conopt_libpath="$CONOPT_PREFIX"
44    default_conopt_cpppath="$CONOPT_PREFIX"
45    default_conopt_dlpath="$CONOPT_PREFIX"
46    default_tron_prefix="$DEFAULT_PREFIX"
47    default_tron_dlpath="$TRON_PREFIX/lib"
48    default_tron_lib="tron1"
49    default_prefix="/usr"
50    default_libpath="$DEFAULT_PREFIX/lib"
51    default_cpppath="$DEFAULT_PREFIX/include"
52    default_fortran="gfortran"
53    default_f2c_lib="gfortran"
54    
55    
56    icon_extension = '.png'
57    
58  if platform.system()=="Windows":  if platform.system()=="Windows":
59        default_prefix="c:\\MinGW"
60        default_libpath="$DEFAULT_PREFIX\\lib"
61        default_cpppath="$DEFAULT_PREFIX\\include"  
62    
63      # these correspond the the version of Tcl/Tk linked to in the NSIS scripts      # these correspond the the version of Tcl/Tk linked to in the NSIS scripts
64      default_tcl_lib = "tcl84"      default_tcl_lib = "tcl84"
65      default_tk_lib = "tk84"      default_tk_lib = "tk84"
66      default_tktable_lib = "Tktable28"      default_tktable_lib = "Tktable28"
67    
68      default_install_assets = "glade/"      default_install_assets = "glade/"
     icon_extension = '.png'  
69      default_tcl = "c:\\Tcl"      default_tcl = "c:\\Tcl"
70      if os.environ.get('MSYSTEM'):      if os.environ.get('MSYSTEM'):
71          default_tcl_libpath="$TCL\\bin"          default_tcl_libpath="$TCL\\bin"
# Line 49  if platform.system()=="Windows": Line 82  if platform.system()=="Windows":
82            
83      # where to look for IDA solver libraries, headers, etc.      # where to look for IDA solver libraries, headers, etc.
84      default_ida_prefix = "c:\\MinGW"      default_ida_prefix = "c:\\MinGW"
     if not os.path.exists(default_ida_prefix):  
         default_ida_prefix = None  
85    
86      # where to look for CONOPT when compiling      # where to look for CONOPT when compiling
87      default_conopt_prefix = "c:\\Program Files\\CONOPT"      default_conopt_prefix = "c:\\Program Files\\CONOPT"
# Line 58  if platform.system()=="Windows": Line 89  if platform.system()=="Windows":
89      default_conopt_cpppath="$CONOPT_PREFIX"      default_conopt_cpppath="$CONOPT_PREFIX"
90      default_conopt_dlpath="$CONOPT_PREFIX"      default_conopt_dlpath="$CONOPT_PREFIX"
91      default_conopt_lib="conopt3"      default_conopt_lib="conopt3"
     if not os.path.exists(default_conopt_prefix):  
         default_conopt_prefix = None  
92    
93      # FIXME remove this      # FIXME remove this
94      default_tron_prefix="c:\\Program Files\\TRON"      default_tron_prefix="c:\\Program Files\\TRON"
95      default_tron_dlpath="$TRON_PREFIX"      default_tron_dlpath="$TRON_PREFIX"
     default_tron_lib="tron1"  
   
     default_prefix="c:\\MinGW"  
     default_libpath="$DEFAULT_PREFIX\\lib"  
     default_cpppath="$DEFAULT_PREFIX\\include"    
96                    
97      need_libm = False      need_libm = False
98      python_exe = sys.executable      python_exe = sys.executable
# Line 82  if platform.system()=="Windows": Line 106  if platform.system()=="Windows":
106      soname_minor = ""      soname_minor = ""
107      soname_major = ""      soname_major = ""
108      # still problems with Graphviz on Windows, leave it off now by default.      # still problems with Graphviz on Windows, leave it off now by default.
109        
110  else:  elif platform.system()=="Darwin":
111      default_tcl_lib = "tcl8.5"  
112      default_tk_lib = "tk8.5"      default_install_prefix = '/'
113      default_tktable_lib = "Tktable2.9"      default_install_bin = "$INSTALL_PREFIX/Applications/ASCEND"
114        default_install_lib = "$INSTALL_PREFIX/Applications/ASCEND"
115        default_install_models = "$INSTALL_PREFIX/Library/ASCEND/Models"
116        default_install_solvers = "$INSTALL_PREFIX/Library/ASCEND/Solvers"
117        default_install_include = "$INSTALL_PREFIX/Applications/ASCEND/Headers"
118        default_install_ascdata = "$INSTALL_PREFIX/Applications/ASCEND/Resources"
119    
120        # still need to work out the Tcl/Tk side of things...
121      default_install_assets = "$INSTALL_ASCDATA/glade/"      default_install_assets = "$INSTALL_ASCDATA/glade/"
122    
123        # within the bundle, we'll use relative paths
124        default_absolute_paths = False
125        default_dist_rel_bin = '.'
126        default_tk_rel_dist = 'tcltk'
127    
128        # we want these to be in /Library/ASCEND/Models and /Library/ASCEND/Solvers
129        default_library_rel_dist = '../../Library/ASCEND/Models'
130        default_solvers_rel_dist = '../../Library/ASCEND/Solvers'
131    
132        # where to look for CONOPT when compiling
133        default_conopt_prefix = "/Library/CONOPT"
134    
135        default_conopt_lib="conopt3"
136    
137        # FIXME remove this
138        default_tron_dlpath="$TRON_PREFIX"
139        default_tron_lib="tron1"
140            
141        need_libm = False
142        python_exe = sys.executable
143        default_with_scrollkeeper=False
144        pathsep = ";"
145        
146        default_python = distutils.sysconfig.get_python_lib()
147        
148    else: # LINUX
149    
150      icon_extension = '.svg'      icon_extension = '.svg'
     default_tcl = '/usr'  
     default_tcl_libpath = "$TCL/lib"  
151      default_python = distutils.sysconfig.get_python_lib()      default_python = distutils.sysconfig.get_python_lib()
152    
153      if os.path.exists("/etc/debian_version"):      if os.path.exists("/etc/debian_version"):
# Line 127  else: Line 184  else:
184      default_library_rel_dist = 'lib/ascend/models'      default_library_rel_dist = 'lib/ascend/models'
185      default_solvers_rel_dist = 'lib/ascend/solvers'      default_solvers_rel_dist = 'lib/ascend/solvers'
186    
     default_ida_prefix="/usr"  
     default_conopt_prefix="/usr"  
187      default_conopt_libpath="$CONOPT_PREFIX/lib"      default_conopt_libpath="$CONOPT_PREFIX/lib"
188      default_conopt_cpppath="$CONOPT_PREFIX/include"      default_conopt_cpppath="$CONOPT_PREFIX/include"
189      default_conopt_dlpath= default_conopt_libpath + ":/usr/local/lib"      default_conopt_dlpath= default_conopt_libpath + ":/usr/local/lib"
190      default_conopt_lib="consub3"      default_conopt_lib="consub3"
191    
     default_tron_prefix="/usr"  
     default_tron_dlpath="$TRON_PREFIX/lib"  
     default_tron_lib="tron1"  
   
     default_prefix="/usr"  
     default_libpath="$DEFAULT_PREFIX/lib"  
     default_cpppath="$DEFAULT_PREFIX/include"  
   
192      need_libm = True      need_libm = True
193      if not os.path.isdir(default_tcl):      if not os.path.isdir(default_tcl):
194          default_tcl = '/usr'          default_tcl = '/usr'
195      python_exe = distutils.sysconfig.EXEC_PREFIX+"/bin/python"      python_exe = distutils.sysconfig.EXEC_PREFIX+"/bin/python"
196      default_with_scrollkeeper=False      default_with_scrollkeeper=False
197      pathsep = ":"      pathsep = ":"
198                
     default_fortran="gfortran"  
     default_f2c_lib="gfortran"  
       
199      #default_graphviz_libs=["graph","cdt","gvc"]      #default_graphviz_libs=["graph","cdt","gvc"]
200      #default_graphviz_libpath = default_libpath      #default_graphviz_libpath = default_libpath
201      #if os.path.exists("/usr/lib/graphviz/libgraph.so"):      #if os.path.exists("/usr/lib/graphviz/libgraph.so"):
# Line 159  else: Line 203  else:
203      #   default_graphviz_libpath="/usr/lib/graphviz"      #   default_graphviz_libpath="/usr/lib/graphviz"
204      #   default_graphviz_rpath="$GRAPHVIZ_LIBPATH"      #   default_graphviz_rpath="$GRAPHVIZ_LIBPATH"
205    
206    if not os.path.exists(default_conopt_prefix):
207        default_conopt_prefix = None
208    
209    if not os.path.exists(default_tron_prefix):
210        default_tron_prefix = None
211    
212    if not os.path.exists(default_ida_prefix):
213        default_ida_prefix = None
214    
215  soname_clean = "${SHLIBPREFIX}ascend${SHLIBSUFFIX}"  soname_clean = "${SHLIBPREFIX}ascend${SHLIBSUFFIX}"
216  soname_full = "%s%s" % (soname_clean,soname_major)  soname_full = "%s%s" % (soname_clean,soname_major)
217    
# Line 588  opts.Add( Line 641  opts.Add(
641  opts.Add(  opts.Add(
642      'INSTALL_PREFIX'      'INSTALL_PREFIX'
643      ,'Root location for installed files'      ,'Root location for installed files'
644      ,'/usr/local'      ,default_install_prefix
645  )  )
646    
647  opts.Add(  opts.Add(
648      'INSTALL_BIN'      'INSTALL_BIN'
649      ,'Location to put binaries during installation'      ,'Location to put binaries during installation'
650      ,"$INSTALL_PREFIX/bin"      ,default_install_bin
651  )  )
652    
653  opts.Add(  opts.Add(
654      'INSTALL_LIB'      'INSTALL_LIB'
655      ,'Location to put libraries during installation'      ,'Location to put libraries during installation'
656      ,"$INSTALL_PREFIX/lib"      ,default_install_lib
657  )  )
658    
659  opts.Add(  opts.Add(
# Line 612  opts.Add( Line 665  opts.Add(
665  opts.Add(  opts.Add(
666      'INSTALL_ASCDATA'      'INSTALL_ASCDATA'
667      ,"Location of ASCEND shared data (TK, python, models etc)"      ,"Location of ASCEND shared data (TK, python, models etc)"
668      ,"$INSTALL_SHARE/ascend"      ,default_install_ascdata
669  )  )
670    
671  opts.Add(  opts.Add(
# Line 630  opts.Add( Line 683  opts.Add(
683  opts.Add(  opts.Add(
684      'INSTALL_MODELS'      'INSTALL_MODELS'
685      ,"Location of ASCEND model files (.a4c,.a4l,.a4s)"      ,"Location of ASCEND model files (.a4c,.a4l,.a4s)"
686      ,"$INSTALL_LIB/ascend/models"      ,default_install_models
687  )  )
688    
689  opts.Add(  opts.Add(
690      'INSTALL_SOLVERS'      'INSTALL_SOLVERS'
691      ,"Location of ASCEND solvers"      ,"Location of ASCEND solvers"
692      ,"$INSTALL_LIB/ascend/solvers"      ,default_install_solvers
693  )  )
694    
695  opts.Add(  opts.Add(
# Line 648  opts.Add( Line 701  opts.Add(
701  opts.Add(  opts.Add(
702      'INSTALL_INCLUDE'      'INSTALL_INCLUDE'
703      ,'Location to put header files during installation'      ,'Location to put header files during installation'
704      ,"$INSTALL_PREFIX/include"      ,default_install_include
705  )  )
706    
707    

Legend:
Removed from v.2072  
changed lines
  Added in v.2073

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