ó
!Æ^c        	   @€  s  d  Z  d d l m Z d d l Z d d l Z d d l Z d d l m Z m Z m	 Z	 m
 Z
 m Z m Z m Z d d l m Z m Z d d l m Z d Z d Z d	 Z d
 Z i d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d  d! 6d" d# 6d" d$ 6d% d& 6d% d' 6d( d) 6d* d+ 6Z i d, d- 6d, d. 6d/ d0 6d1 d2 6d3 d4 6d5 d6 6d7 d8 6d9 d: 6d; d< 6d= d> 6d? d@ 6dA dB 6dA dC 6dD dE 6dF dG 6dH dI 6dJ dK 6dL dM 6dN dO 6Z e d e d dP „ ƒ Z e dQ „  ƒ Z e dR „  ƒ Z e dS „  ƒ Z dT „  Z e dU „  ƒ Z  e dV „  ƒ Z! e dW „  ƒ Z" dX e	 j	 f dY „  ƒ  YZ# e dX ƒ e dZ ƒ d[ „  ƒ ƒ Z$ e d\ „  ƒ Z% e d] „  ƒ Z& e d^ „  ƒ Z' e d_ „  ƒ Z( e e) d` da „ ƒ Z* e d` db „ ƒ Z+ e d` dc „ ƒ Z, e dd „  ƒ Z- e de „  ƒ Z. e df „  ƒ Z/ e d` d` e e) e e) d` dg „ ƒ Z0 e e) e d` dh „ ƒ Z1 e di „  ƒ Z2 e dj „  ƒ Z3 e dk „  ƒ Z4 e dl „  ƒ Z5 e dm „  ƒ Z6 e e e e dn „ ƒ Z7 e do „  ƒ Z8 e dp „  ƒ Z9 e dq „  ƒ Z: dr e	 j	 f ds „  ƒ  YZ; e dt „  ƒ Z< e du dv „ ƒ Z= d S(w   s   
C/C++/D configuration helpers
iÿÿÿÿ(   t   with_statementN(   t   Buildt   Utilst   Taskt   Optionst   Logst   Errorst   Runner(   t   after_methodt   feature(   t   confs   config.ht
   define_keyt   include_keysI   
int main(int argc, char **argv) {
	(void)argc; (void)argv;
	return 0;
}
t   linuxt	   __linux__t   gnut   __GNU__t   freebsdt   __FreeBSD__t   netbsdt
   __NetBSD__t   openbsdt   __OpenBSD__t   sunost   __sunt   hpuxt   __hpuxt   irixt   __sgit   aixt   _AIXt   cygwint
   __CYGWIN__t   __MSYS__t   uwint   _UWINt   win32t   _WIN64t   _WIN32t   darwint-   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__t.   __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__t   qnxt   __QNX__t   naclt   __native_client__t   x86_64t
   __x86_64__t	   __amd64__t   x86t   __i386__t   iat   __ia64__t   mipst   __mips__t   sparct	   __sparc__t   alphat	   __alpha__t   aarch64t   __aarch64__t   thumbt	   __thumb__t   armt   __arm__t   hppat   __hppa__t   powerpct   __powerpc__t   __ppc__t   convext
   __convex__t   m68kt   __m68k__t   s390xt	   __s390x__t   s390t   __s390__t   sht   __sh__t   xtensat
   __xtensa__c         €  sp  t  | t ƒ s t ‚ ˆ  p! |  j ‰  | dG k r` t } d | k r` d | k pW d | k } q` n  t j | d | ƒ} t | _ d | _ t	 | ƒ } | ‰ ‡  ‡ f d †  } ‡  ‡ f d †  }	 t
 }
 x¦| rk| j d ƒ } | d	  } | d	 } | d
 k s| d k r/| s| j d ƒ } n  |	 d | ƒ qÆ | d k rm| | j d ƒ g } | d | ƒ | d | ƒ qÆ | d k s”ˆ  j d k r¼| d k r¼| s¬| j d ƒ } n  | d | ƒ qÆ | d k r| sà| j d ƒ } n  | sì|
 ròd n d } | | | ƒ qÆ | d k rT| s,| j d ƒ } n  | s8|
 r>d n d } |	 | | ƒ qÆ | j d ƒ r—| so|
 rud n d } |	 | | j d d ƒ ƒ qÆ | j d ƒ rÎd | k r¸d n d } | | | ƒ qÆ | j d ƒ sé| dH k r| d | ƒ | d | ƒ | d# | ƒ qÆ | d$ k r8|	 d% | j d ƒ ƒ qÆ | j d& ƒ r[|	 d' | d	 ƒ qÆ | d( k ss| d) k r•| d* | j d ƒ j d+ ƒ ƒ qÆ | j d, ƒ r¸| d* | d- ƒ qÆ | j d) ƒ rÛ| d* | d. ƒ qÆ | j d/ ƒ rþ| d* | d0 ƒ qÆ | d1 k s| d2 k rt }
 qÆ | d3 k s7| d4 k r@t
 }
 qÆ | j d5 ƒ s[| dI k rk| d# | ƒ qÆ | j dJ ƒ r—| d | ƒ | d | ƒ qÆ | j d= ƒ r¶| d# | ƒ qÆ | j dK ƒ rê| j d ƒ } | d# | | g ƒ qÆ | j dL ƒ r8| | j d ƒ g } | d | ƒ | d | ƒ | d# | ƒ qÆ | j dM ƒ rW|	 d# | ƒ qÆ |  j dF | ƒ qÆ WdG S(N   sª  
	Parses flags from the input lines, and adds them to the relevant use variables::

		def configure(conf):
			conf.parse_flags('-O3', 'FOO')
			# conf.env.CXXFLAGS_FOO = ['-O3']
			# conf.env.CFLAGS_FOO = ['-O3']

	:param line: flags
	:type line: string
	:param uselib_store: where to add the flags
	:type uselib_store: string
	:param env: config set or conf.env by default
	:type env: :py:class:`waflib.ConfigSet.ConfigSet`
	s   \s   \ s   \\t   posixt    c         €  s   ˆ  j  d |  ˆ f | ƒ d  S(   Ns   %s_%s(   t   append_value(   t   vart   val(   t   envt   uselib(    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   appm   s    c         €  s   ˆ  j  d |  ˆ f | ƒ d  S(   Ns   %s_%s(   t   append_unique(   RU   RV   (   RW   RX   (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   appuo   s    i    i   s   -Is   /It   INCLUDESs   -it   CFLAGSt   CXXFLAGSs   -Dt   msvcs   /Dt   DEFINESs   -lt   STLIBt   LIBs   -Lt	   STLIBPATHt   LIBPATHs	   /LIBPATH:s   -std=s   ++t   +s   -pthreads   -fPICs   -fpics   -fPIEs   -fpiet	   LINKFLAGSs
   -frameworkt	   FRAMEWORKs   -Ft   FRAMEWORKPATHs
   -Wl,-rpaths   -Wl,-Rt   RPATHs   -Wl,s   -Wl,-R,i   i   s   -Wl,-rpath,i   s   -Wl,-Bstatics   -Bstatics   -Wl,-Bdynamics	   -Bdynamics   -Wls	   -rdynamics   -pies   -ms   -fs   -dynamics   -Os   -gs   -bundles
   -undefineds   -Xlinkers   -archs	   -isysroots   .as   .sos   .dylibs   .libs   Unhandled flag %rN(   s   -pthreads   -fPICs   -fpics   -fPIEs   -fpie(   s	   -rdynamics   -pie(   s   -ms   -fs   -dynamics   -Os   -g(   s
   -undefineds   -Xlinker(   s   -archs	   -isysroot(   s   .as   .sos   .dylibs   .lib(   t
   isinstancet   strt   AssertionErrorRW   t   Nonet   Truet   shlext   whitespace_splitt
   commenterst   listt   Falset   popt   CXX_NAMEt
   startswitht   replacet   lstript   endswitht   to_log(   t   selft   linet   uselib_storeRW   t   force_staticRR   t   lext   lstRY   R[   t   statict   xt   stt   ott   tmpt   prefixt   arg(    (   RW   RX   s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   parse_flagsI   s¨    			

'"		c         C€  sÜ  d | k rA |  j  j s. |  j d d d ƒn  |  j  j | d <n  d | k d | k d | k } | d k r| t d	 ƒ ‚ n  d
 | k rß d | k r© d | d | d
 <qß d | k rÊ d | d | d
 <qß d | d | d
 <n  d | k rd | k rd | d <n  d | k rd | d <n  d | k r,n¬ d | k r‚d | k rU| d | d <n  d | k rØd t j | d ƒ | d <qØnV d | k r²t j | d ƒ d j ƒ  | d <n  d | k rØ|  j | d ƒ | d <n  d S(   sÛ  
	Searches for the program *pkg-config* if missing, and validates the
	parameters to pass to :py:func:`waflib.Tools.c_config.exec_cfg`.

	:param path: the **-config program to use** (default is *pkg-config*)
	:type path: list of string
	:param msg: message to display to describe the test executed
	:type msg: string
	:param okmsg: message to display when the test is successful
	:type okmsg: string
	:param errmsg: message to display in case of error
	:type errmsg: string
	t   paths
   pkg-configRU   t	   PKGCONFIGt   atleast_pkgconfig_versiont
   modversiont   packagei   sL   exactly one of atleast_pkgconfig_version, modversion and package must be sett   msgs%   Checking for pkg-config version >= %rs   Checking for %r versions   Checking for %rt   okmsgt   yest   errmsgs	   not foundR}   t   define_names
   %s_VERSIONi    N(	   RW   RŠ   t   find_programt
   ValueErrorR   t   quote_define_namet   to_listt   uppert   have_define(   R{   t   kwt   s(    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   validate_cfg¼   s8     !$c      	   €  sÖ  t  j ˆ  d ƒ } ˆ j j p" d } ˆ  j d ƒ r] | sL t ˆ j ƒ } n  ˆ  d | d <n  ‡  ‡ f d †  } d ˆ  k r§ | d ˆ  d g } ˆ j | d | ƒd Sd	 ˆ  k rˆ j | d
 ˆ  d	 g d | ƒj ƒ  } d ˆ  k rõ | ˆ  d <n  ˆ j	 ˆ  d | ƒ | Sg  | } ˆ  j d ƒ } | sAˆ j j
 p;i  } n  x1 | j ƒ  D]# \ }	 }
 | j d |	 |
 f ƒ qNWˆ  j d t ƒ } d ˆ  k rÔt  j ˆ  d ƒ } d | k s¾d | k rÇt } n  | | 7} n  | j t  j ˆ  d ƒ ƒ d ˆ  k r{ˆ  j d ˆ j ƒ } t  j ˆ  d ƒ } xR | D]J } ˆ j | d | g d | ƒj ƒ  }
 d ˆ  d | f } |
 | | <q)Wd Sˆ j | d | ƒ} | ƒ  ˆ j | ˆ  d ˆ  j d ˆ j ƒ d | d ˆ  j d ƒ ƒ| S(   s¯  
	Executes ``pkg-config`` or other ``-config`` applications to collect configuration flags:

	* if atleast_pkgconfig_version is given, check that pkg-config has the version n and return
	* if modversion is given, then return the module version
	* else, execute the *-config* program with the *args* and *variables* given, and set the flags on the *conf.env.FLAGS_name* variable

	:param atleast_pkgconfig_version: minimum pkg-config version to use (disable other tests)
	:type atleast_pkgconfig_version: string
	:param package: package name, for example *gtk+-2.0*
	:type package: string
	:param uselib_store: if the test is successful, define HAVE\_*name*. It is also used to define *conf.env.FLAGS_name* variables.
	:type uselib_store: string
	:param modversion: if provided, return the version of the given module and define *name*\_VERSION
	:type modversion: string
	:param args: arguments to give to *package* when retrieving flags
	:type args: list of string
	:param variables: return the values of particular variables
	:type variables: list of string
	:param define_variable: additional variables to define (also in conf.env.PKG_CONFIG_DEFINES)
	:type define_variable: dict(string: string)
	R‰   t   pkg_config_patht   PKG_CONFIG_PATHc          €  sw   ˆ  d }  ˆ  j  d d ƒ r2 ˆ j |  d t ƒ n ˆ j j d ˆ  d d |  ƒ ˆ  j  d d ƒ rs d ˆ j |  <n  d  S(   NR’   t   global_definei   s
   DEFINES_%sR}   s   %s=1t   add_have_to_env(   t   gett   defineRs   RW   RZ   (   R’   (   R™   R{   (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   define_it  s    
R‹   s   --atleast-pkgconfig-version=%sRW   NRŒ   s   --modversionR�   R’   t   define_variables   --define-variable=%s=%sR~   t   argss   --statics   --static-libsR�   t	   variabless   --variable=s   %s_%sR}   RR   (   R   R–   RW   Rm   R    t   dictt   environt   cmd_and_logt   stripR¡   t   PKG_CONFIG_DEFINESt   itemst   appendRs   Rn   t   extendRˆ   (   R{   R™   R‰   RW   R¢   t   cmdt   versionR€   t   defit   keyRV   R�   R¤   t   v_envt   varst   vRU   t   ret(    (   R™   R{   s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   exec_cfgð   sT    )
	&;c         O€  s  |  j  | ƒ d | k r0 |  j | d | � n  d	 } y |  j | ƒ } Wno |  j j k
 rº } d | k r‡ |  j | d d | � n  t j d k rª |  j	 d | ƒ n  |  j
 d ƒ nI X| sÊ t } n  | | d <d | k r|  j |  j | d | ƒ | � n  | S(
   sÕ  
	Checks for configuration flags using a **-config**-like program (pkg-config, sdl-config, etc).
	This wraps internal calls to :py:func:`waflib.Tools.c_config.validate_cfg` and :py:func:`waflib.Tools.c_config.exec_cfg`

	A few examples::

		def configure(conf):
			conf.load('compiler_c')
			conf.check_cfg(package='glib-2.0', args='--libs --cflags')
			conf.check_cfg(package='pango')
			conf.check_cfg(package='pango', uselib_store='MYPANGO', args=['--cflags', '--libs'])
			conf.check_cfg(package='pango',
				args=['pango >= 0.1.0', 'pango < 9.9.9', '--cflags', '--libs'],
				msg="Checking for 'pango 0.1.0'")
			conf.check_cfg(path='sdl-config', args='--cflags --libs', package='', uselib_store='SDL')
			conf.check_cfg(path='mpicc', args='--showme:compile --showme:link',
				package='', uselib_store='OPEN_MPI', mandatory=False)
			# variables
			conf.check_cfg(package='gtk+-2.0', variables=['includedir', 'prefix'], uselib_store='FOO')
			print(conf.env.FOO_includedir)
	RŽ   R‘   t   YELLOWi   s   Command failure: %ss   The configuration failedt   successR�   N(   R›   t	   start_msgRm   R¶   t   errorst   WafErrort   end_msgR   t   verboseRz   t   fatalRn   t   ret_msg(   R{   t   kR™   Rµ   t   e(    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   check_cfgL  s$    	
#c         C€  sÊ   |  j  d r= |  j j |  j  d ƒ } | j |  j  d ƒ n  |  d |  j  d d |  j  d d d ƒ } x- |  j  j ƒ  D] \ } } t | | | ƒ qv W|  j  j d ƒ sÆ |  j j d |  j  d ƒ n  d	 S(
   sU   
	Build function that is used for running configuration tests with ``conf.check()``
	t   compile_filenamet   codet   featurest   sourcet   targett   testprogt   quiets
   ==>
%s
<==N(	   R™   t   srcnodet	   make_nodet   writeR«   t   setattrR    R
   Rz   (   t   bldt   nodet   oRÀ   R´   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   build_funx  s    )c         C€  sl  x. d? D]& } | | k r t  j d | ƒ q q Wd | k rJ t | d <n  d | k rl |  j j ƒ  | d <n  | d } d | k rû d | k rû d	 | d <| j rÜ t j j d
 ƒ rÜ d
 | d <|  j j	 sø |  j
 d ƒ qø qû |  j j sû |  j
 d ƒ qû n  d | k rWd	 | d <d
 t j | j d g  ƒ ƒ k sG| j d ƒ d
 k rWd
 | d <qWn  d | k rpd | d <n  d | k rÉd | k sš| j d t ƒ rµ| d | d g | d <qà| d g | d <n t j | d ƒ | d <d | k rd | d d
 k rd pd | d <n  d „  } d | k rÖ| d } d | k rQ| j ƒ  | d <n  | j d ƒ s»d | | f } | j d ƒ rŒ| d  } n  | j d g  ƒ } t j | ƒ | g | d <n  d | | d <| | d <n¸ d | k rŽd | k rd  | d | d <n  t j | d ƒ } t | ƒ s.t d! ƒ ‚ | | ƒ t | d" <d | k re| d# j ƒ  | d <n  d$ | k rŽ|  j | d# ƒ | d$ <qŽn  d% | k rád | k r»d& | d% | d <n  d | k rá| d% j ƒ  | d <qán  d' | k r4d | k rd( | d' | d <n  d | k r4| d' j ƒ  | d <q4n  d) | k rƒ| d) | d" <d | k rgd* | d <n  d+ | k rƒd, | d+ <qƒn  xl d@ dA dB f D][ \ }	 }
 |	 | k r“d | k rÒd1 |
 | |	 f | d <n  d+ | k rîd, | d+ <qîq“q“Wd2 | k rt | d2 <n  | d2 r6| d j d3 ƒ t j | d4 <n  d+ | k rOd5 | d+ <n  d6 | k rhd7 | d6 <n  d" | k r�t | d" <n  |  j t rÎd8 j g  |  j t D] } d9 | ^ q¢ƒ d8 | d" | d" <n  | j d: ƒ sæ| j rd; |  j ƒ  | d" f | d" <g  | _ n  | j d< ƒ s,d> | d< <n  d$ | k rL|  j | d$ ƒ n  d | k rh|  j
 d= ƒ n  d> S(C   s  
	Pre-checks the parameters that will be given to :py:func:`waflib.Configure.run_build`

	:param compiler: c or cxx (tries to guess what is best)
	:type compiler: string
	:param type: cprogram, cshlib, cstlib - not required if *features are given directly*
	:type type: binary to create
	:param feature: desired features for the task generator that will execute the test, for example ``cxx cxxstlib``
	:type feature: list of string
	:param fragment: provide a piece of code for the test (default is to let the system create one)
	:type fragment: string
	:param uselib_store: define variables after the test is executed (IMPORTANT!)
	:type uselib_store: string
	:param use: parameters to use for building (just like the normal *use* keyword)
	:type use: list of string
	:param define_name: define to set when the check is over
	:type define_name: string
	:param execute: execute the resulting binary
	:type execute: bool
	:param define_ret: if execute is set to True, use the execution output in both the define and the return value
	:type define_ret: bool
	:param header_name: check for a particular header
	:type header_name: string
	:param auto_add_header_name: if header_name was set, add the headers in env.INCKEYS so the next tests will include these headers
	:type auto_add_header_name: bool
	t	   type_namet
   field_namet   function_names   Invalid argument %r in testRÑ   RW   t   compilerRÅ   t   ct   cxxs   a c++ compiler is requireds   a c compiler is requiredt   compile_modet   typet   cprogramt   header_namet   link_header_testRÃ   s   test.ct   ppRS   c         S€  sG   d |  k rC t  j |  d ƒ }  d j g  |  D] } d | ^ q, ƒ Sd S(   NRÛ   RS   s   #include <%s>
(   R   R–   t   join(   t   dctR‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   to_headerÌ  s    $t   framework_nameR}   t	   no_headers   %s/%s.ht   remove_dot_hiþÿÿÿs   Checking for framework %sRŽ   t	   frameworks   Checking for header %ss'   list of headers in header_name is emptyRÄ   i    R’   t   libs   Checking for library %st   stlibs   Checking for static library %st   fragments   Checking for code snippetR‘   t   not   cxxflagst   cflagst	   linkflagst   linkers   Checking for %s flags %st   executet	   test_exect   chmods	   not foundR�   R�   s   
s   #include <%s>t   merge_config_headers   %s

%sR¸   s    missing "msg" in conf.check(...)N(   RÒ   RÓ   RÔ   (   Ré   RÕ   (   Rê   RÕ   (   Rë   Rì   (   R   t   warnRÑ   RW   t   deriveRu   R   t   classesR    t   CXXR¾   t   CCR   R–   Rn   R—   t   lenRl   t   SNIP_EMPTY_PROGRAMR˜   Rs   R¬   t   O755t   INCKEYSRÞ   Rð   t   get_config_headerR`   Rm   t   undefine(   R{   R™   R‚   RW   Rà   t   fwknamet   fwkRV   t   lt	   flagsnamet	   flagstype(    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt
   validate_cˆ  sÀ    



6'	

@c         O€  s'  d } | d rR | d d k	 rb | j d ƒ r< | d } qO | d d k } qb n | d d k } | j d ƒ r-| j d d ƒ } | d } | d rQ| j d ƒ rQt | t ƒ rQ| j d d	 ƒ rò |  j | | d
 | j d
 d	 ƒ d | ƒq­| j d
 d	 ƒ rd | } n t | ƒ } d | | f } d | d } |  j j | | ƒ n\ | j d d	 ƒ r||  j | | d | ƒn1 d | d } |  j j | d | t | ƒ f ƒ | j d d	 ƒ r-| j d ƒ rëd	 |  j |  j	 | d ƒ <q*| d r| j d ƒ r| |  j | <q*t | ƒ |  j | <q-n  d | k rn| j d ƒ rn|  j j t
 t j | d ƒ ƒ qnn  | r#d | k r#d d l m }	 t ƒ  }
 x5 | d D]) } | |	 j k r¤|
 |	 j | O}
 q¤q¤WxO |
 D]D } | j ƒ  } | | k rØ|  j j | d | d | | ƒ qØqØWn  | S(   sl   
	Sets the variables after a test executed in
	:py:func:`waflib.Tools.c_config.check` was run successfully
	i    Rí   R¸   t
   define_retR’   t   commentRS   Rž   i   t   quotes   "%s"s   %s=%ss
   DEFINES_%sR}   RŸ   RÛ   t   auto_add_header_nameiÿÿÿÿ(   t   ccrootRÅ   t   _N(   Rm   R    Rj   Rk   R¡   t   intRW   RT   t   define_condR˜   Rù   R   R–   t   waflib.ToolsR  t   sett   USELIB_VARSt   lower(   R{   RÀ   R™   t
   is_successR  R’   t   succRV   RU   R  t   _varsR‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt
   post_check)  sV    

(+#&	-c         O€  s  |  j  | ƒ |  j | d | � d	 } y |  j | | Ž  } WnP |  j j k
 r� |  j | d d | � t j d k r ‚  qš |  j	 d ƒ n X| | d <|  j
 | | Ž  } | sÝ |  j | d d | � |  j	 d | ƒ n  |  j |  j | d | ƒ | � | S(
   sä  
	Performs a configuration test by calling :py:func:`waflib.Configure.run_build`.
	For the complete list of parameters, see :py:func:`waflib.Tools.c_config.validate_c`.
	To force a specific compiler, pass ``compiler='c'`` or ``compiler='cxx'`` to the list of arguments

	Besides build targets, complete builds can be given through a build function. All files will
	be written to a temporary directory::

		def build(bld):
			lib_node = bld.srcnode.make_node('libdir/liblc1.c')
			lib_node.parent.mkdir()
			lib_node.write('#include <stdio.h>\nint lib_func(void) { FILE *f = fopen("foo", "r");}\n', 'w')
			bld(features='c cshlib', source=[lib_node], linkflags=conf.env.EXTRA_LDFLAGS, target='liblc')
		conf.check(build_fun=build, msg=msg)
	RŽ   R‘   R·   i   s   The configuration failedR¸   s   The configuration failed %rR�   N(   R  R¹   Rm   t	   run_buildRº   t   ConfigurationErrorR¼   R   R½   R¾   R  R¿   (   R{   RÀ   R™   Rµ   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   checki  s"    
 Rî   c           B€  s   e  Z d  Z d Z d „  Z RS(   sg   
	A task that runs programs after they are built. See :py:func:`waflib.Tools.c_config.test_exec_fun`.
	t   PINKc         C€  sf  |  j  d j ƒ  g t |  j d g  ƒ } t |  j d d  ƒ r• t |  j d t ƒ rt |  j j j | ƒ |  j j _ qb|  j j j	 | ƒ |  j j _ nÍ |  j
 j
 p¤ i  } | j t t j ƒ ƒ xB d
 D]: } |  j  d j j ƒ  t j j | j | d ƒ | | <qÄ Wt |  j d t ƒ r>|  j j j | d	 | ƒ|  j j _ n$ |  j j j	 | d	 | ƒ|  j j _ d  S(   Ni    t	   test_argst   rpathR  t   LD_LIBRARY_PATHt   DYLD_LIBRARY_PATHt   PATHRS   RW   (   R  R  R  (   t   inputst   abspatht   getattrt	   generatorRm   Rs   RÎ   R¨   t   retvalt   exec_commandRW   t   updateR¦   t   osR§   t   parentR‰   t   pathsepR    (   R{   R®   RW   RU   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   run•  s    )!!8'(   t   __name__t
   __module__t   __doc__t   colorR%  (    (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRî   �  s   t
   apply_linkc         C€  s   |  j  d |  j j d ƒ d S(   sH  
	The feature **test_exec** is used to create a task that will to execute the binary
	created (link task output) during the build. The exit status will be set
	on the build context, so only one program may have the feature *test_exec*.
	This is used by configuration tests::

		def configure(conf):
			conf.check(execute=True)
	Rî   i    N(   t   create_taskt	   link_taskt   outputs(   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   test_exec_fun¦  s    c         O€  s   d | d <|  j  | | Ž  S(   sa   
	Runs a test with a task generator of the form::

		conf.check(features='cxx cxxprogram', ...)
	R×   RÕ   (   R  (   R{   RÀ   R™   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   check_cxx´  s    
c         O€  s   d | d <|  j  | | Ž  S(   s]   
	Runs a test with a task generator of the form::

		conf.check(features='c cprogram', ...)
	RÖ   RÕ   (   R  (   R{   RÀ   R™   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   check_cc¾  s    
c         C€  s9   |  j  j } | s% i  } |  j  _ n  | p. d | | <d S(   sj   
	Sets a comment that will appear in the configuration header

	:type key: string
	:type comment: string
	RS   N(   RW   t   DEFINE_COMMENTS(   R{   R±   R  t   coms(    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   set_define_commentÈ  s    c         C€  s"   |  j  j p i  } | j | d ƒ S(   sB   
	Returns the comment associated to a define

	:type key: string
	RS   (   RW   R1  R    (   R{   R±   R2  (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   get_define_commentÕ  s    RS   c   
      C€  s%  t  | t ƒ s t ‚ | s d S| t k r4 d } n | t d f k rO d } n  t  | t ƒ sm t  | t ƒ rv d } n | r‚ d p… d } | | t | ƒ f } | d } |  j j	 } xG | D], }	 |	 j
 | ƒ r» | | | j |	 ƒ <Pq» q» W|  j j d | ƒ |  j j t | ƒ |  j | | ƒ d S(   s  
	Stores a single define and its state into ``conf.env.DEFINES``. The value is cast to an integer (0/1).

	:param key: define name
	:type key: string
	:param val: value
	:type val: int or string
	:param quote: enclose strings in quotes (yes by default)
	:type quote: bool
	Ni   i    s   %s=%ss   %s="%s"t   =R`   (   Rj   Rk   Rl   Rn   Rs   Rm   R  t   floatRW   R`   Rv   t   indexRT   RZ   t   DEFKEYSR3  (
   R{   R±   RV   R  R  Rš   RY   t   banR€   R‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyR¡   ß  s(    			
c         C€  sŠ   t  | t ƒ s t ‚ | s d S| d } g  |  j j D] } | j | ƒ s6 | ^ q6 } | |  j _ |  j j t | ƒ |  j | | ƒ d S(   sb   
	Removes a global define from ``conf.env.DEFINES``

	:param key: define name
	:type key: string
	NR5  (	   Rj   Rk   Rl   RW   R`   Rv   RZ   R8  R3  (   R{   R±   R  R9  R‚   R€   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRû     s    
.c         C€  sU   t  | t ƒ s t ‚ | s d S| r> |  j | d d | ƒn |  j | d | ƒd S(   s  
	Conditionally defines a name::

		def configure(conf):
			conf.define_cond('A', True)
			# equivalent to:
			# if val: conf.define('A', 1)
			# else: conf.undefine('A')

	:param key: define name
	:type key: string
	:param val: value
	:type val: int or string
	Ni   R  (   Rj   Rk   Rl   R¡   Rû   (   R{   R±   RV   R  (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyR	    s    c         C€  sS   | r t  | t ƒ s t ‚ | d } x' |  j j D] } | j | ƒ r2 t Sq2 Wt S(   s±   
	Indicates whether a particular define is globally set in ``conf.env.DEFINES``.

	:param key: define name
	:type key: string
	:return: True if the define is set
	:rtype: bool
	R5  (   Rj   Rk   Rl   RW   R`   Rv   Rn   Rs   (   R{   R±   R9  R‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt
   is_defined.  s    

c         C€  s]   | r t  | t ƒ s t ‚ | d } x1 |  j j D]# } | j | ƒ r2 | t | ƒ Sq2 Wd S(   s~   
	Returns the value of an existing define, or None if not found

	:param key: define name
	:type key: string
	:rtype: string
	R5  N(   Rj   Rk   Rl   RW   R`   Rv   Rö   Rm   (   R{   R±   R9  R‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt
   get_define@  s    	
c         C€  s   |  j  j p d t j | ƒ S(   s  
	Returns a variable suitable for command-line or header use by removing invalid characters
	and prefixing it with ``HAVE_``

	:param key: define name
	:type key: string
	:return: the input key prefixed by *HAVE_* and substitute any invalid characters.
	:rtype: string
	s   HAVE_%s(   RW   t   HAVE_PATR   R•   (   R{   R±   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyR˜   Q  s    c         C€  s&  | s t  } n  | p% d t j | ƒ } | r7 |  j pC |  j j ƒ  }	 |	 j | ƒ }	 |	 j j ƒ  d g }
 |
 j	 d | | f ƒ |
 j	 |  j
 | | d | ƒƒ |
 j	 d | ƒ |	 j d j |
 ƒ ƒ |  j j t j |	 j ƒ  g ƒ | r"x" |  j t D] } |  j | ƒ qû Wg  |  j t <n  d S(   sÖ  
	Writes a configuration header containing defines and includes::

		def configure(cnf):
			cnf.define('A', 1)
			cnf.write_config_header('config.h')

	This function only adds include guards (if necessary), consult
	:py:func:`waflib.Tools.c_config.get_config_header` for details on the body.

	:param configfile: path to the file to create (relative or absolute)
	:type configfile: string
	:param guard: include guard name to add, by default it is computed from the file name
	:type guard: string
	:param top: write the configuration header from the build directory (default is from the current path)
	:type top: bool
	:param defines: add the defines (yes by default)
	:type defines: bool
	:param headers: add #include in the file
	:type headers: bool
	:param remove: remove the defines after they are added (yes by default, works like in autoconf)
	:type remove: bool
	:type define_prefix: string
	:param define_prefix: prefix all the defines in the file with a particular prefix
	s   W_%s_WAFs;   /* WARNING! All changes made to this file will be lost! */
s   #ifndef %s
#define %s
t   define_prefixs   
#endif /* %s */
s   
N(   t   WAF_CONFIG_HR   R•   t   bldnodeR‰   t   get_bldRË   R#  t   mkdirR¬   Rú   RÌ   RÞ   RW   RZ   R   t	   CFG_FILESR  R8  Rû   (   R{   t
   configfilet   guardt   topt   definest   headerst   removeR=  t	   waf_guardRÏ   R€   R±   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   write_config_header^  s     		c         C€  s;  g  } |  j  j r( | j |  j  j ƒ n  | rZ x) |  j  t D] } | j d | ƒ q< Wn  | r.i  } x6 |  j  j D]( } | j d ƒ \ } }	 }
 |
 | | <qs WxŒ |  j  t D]z } |  j | ƒ } | rÕ d | } n  y d | | | | | f } Wn$ t k
 rd | | | f } n X| j | ƒ q­ Wn  d j	 | ƒ S(   sí  
	Creates the contents of a ``config.h`` file from the defines and includes
	set in conf.env.define_key / conf.env.include_key. No include guards are added.

	A prelude will be added from the variable env.WAF_CONFIG_H_PRELUDE if provided. This
	can be used to insert complex macros or include guards::

		def configure(conf):
			conf.env.WAF_CONFIG_H_PRELUDE = '#include <unistd.h>\n'
			conf.write_config_header('config.h')

	:param defines: write the defines values
	:type defines: bool
	:param headers: write include entries for each element in self.env.INCKEYS
	:type headers: bool
	:type define_prefix: string
	:param define_prefix: prefix all the defines with a particular prefix
	:return: the contents of a ``config.h`` file
	:rtype: string
	s   #include <%s>R5  s	    /* %s */s   #define %s%s %s%ss   /* #undef %s%s */%ss   
(
   RW   t   WAF_CONFIG_H_PRELUDER¬   Rù   R`   t	   partitionR8  R4  t   KeyErrorRÞ   (   R{   RF  RG  R=  R€   R‚   t   tblRÀ   t   aR  t   bt   captiont   txt(    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRú   �  s*    c         C€  s*   |  j  d d t ƒ|  j  d d t ƒd S(   s6   
	Adds CFLAGS / CPPFLAGS from os.environ to conf.env
	t   CPPFLAGSt   dupR]   N(   t   add_os_flagsRs   (   R
   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   cc_add_flagsÀ  s    c         C€  s*   |  j  d d t ƒ|  j  d d t ƒd S(   s8   
	Adds CXXFLAGS / CPPFLAGS from os.environ to conf.env
	RS  RT  R^   N(   RU  Rs   (   R
   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   cxx_add_flagsÈ  s    c         C€  s*   |  j  d d t ƒ|  j  d d t ƒd S(   s8   
	Adds LINKFLAGS / LDFLAGS from os.environ to conf.env
	Rf   RT  t   LDFLAGSN(   RU  Rs   (   R
   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   link_add_flagsÐ  s    c         C€  s2   |  j  j s! t j ƒ  |  j  _ n  |  j d ƒ d S(   s   
	Loads the Waf c extensions
	RÖ   N(   RW   t   DEST_OSR   t   unversioned_sys_platformt   load(   R
   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   cc_load_toolsØ  s    c         C€  s2   |  j  j s! t j ƒ  |  j  _ n  |  j d ƒ d S(   s    
	Loads the Waf c++ extensions
	R×   N(   RW   RZ  R   R[  R\  (   R
   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   cxx_load_toolsá  s    c         €  sM  | d d d g } |  j  j  p" d0 } y1 |  j | d d d d j ƒ  d | ƒ\ } } Wn% t j k
 r} |  j d	 | ƒ n X| ræ | j d
 ƒ d k r© |  j d ƒ n  | j d ƒ d k  ræ | j d ƒ d k  ræ |  j d ƒ qæ n  | r| j d
 ƒ d k  r|  j d ƒ n  | r<| j d ƒ d k  r<|  j d ƒ n  | rh| j d ƒ d k rh|  j d ƒ n  i  ‰  | s€| s€| rI| j ƒ  } xP | D]H }	 t	 j
 |	 ƒ }
 t |
 ƒ d k r“|
 d } |
 d } | ˆ  | <q“q“W‡  f d †  } |  j  j s	d |  j  _ n  xp t D]& } | | ƒ rt | |  j  _ PqqW| d ƒ ra| d ƒ rad |  j  _ n | d ƒ r|d |  j  _ n  | d ƒ r—d |  j  _ n� | d ƒ s»| d ƒ s»| d ƒ rýd  |  j  _ |  j  j sè|  j  j |  j  _ n  |  j  j |  j  _ n | d ƒ rd! |  j  _ n  |  j  j sBt j |  j  j ƒ |  j  _ n  x. t D]& } | | ƒ rIt | |  j  _ PqIqIWt j d" d# j g  d1 D] } |  j  | pŸd' ^ q‰ƒ ƒ | ráˆ  d
 } | d(  | d( | d) f |  j  _ qI| d ƒ r| d* ƒ rˆ  d* ˆ  d+ ˆ  d, f |  j  _ qIˆ  d ˆ  d- ˆ  j d. d/ ƒ f |  j  _ n  ˆ  S(2   sÏ   
	Runs the preprocessor to determine the gcc/icc/clang version

	The variables CC_VERSION, DEST_OS, DEST_BINFMT and DEST_CPU will be set in *conf.env*

	:raise: :py:class:`waflib.Errors.ConfigurationError`
	s   -dMs   -Et   -t   outputi    t   inputs   
RW   s+   Could not determine the compiler version %rt   __INTEL_COMPILERs%   The intel compiler pretends to be gcct   __GNUC__t	   __clang__s%   Could not determine the compiler types   Not icc/icpcs   Not clang/clang++sX   Could not find gcc/g++ (only Clang), if renamed try eg: CC=gcc48 CXX=g++48 waf configurei   i   c         €  s
   |  ˆ  k S(   N(    (   RU   (   RÀ   (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   isD  s    RS   t	   __APPLE__t   __MACH__R'   t   __unix__t   generict   __ELF__t   elft	   __WINNT__R    R&   t   pes   mac-os   ccroot: dest platform: t    RZ  t   DEST_BINFMTt   DEST_CPUt   ?iþÿÿÿiÿÿÿÿt   __clang_major__t   __clang_minor__t   __clang_patchlevel__t   __GNUC_MINOR__t   __GNUC_PATCHLEVEL__t   0N(   RZ  Ro  Rp  (   RW   Rm   R¨   t   encodeR   R»   R¾   t   findt
   splitlinesRo   t   splitRö   RZ  t   MACRO_TO_DESTOSRo  t	   IMPLIBDIRt   LIBDIRt   BINDIRR   t   destos_to_binfmtt   MACRO_TO_DEST_CPURp  R   t   debugRÞ   t
   CC_VERSIONR    (   R
   t   cct   gcct   icct   clangR®   RW   t   outt   errR|   R€   R±   RV   Re  t   iR‚   t   ver(    (   RÀ   s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   get_cc_versionê  sx    	1*

$:
$$,c   	      C€  sÐ   | d g } y |  j  | d d ƒ\ } } Wn% t j k
 rS |  j d | ƒ n Xxu d
 D]` } t j | t j ƒ j } | | p… | ƒ } | r[ | j ƒ  } | d | d f |  j	 _
 Pq[ q[ W|  j d ƒ d	 S(   s[   
	Returns the Aix compiler version

	:raise: :py:class:`waflib.Errors.ConfigurationError`
	s	   -qversionR`  i    s   Could not find xlc %rs0   IBM XL C/C\+\+.* V(?P<major>\d*)\.(?P<minor>\d*)t   majort   minors$   Could not determine the XLC version.N(   s0   IBM XL C/C\+\+.* V(?P<major>\d*)\.(?P<minor>\d*)(   R¨   R   R»   R¾   t   ret   compilet   It   searcht	   groupdictRW   Rƒ  (	   R
   R„  R®   Rˆ  R‰  R´   t
   version_ret   matchRÀ   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   get_xlc_versionB  s    c   
      C€  s  | d g } y |  j  | d d ƒ\ } } Wni t j k
 r— } t | d ƒ ok t | d ƒ ok t | d ƒ s‚ |  j d | ƒ n  | j } | j } n X| p¡ | } | j ƒ  d } t j	 d t j
 ƒ j } | | ƒ } | r| j ƒ  }	 |	 d	 |	 d
 f |  j _ n |  j d ƒ d S(   s[   
	Returns the Sun compiler version

	:raise: :py:class:`waflib.Errors.ConfigurationError`
	s   -VR`  i    t
   returncodet   stdoutt   stderrs   Could not find suncc %rs^   cc: (studio.*?|\s+)?(sun\s+(c\+\+|c)|(WorkShop\s+Compilers))?\s+(?P<major>\d*)\.(?P<minor>\d*)R�  RŽ  s&   Could not determine the suncc version.N(   R¨   R   R»   t   hasattrR¾   R˜  R™  Rz  R�  R�  R‘  R’  R“  RW   Rƒ  (
   R
   R„  R®   Rˆ  R‰  RÁ   R¯   R”  R•  RÀ   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   get_suncc_versionZ  s     -	c         C€  sJ   |  j  j d k rF d |  j  j |  j  j f k rF |  j  j d d ƒ n  d S(   sÇ   
	Adds ``--as-needed`` to the *LINKFLAGS*
	On some platforms, it is a default flag.  In some cases (e.g., in NS-3) it is necessary to explicitly disable this feature with `-Wl,--no-as-needed` flag.
	Rk  R…  Rf   s   -Wl,--as-neededN(   RW   Ro  Ru   t   CC_NAMERZ   (   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   add_as_needed{  s    0t   cfgtaskc           B€  sM   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   s›   
	A task that executes build configuration tests (calls conf.check)

	Make sure to use locks if concurrent access to the same conf.env data is necessary.
	c         O€  s&   t  j  j |  | | Ž t ƒ  |  _ d  S(   N(   R   t   __init__R  t	   run_after(   R{   RÀ   R™   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRŸ  Œ  s    c         C€  s   d S(   NRS   (    (   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   display�  s    c         C€  s+   x! |  j  D] } | j s
 t j Sq
 Wt j S(   N(   R   t   hasrunR   t	   ASK_LATERt   RUN_ME(   R{   R‚   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   runnable_status“  s    	c         C€  s   t  j S(   N(   R   t   SIG_NIL(   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   uid™  s    c         C€  s   t  j S(   N(   R   R¦  (   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt	   signatureœ  s    c         C€  s)  |  j  } t j d | j j ƒ  d | j j ƒ  ƒ } | j | _ | j ƒ  d | _ |  j	 | _	 |  | _
 |  j } y  d | k rÌ | j d | d d | j d d ƒ d | j d d ƒ d	 | j d	 d ƒ ƒ nC | j d
 t ƒ | d <t | d
 <z | j | �  Wd  | d | d
 <XWn t k
 r$d SXd  S(   Nt   top_dirt   out_diri   t   funcRÑ   RŽ   RS   R�   R‘   t	   mandatoryt   multicheck_mandatory(   R
   R   t   BuildContextRÊ   R  R?  RW   t	   init_dirst   in_msgt   loggert   multicheck_taskR¤   t   testR    Rn   R  t	   Exception(   R{   R
   RÎ   R¤   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyR%  Ÿ  s*    	*
			
c         C€  sÔ   t  j  j |  ƒ d |  j k rÐ |  j j j �� |  j j |  j d ƒ |  j t  j	 k rn |  j j
 d d ƒ nY |  j t  j k r¥ |  j j
 |  j j d d ƒ d ƒ n" |  j j
 |  j j d d ƒ d ƒ Wd  QXn  d  S(	   NRŽ   s   test cancelledR·   R‘   Rè   R�   R�   t   GREEN(   R   t   processR¤   R  RÎ   t   multicheck_lockR
   R¹   R¢  t   NOT_RUNR¼   t   SUCCESSR    (   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyR¶  ¹  s    %(
   R&  R'  R(  RŸ  R¡  R¥  R§  R¨  R%  R¶  (    (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRž  †  s   						c         €  só  |  j  | j d d t | ƒ ƒ | � x' d t f D] } |  j j | g  ƒ q3 W|  j j p_ i  |  j _ d t f ‡  f d †  ƒ  Y} | ƒ  } | j d t ƒ | _	 i  | _
 g  ‰  i  } xœ | D]” } t j d d | d	 d ƒ } ˆ  j | ƒ | | _ | | _ |  | _ | | _ t j t t | ƒ ƒ |  j ƒ | _ d
 | k r¾ | | | d
 <q¾ q¾ WxÆ ˆ  D]¾ } xY t j | j j d g  ƒ ƒ D]9 }	 | |	 }
 |
 s«t d |	 ƒ ‚ n  |
 j j | ƒ q‚WxY t j | j j d g  ƒ ƒ D]9 }	 | |	 }
 |
 st d |	 ƒ ‚ n  | j j |
 ƒ qÞWq]W‡  f d †  } t j | t j j  ƒ | _! } t j" j# ƒ  | _$ | ƒ  | _% |  j& d ƒ | j' ƒ  x ˆ  D] } | j j( j) ƒ  q‰W|  j  d ƒ | j* rx[ | j* D]M } t+ | d d ƒ rÃ|  j, | j- ƒ |  j& d d d ƒt. j/ d ƒ ‚ qÃqÃWn  d } x6 ˆ  D]. } | j0 t j1 t j2 f k r$| d 7} q$q$W| r…|  j& | j d d | ƒ d d | �n |  j& d | � xW ˆ  D]O } | j0 t j1 k rœ| j j d t ƒ rë|  j3 | j d ƒ pád ƒ qëqœqœWd S(    s2  
	Runs configuration tests in parallel; results are printed sequentially at the end of the build
	but each test must provide its own msg value to display a line::

		def test_build(ctx):
			ctx.in_msg = True # suppress console outputs
			ctx.check_large_file(mandatory=False)

		conf.multicheck(
			{'header_name':'stdio.h', 'msg':'... stdio', 'uselib_store':'STDIO', 'global_define':False},
			{'header_name':'xyztabcd.h', 'msg':'... optional xyztabcd.h', 'mandatory': False},
			{'header_name':'stdlib.h', 'msg':'... stdlib', 'okmsg': 'aye', 'errmsg': 'nope'},
			{'func': test_build, 'msg':'... testing an arbitrary build function', 'okmsg':'ok'},
			msg       = 'Checking for headers in parallel',
			mandatory = True, # mandatory tests raise an error at the end
			run_all_tests = True, # try running all tests
		)

	The configuration tests may modify the values in conf.env in any order, and the define
	values can affect configuration tests being executed. It is hence recommended
	to provide `uselib_store` values with `global_define=False` to prevent such issues.
	RŽ   s    Executing %d configuration testsR`   t   parc           €  s)   e  Z d  „  Z ‡  f d †  Z d „  Z RS(   c         S€  s   t  |  _ i  |  _ d |  _ d  S(   Ni    (   Rs   t   keept	   task_sigst   progress_bar(   R{   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRŸ  ç  s    		c         €  s
   t  ˆ  ƒ S(   N(   Rö   (   R{   (   t   tasks(    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   totalë  s    c         _€  s   d  S(   N(    (   R{   RÀ   R™   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRz   í  s    (   R&  R'  RŸ  R¿  Rz   (    (   R¾  (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyRº  æ  s   	t   run_all_testsRž  RÎ   RW   t   idt   before_testss   No test named %rt   after_testsc           3€  s   ˆ  Vx	 g  Vq Wd  S(   N(    (    (   R¾  (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   it  s    t   starteds   -> processing test resultst   err_msgt   failR)  t   REDsF   There is an error in the library, read config.log for more informationi    i   R‘   s   %s test failedR·   s   all okR¬  t   fatalmsgsA   One of the tests has failed, read config.log for more informationN(4   R¹   R    Rö   R8  RW   RT   R1  t   objectRn   R»  t   imp_sigsR   Ró   Rm   R¬   R¤   RÎ   R
   R   t   make_mem_loggerRk   RÁ  R±  R   R–   R”   R   t   addR   t   ParallelR   t   optionst   jobst   producert	   threadingt   LockR·  t   biterR¼   t   startt
   memhandlert   flusht   errorR  Rz   RÆ  R   R»   R¢  R¹  R¸  R¾   (   R{   RÀ   R™   RU   Rº  RÎ   t
   id_to_taskRß   R‚   R±   t   tskRÄ  t   pt   failure_count(    (   R¾  s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt
   multicheckÅ  sr    &
						$%
%

	)RÖ   c         C€  s×   t  |  j j d ƒ d k r  d  S|  j j ƒ  | d k rN d d g |  j _ n! | d k ro d d g |  j _ n  d | | f } y  |  j d d	 d
 t d | ƒ Wn$ |  j j	 k
 rÅ |  j j
 ƒ  n X|  j j ƒ  d  S(   Ni    i   RÖ   s   -oRS   R×   s
   %s %sshlibRŽ   s4   Checking if the -o link must be split from argumentsRç   RÅ   (   R  RW   Rƒ  t   stasht   CCLNK_TGT_Ft   CXXLNK_TGT_FR  R÷   Rº   R  t   revertt   commit(   R{   t   modeRÅ   (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   check_gcc_o_space7  s     (>   R(  t
   __future__R    R"  R�  Ro   t   waflibR   R   R   R   R   R   R   t   waflib.TaskGenR   R	   t   waflib.ConfigureR
   R>  R8  Rù   R÷   R|  R�  Rm   Rs   Rˆ   R›   R¶   RÂ   RÑ   R  R  R  Rî   R.  R/  R0  R3  R4  Rn   R¡   Rû   R	  R:  R;  R˜   RJ  Rú   RV  RW  RY  R]  R^  RŒ  R–  R›  R�  Rž  RÝ  Rä  (    (    (    s8   /git_repos/PolyLV2/poly_mclk_in/waflib/Tools/c_config.pyt   <module>   s¶   $4

r4\,	¡@'	


%!1/		W!?r