<s> import os <EOL> import os . path as osp <EOL> import waflib . Utils <EOL> import waflib . Logs as msg <EOL> from waflib . Configure import conf <EOL> _heptooldir = osp . dirname ( osp . abspath ( __file__ ) ) <EOL> def options ( opt ) : <EOL> opt . load ( '<STR_LIT>' , tooldir = _heptooldir ) <EOL> opt . add_option ( <EOL> '<STR_LIT>' , <EOL> default = None , <EOL> help = "<STR_LIT>" ) <EOL> return <EOL> def configure ( conf ) : <EOL> conf . load ( '<STR_LIT>' , tooldir = _heptooldir ) <EOL> return <EOL> @ conf <EOL> def find_clhep ( ctx , ** kwargs ) : <EOL> if not ctx . env . HWAF_FOUND_C_COMPILER : <EOL> ctx . fatal ( '<STR_LIT>' ) <EOL> pass <EOL> if not ctx . env . HWAF_FOUND_CXX_COMPILER : <EOL> ctx . fatal ( '<STR_LIT>' ) <EOL> pass <EOL> clhep_cfg = "<STR_LIT>" <EOL> path_list = waflib . Utils . to_list ( kwargs . get ( '<STR_LIT>' , [ ] ) ) <EOL> if getattr ( ctx . options , '<STR_LIT>' , None ) : <EOL> topdir = ctx . options . with_clhep <EOL> topdir = ctx . hwaf_subst_vars ( topdir ) <EOL> clhep_cfg = osp . abspath ( osp . join ( topdir , "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> path_list . append ( osp . join ( topdir , "<STR_LIT>" ) ) <EOL> pass <EOL> kwargs [ '<STR_LIT>' ] = path_list <EOL> ctx . find_program ( <EOL> clhep_cfg , <EOL> var = '<STR_LIT>' , <EOL> ** kwargs ) <EOL> clhep_cfg = ctx . env [ '<STR_LIT>' ] <EOL> ctx . check_with ( <EOL> ctx . check_cfg , <EOL> "<STR_LIT>" , <EOL> path = clhep_cfg , <EOL> package = "<STR_LIT>" , <EOL> uselib_store = "<STR_LIT>" , <EOL> args = '<STR_LIT>' , <EOL> ** kwargs ) <EOL> clhep_libs = '''<STR_LIT>''' <EOL> for lib in clhep_libs . split ( ) : <EOL> libname = lib . strip ( ) <EOL> for n in ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) : <EOL> k = '<STR_LIT>' % n <EOL> ctx . env [ k ] = [ <EOL> p . replace ( "<STR_LIT:'>" , "<STR_LIT>" ) . replace ( '<STR_LIT:">' , '<STR_LIT>' ) <EOL> for p in ctx . env [ k ] <EOL> ] <EOL> ctx . env [ '<STR_LIT>' % ( n , libname ) ] = ctx . env [ k ] [ : ] <EOL> ctx . env [ '<STR_LIT>' % libname ] = [ l . replace ( '<STR_LIT>' , libname ) <EOL> for l in ctx . env [ '<STR_LIT>' ] ] <EOL> pass <EOL> version = ctx . check_cxx ( <EOL> msg = "<STR_LIT>" , <EOL> okmsg = "<STR_LIT>" , <EOL> fragment = '''<STR_LIT>''' , <EOL> use = "<STR_LIT>" , <EOL> define_name = "<STR_LIT>" , <EOL> define_ret = True , <EOL> execute = True , <EOL> mandatory = True , <EOL> ) <EOL> ctx . start_msg ( "<STR_LIT>" ) <EOL> ctx . end_msg ( version ) <EOL> ctx . env . CLHEP_VERSION = version <EOL> ctx . env . HWAF_FOUND_CLHEP = <NUM_LIT:1> <EOL> return </s>
