/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 3398 by jpye, Wed Apr 4 07:44:06 2018 UTC revision 3399 by jpye, Thu Jun 14 08:56:46 2018 UTC
# Line 65  default_libpath="$DEFAULT_PREFIX/lib" Line 65  default_libpath="$DEFAULT_PREFIX/lib"
65  default_cpppath="$DEFAULT_PREFIX/include"  default_cpppath="$DEFAULT_PREFIX/include"
66  default_f2c_lib="gfortran"  default_f2c_lib="gfortran"
67  default_swig="swig"  default_swig="swig"
68    default_pcre_prefix="$DEFAULT_PREFIX"
69    default_pcre_libs=['pcre']
70    default_pcre_libpath="$PCRE_PREFIX/lib"
71    default_pcre_cpppath="$PCRE_PREFIX/include"
72    
73  icon_extension = '.png'  icon_extension = '.png'
74    
# Line 301  vars.Add(BoolVariable('WITH_PYTHON' Line 305  vars.Add(BoolVariable('WITH_PYTHON'
305      , True      , True
306  ))  ))
307    
308    # You can turn off use of PCRE for note searching
309    vars.Add(BoolVariable('WITH_PCRE'
310        ,"Set to False if you don't want to enable searching of notes with PCRE1"
311        , True
312    ))
313    
314  # Which solvers will we allow?  # Which solvers will we allow?
315  vars.Add(ListVariable('WITH_SOLVERS'  vars.Add(ListVariable('WITH_SOLVERS'
316      ,"List of the solvers you want to build. The default is the minimum that"        ,"List of the solvers you want to build. The default is the minimum that"  
# Line 472  vars.Add('CONOPT_ENVVAR' Line 482  vars.Add('CONOPT_ENVVAR'
482  if platform.system()=="Windows":  if platform.system()=="Windows":
483      vars.Add(PackageVariable("IPOPT_PREFIX"      vars.Add(PackageVariable("IPOPT_PREFIX"
484          ,"Prefix for your IPOPT install (IPOPT ./configure --prefix)"          ,"Prefix for your IPOPT install (IPOPT ./configure --prefix)"
485          ,default_conopt_prefix          ,default_conopt_prefix # <-- FIXME is that right??
486      ))      ))
487    
488      vars.Add("IPOPT_LIBS"      vars.Add("IPOPT_LIBS"
# Line 506  if platform.system()=="Windows": Line 516  if platform.system()=="Windows":
516              ,default_ipopt_dll[i]              ,default_ipopt_dll[i]
517          )          )
518    
519    #-------pcre--------
520    
521    vars.Add(PackageVariable("PCRE_PREFIX"
522        ,"Prefix for your PCRE install (PCRE ./configure --prefix)"
523        ,default_pcre_prefix
524    ))
525    
526    vars.Add("PCRE_LIBS"
527        ,"Library linked to for PCRE"
528        ,default_pcre_libs
529    )
530    
531    vars.Add("PCRE_LIBPATH"
532        ,"Where is your IPOPT library installed"
533    )
534    
535    vars.Add('PCRE_CPPPATH'
536        ,"Where is your IPOPT coin/IpStdCInterface.h (do not include the 'coin' in the path)"
537        ,"$PCRE_PREFIX/include"
538    )
539    
540  #-------- f2c ------  #-------- f2c ------
541    
542  vars.Add("F2C_LIB"  vars.Add("F2C_LIB"
# Line 948  without_conopt_reason = notselected Line 979  without_conopt_reason = notselected
979  with_ipopt = 'IPOPT' in env['WITH_SOLVERS']  with_ipopt = 'IPOPT' in env['WITH_SOLVERS']
980  without_ipopt_reason = notselected  without_ipopt_reason = notselected
981    
982    with_pcre = env.get('WITH_PCRE')
983    without_pcre_reason = "disabled by options/config.py"
984    
985  with_makemps = 'MAKEMPS' in env['WITH_SOLVERS']  with_makemps = 'MAKEMPS' in env['WITH_SOLVERS']
986  without_makemps_reason = notselected  without_makemps_reason = notselected
987    
# Line 2092  def CheckErf(context): Line 2126  def CheckErf(context):
2126      context.Result(is_ok)      context.Result(is_ok)
2127    
2128  #----------------  #----------------
2129    # PCRE1 check
2130    
2131    pcre_test_text = """
2132    #include <pcre.h>
2133    int main(){
2134        pcre *re;
2135        const char *errstr;
2136        int erroffset;
2137        re = pcre_compile("^([a-z]+)[0-9])$",0,&errstr,&erroffset,NULL);
2138    }
2139    """
2140    
2141    def CheckPCRE(context):
2142        return CheckExtLib(context,libname='pcre',text=pcre_test_text)
2143    
2144    #----------------
2145  # GCC Version sniffing  # GCC Version sniffing
2146    
2147  # TODO FIXME  # TODO FIXME
# Line 2140  conf = Configure(env Line 2190  conf = Configure(env
2190          , 'CheckSIGINT' : CheckSIGINT          , 'CheckSIGINT' : CheckSIGINT
2191          , 'CheckSigReset' : CheckSigReset          , 'CheckSigReset' : CheckSigReset
2192          , 'CheckErf' : CheckErf          , 'CheckErf' : CheckErf
2193            , 'CheckPCRE' : CheckPCRE
2194  #       , 'CheckIsNan' : CheckIsNan  #       , 'CheckIsNan' : CheckIsNan
2195  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig
2196      }      }
# Line 2495  if with_doc_build: Line 2546  if with_doc_build:
2546          with_doc_build = False          with_doc_build = False
2547          without_doc_build_reason="unable to locate LyX"          without_doc_build_reason="unable to locate LyX"
2548    
2549    # PCRE
2550    
2551    if with_pcre:
2552        if not conf.CheckPCRE():
2553            with_pcre = False
2554            without_pcre_reason = "PCRE not found"
2555    
2556  # TODO: -D_HPUX_SOURCE is needed  # TODO: -D_HPUX_SOURCE is needed
2557    
2558  # TODO: detect if dynamic libraries are possible or not  # TODO: detect if dynamic libraries are possible or not
# Line 2594  for k,v in { Line 2652  for k,v in {
2652          ,'ASC_WITH_UFSPARSE':with_ufsparse          ,'ASC_WITH_UFSPARSE':with_ufsparse
2653          ,'ASC_WITH_MMIO':with_mmio          ,'ASC_WITH_MMIO':with_mmio
2654          ,'ASC_WITH_ZLIB':with_zlib          ,'ASC_WITH_ZLIB':with_zlib
2655            ,'ASC_WITH_PCRE':with_pcre
2656          ,'ASC_SIGNAL_TRAPS':with_signals          ,'ASC_SIGNAL_TRAPS':with_signals
2657          ,'ASC_RESETNEEDED':env.get('ASC_RESETNEEDED')          ,'ASC_RESETNEEDED':env.get('ASC_RESETNEEDED')
2658          ,'HAVE_C99FPE':env.get('HAVE_C99FPE')          ,'HAVE_C99FPE':env.get('HAVE_C99FPE')
# Line 2757  if with_mmio: Line 2816  if with_mmio:
2816      srcs += env.SConscript(['mmio/SConscript'],'env')      srcs += env.SConscript(['mmio/SConscript'],'env')
2817  else:  else:
2818      print "Skipping... MMIO export won't be built:", without_mmio_reason      print "Skipping... MMIO export won't be built:", without_mmio_reason
2819    
2820    #if with_pcre:
2821    #   env.Append(WITH_PCRE=1)
2822    #else:
2823    #   print "Skipping... PCRE searching of NOTES:",without_pcre_reason
2824    
2825  #-------------  #-------------
2826  # LIBASCEND -- all 'core' functionality  # LIBASCEND -- all 'core' functionality
2827    

Legend:
Removed from v.3398  
changed lines
  Added in v.3399

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